Hide worktrees in the worktree panel if they point at a non-existing filesystem location.

Remove unneeded check when filtering out branches from non-current worktrees from the branch panel.
Add link icon for linked worktrees
This commit is contained in:
Joel Baranick 2022-09-02 09:07:24 -07:00 committed by Jesse Duffield
parent 60872c91e6
commit 9a79154d05
3 changed files with 26 additions and 13 deletions

View file

@ -144,8 +144,10 @@ func (self *BranchLoader) obtainBranches() []*models.Branch {
return nil, false
}
if len(split[6]) > 0 && split[6] != currentDir {
branchDir := split[6]
if len(branchDir) > 0 && branchDir != currentDir {
// Ignore line because it is a branch checked out in a different worktree
// Branches which are not checked out will not have a path, so we should not ignore them.
return nil, false
}