mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-02 03:56:45 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 {
|
||||
|
||||
Reference in New Issue
Block a user