From 910a61dc46ef4060627bf9925b0fac0b87260609 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Wed, 15 Mar 2023 12:21:24 +0100 Subject: 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. --- pkg/commands/git_commands/commit_loader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/commands') 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 { -- cgit v1.2.3