Skip to content

Commit

Permalink
git: separate tag for headcommits
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Dec 12, 2022
1 parent 908b604 commit c3e9291
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/actions/tools/git/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ func ActionRefs(refOption RefOption) carapace.Action {
} else {
for _, commit := range commits {
s := styles.Git.Commit
t := "commits"
if strings.HasPrefix(commit.Ref, "HEAD") {
s = styles.Git.HeadCommit
t = "headcommits"
}
batch = append(batch, carapace.ActionStyledValuesDescribed(commit.Ref, commit.Message, s).Tag("commits"))
batch = append(batch, carapace.ActionStyledValuesDescribed(commit.Ref, commit.Message, s).Tag(t))
}
}
if tags, err := tags(c, refOption); err != nil {
Expand Down

0 comments on commit c3e9291

Please sign in to comment.