From: Junio C Hamano Date: Tue, 24 Feb 2026 22:21:17 GMT Subject: Re: [PATCH v28 2/2] status: add status.compareBranches config for multiple branch comparisons Message-ID: In-Reply-To: <20260223133034.GD215671@coredump.intra.peff.net> Jeff King writes: > So what about this. We add a config option that takes a list of items to > compare against. But it _only_ supports @{upstream} and @{push} for now, > and interprets them as branch@{upstream} and branch@{push} (but probably > done manually, not via dwim_ref). That limitation gets documented. Sounds like a good way forward. > Then later, if we choose to allow resolving arbitrary refs via > dwim_ref(), we can add that support on top: > > - rather than manually resolving @{upstream}, quietly rewrite it to > branch@{upstream}. This is OK since branchless @{upstream} makes no > sense in this context. > > - otherwise, pass what the user gives us to repo_dwim_ref() > > - optionally allow substitution via %s or similar. Technically I think > "%" is allowed in a ref. I think that's probably OK in practice, > though if we want to be really careful, then "[branch]" or something > that's forbidden in the ref format would be a possible substitution. > > But if we stop short of all of that today, we don't have to worry about > all of those weird corner cases I dug up in the earlier thread. And if > nobody ever _really_ cares about sticking arbitrary refs into their > compare-list, then we just never go there. ;-).