mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-12 16:46:25 -04:00
Use a color other than yellow or red for commits on a branch that doesn't have an upstream
This commit is contained in:
parent
80dd695d7a
commit
ed4d57c800
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue