Subject: Re: [PATCH] status: show default branch comparison when tracking non-default branch

From: Harald Nordgren <[email-masked]>
Date: Wed, 24 Dec 2025 11:24:40 +0100

> This series seems to punt on
> determining both repository and branch and instead uses a hardcoded
> "upstream" (or "origin") and "HEAD", which is not satisfactory.

I have made a change to the code to not assume "upstream" or "origin" as remote names. Now there is a config setting 'repo.settings.statusGoalBranch' to enable this the check.

I side-stepped the discussion about pushRemotes since what Yee Cheng Chin brought up seems to kill the possibility of determining comparison branch dynamically. Let me know what you think of the latest code and I can handle it if needed 🤗

> I don't have that much of an opinion on per-repo / per-branch
> configuration but I just wanted to point out that some branches would
> benefit from the ability to turn this off. Perhaps it could be a two
> layered setting that could be both configured per-repo / per-branch
> but I don't know if this makes it too complicated.

I skipped this for now because I couldn't find a precedent in the sourc code for config settings that are "on repo-wide, but turned off for some branches". I could dig into this if we need it. I would like to hear Junio C Hamano's thoughts on this specific thing too 🤗

Harald