diff options
author | Joel Baranick <joel.baranick@ensighten.com> | 2022-09-02 09:07:24 -0700 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-30 18:35:21 +1000 |
commit | 9a79154d05a81852a36ed336b6927ef60f835d6b (patch) | |
tree | fa2288d74344bd464dabb3faf3131faf0cdd154e /pkg/gui/presentation | |
parent | 60872c91e6fa054d0c7fa4b09df8d9aa572702ff (diff) |
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
Diffstat (limited to 'pkg/gui/presentation')
-rw-r--r-- | pkg/gui/presentation/icons/git_icons.go | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/pkg/gui/presentation/icons/git_icons.go b/pkg/gui/presentation/icons/git_icons.go index 0111ca2b5..6b5689295 100644 --- a/pkg/gui/presentation/icons/git_icons.go +++ b/pkg/gui/presentation/icons/git_icons.go @@ -7,14 +7,14 @@ import ( ) var ( - BRANCH_ICON = "\U000f062c" // - DETACHED_HEAD_ICON = "\ue729" // - TAG_ICON = "\uf02b" // - COMMIT_ICON = "\U000f0718" // - MERGE_COMMIT_ICON = "\U000f062d" // - DEFAULT_REMOTE_ICON = "\uf02a2" // - STASH_ICON = "\uf01c" // - WORKTREE_ICON = "\uf02b" // + BRANCH_ICON = "\U000f062c" // + DETACHED_HEAD_ICON = "\ue729" // + TAG_ICON = "\uf02b" // + COMMIT_ICON = "\U000f0718" // + MERGE_COMMIT_ICON = "\U000f062d" // + DEFAULT_REMOTE_ICON = "\uf02a2" // + STASH_ICON = "\uf01c" // + LINKED_WORKTREE_ICON = "\uf838" // ) var remoteIcons = map[string]string{ @@ -70,6 +70,9 @@ func IconForStash(stash *models.StashEntry) string { return STASH_ICON } -func IconForWorktree(tag *models.Worktree) string { - return WORKTREE_ICON +func IconForWorktree(worktree *models.Worktree) string { + if worktree.Main { + return "" + } + return LINKED_WORKTREE_ICON } |