Re: [PATCH] status: show default branch comparison when tracking non-default branch
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 24, 2025, 01:44 UTC
- Message-ID
- <xmqqqzskodqe.fsf@gitster.g>
- In-Reply-To
- <CAHTeOx8nrjJVD0U0=BDTUJZNZX0Xs_b4YGbj=WSavWEPEg-9Eg@mail.gmail.com>
Yee Cheng Chin <ychin.macvim@gmail.com> writes:
> I may be speaking for the author here, but I think the reason why the > upstream discovery (or alternatively an additional configuration in > the repo) feature was suggested is that not everyone uses the > mechanism you described (which I think is the "pushRemote" config).
The mention of pushRemote by Harald is a red-herring. My point is that branch.<name>.remote tells what remote we interact with (and pushRemote is used as a fallback), so there is no need to, and it is actively wrong to, assume "upstream" or "origin". Even if you push back to the same repository as you pull from, you may push to a different branch there, in which case you do not need pushRemote, but you'd need to learn what configured remote you are using anyway.