summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-03-15 12:21:24 +0100
committerStefan Haller <stefan@haller-berlin.de>2023-05-12 22:56:58 +0200
commit910a61dc46ef4060627bf9925b0fac0b87260609 (patch)
tree7abb6eef80522e20e9eec5504c9aa2be771b1a19 /pkg/commands
parent051af6a066ee09c294db9edd694d5c0becdd3267 (diff)
Make "merged" take precedence over "unpushed"
Previously, when rebasing a branch onto a newer master, all commits from the previous fork point up to its head were marked red (unpushed), including the commits that are on master already. While this is technically correct from the perspective of the current branch's upstream, it's not what most people expect, intuitively; they want to see where the current branch starts, relative to master. So all commits of master should be green, and then the commits of the current branch in red.
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git_commands/commit_loader.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/commands/git_commands/commit_loader.go b/pkg/commands/git_commands/commit_loader.go
index bce16de15..0ab3ceee4 100644
--- a/pkg/commands/git_commands/commit_loader.go
+++ b/pkg/commands/git_commands/commit_loader.go
@@ -357,7 +357,7 @@ func (self *CommitLoader) setCommitMergedStatuses(refName string, commits []*mod
if strings.HasPrefix(ancestor, commit.Sha) {
passedAncestor = true
}
- if commit.Status != models.StatusPushed {
+ if commit.Status != models.StatusPushed && commit.Status != models.StatusUnpushed {
continue
}
if passedAncestor {