diff options
Diffstat (limited to 'pkg/commands/models/worktree.go')
-rw-r--r-- | pkg/commands/models/worktree.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/commands/models/worktree.go b/pkg/commands/models/worktree.go index c14304233..662d137dc 100644 --- a/pkg/commands/models/worktree.go +++ b/pkg/commands/models/worktree.go @@ -4,8 +4,12 @@ package models type Worktree struct { // if false, this is a linked worktree IsMain bool + // if true, this is the worktree that is currently checked out + IsCurrent bool // path to the directory of the worktree i.e. the directory that contains all the user's files Path string + // if true, the path is not found + IsPathMissing bool // path of the git directory for this worktree. The equivalent of the .git directory // in the main worktree. For linked worktrees this would be <repo_path>/.git/worktrees/<name> GitDir string @@ -39,3 +43,11 @@ func (w *Worktree) Name() string { func (w *Worktree) Main() bool { return w.IsMain } + +func (w *Worktree) Current() bool { + return w.IsCurrent +} + +func (w *Worktree) PathMissing() bool { + return w.IsPathMissing +} |