Re: [PATCH] status: show default branch comparison when tracking non-default branch
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Dec 23, 2025, 14:09 UTC
- Message-ID
- <20251223140924.69410-1-haraldnordgren@gmail.com>
- In-Reply-To
- <xmqqtsxhpblq.fsf@gitster.g>
Show 10 quoted lines
> If a project uses the same remote repository to maintain its > maintenance and development tracks, their HEAD might point at the > 'main' (used for development), but some of your branches you used to > work on fixes that can later be merged to the maintenance track, it > is likely that you'll fork from their 'maint', and while you keep > polishing your fixes, you may push your 'fix' branch to their 'fix' > branch. Comparing your 'fix' with their 'fix' is what we already > do, and it gives two thirds of what you need, but the missing > comparison is with their 'maint', not with their HEAD that points at > their 'main'.
That's a fair point. I am used to trunk-based development, but I recognize that there are other paradigms out there.
One possibly solution could be to make this adjustable in repo-wide config (maybe 'repo.settings.defaultBranch=maint') and when unset it compares to 'refs/remotes/upstream/HEAD'?