summaryrefslogtreecommitdiffstats
path: root/pkg/gui/presentation/icons/git_icons.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/presentation/icons/git_icons.go')
-rw-r--r--pkg/gui/presentation/icons/git_icons.go27
1 files changed, 23 insertions, 4 deletions
diff --git a/pkg/gui/presentation/icons/git_icons.go b/pkg/gui/presentation/icons/git_icons.go
index 89185a0e8..8acfead2b 100644
--- a/pkg/gui/presentation/icons/git_icons.go
+++ b/pkg/gui/presentation/icons/git_icons.go
@@ -1,10 +1,29 @@
package icons
-import "github.com/jesseduffield/lazygit/pkg/commands/models"
+import (
+ "github.com/jesseduffield/lazygit/pkg/commands/models"
+)
-const BRANCH_ICON = "\ufb2b" // שׂ
-const COMMIT_ICON = "\ufc16" // ﰖ
-const MERGE_COMMIT_ICON = "\ufb2c" // שּׁ
+const BRANCH_ICON = "\ufb2b" // שׂ
+const DETACHED_HEAD_ICON = "\ue729" // 
+const TAG_ICON = "\uf02b" // 
+const COMMIT_ICON = "\ufc16" // ﰖ
+const MERGE_COMMIT_ICON = "\ufb2c" // שּׁ
+
+func IconForBranch(branch *models.Branch) string {
+ if branch.DisplayName != "" {
+ return DETACHED_HEAD_ICON
+ }
+ return BRANCH_ICON
+}
+
+func IconForRemoteBranch(branch *models.RemoteBranch) string {
+ return BRANCH_ICON
+}
+
+func IconForTag(tag *models.Tag) string {
+ return TAG_ICON
+}
func IconForCommit(commit *models.Commit) string {
if len(commit.Parents) > 1 {