diff --git a/pkg/commands/git_commands/commit_loader.go b/pkg/commands/git_commands/commit_loader.go index da4bcb7ff..c1b446b5d 100644 --- a/pkg/commands/git_commands/commit_loader.go +++ b/pkg/commands/git_commands/commit_loader.go @@ -546,7 +546,9 @@ func setCommitStatuses(unpushedCommitHashes *set.Set[string], unmergedCommitHash } if unmergedCommitHashes == nil || unmergedCommitHashes.Includes(commit.Hash()) { - if unpushedCommitHashes != nil && unpushedCommitHashes.Includes(commit.Hash()) { + if unpushedCommitHashes == nil { + commits[i].Status = models.StatusNone + } else if unpushedCommitHashes.Includes(commit.Hash()) { commits[i].Status = models.StatusUnpushed } else { commits[i].Status = models.StatusPushed @@ -569,7 +571,7 @@ func (self *CommitLoader) getReachableHashes(refName string, notRefNames []strin DontLog(). RunWithOutputs() if err != nil { - return set.New[string]() + return nil } return set.NewFromSlice(utils.SplitLines(output)) diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index a5799bcb3..a85a2326b 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -483,6 +483,8 @@ func getHashColor( diffed := commit.Hash() != "" && commit.Hash() == diffName hashColor := theme.DefaultTextColor switch commit.Status { + case models.StatusNone: + hashColor = style.FgMagenta // or style.FgCyan case models.StatusUnpushed: hashColor = style.FgRed case models.StatusPushed: @@ -493,7 +495,6 @@ func getHashColor( hashColor = style.FgBlue case models.StatusReflog: hashColor = style.FgBlue - default: } if diffed {