diff options
Diffstat (limited to 'git-codereview/pending.go')
| -rw-r--r-- | git-codereview/pending.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git-codereview/pending.go b/git-codereview/pending.go index 8a74e09..d03b003 100644 --- a/git-codereview/pending.go +++ b/git-codereview/pending.go @@ -240,6 +240,8 @@ func printPendingStandard(branches []*pendingBranch) { } } + cfgRemote := config()["remote"] + for _, b := range branches { if !b.current && b.commitsAhead == 0 { // Hide branches with no work on them. @@ -268,8 +270,8 @@ func printPendingStandard(branches []*pendingBranch) { } if br := b.OriginBranch(); br == "" { tags = append(tags, "remote branch unknown") - } else if br != "origin/master" && br != "origin/main" { - tags = append(tags, "tracking "+strings.TrimPrefix(b.OriginBranch(), "origin/")) + } else if br != cfgRemote+"/master" && br != cfgRemote+"/main" { + tags = append(tags, "tracking "+strings.TrimPrefix(b.OriginBranch(), cfgRemote+"/")) } if len(tags) > 0 { fmt.Fprintf(&buf, " (%s)", strings.Join(tags, ", ")) |
