git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] status: compare against both upstream and push branch by default

From
D. Ben Knoble <ben.knoble@gmail.com>
Date
Oct 24, 2026, 13:49 UTC
Message-ID
<CALnO6CBD2aGg_wDZZsT-mWJ99MXYUycx32JfsK8zJXfcmjTBDw@mail.gmail.com>
In-Reply-To
<xmqqld7o71ot.fsf@gitster.g>
On Fri, Oct 23, 2026 at 1:45 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
>
> "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > Showing both without any configuration was the original proposal for
> > that commit. But some found the comparison with the push branch to be
> > noise. So the comparison was made opt in [1], with the idea of
> > flipping the default later if people like the option.
>
> The key phrase here is "if people like the option".
>
> > Those who find the comparison with the push branch to be noise can
> > set status.compareBranches to "@{upstream}" to get the old output
> > back.
>
> The presence of an escape hatch is described here.  But its
> existence is not a valid excuse to force people to use it, nor does
> it answer the question "if people like the option" posed above.

I agree, though I still support changing the default. I think we need to make a stronger case.

Show 10 quoted lines
> The paragraph above (and below) also assumes that comparing with
> @{push} is not noise for many people.  We have not yet heard a
> convincing argument supporting that assumption in the proposed log
> message.  In a triangular workflow, @{upstream} is not under your
> control, so you may want to monitor its progress closely.  But isn't
> your @{push} destination typically owned solely by you?  In other
> words, aren't you the only one who pushes to it?  If so, whatever
> you did locally would be the only change that could go on top of
> @{push}, and unlike @{upstream} you would not see any unexpected
> work over there appearing without your control.
I think this paragraph assumes that either
* I'm only pushing new commits to @{push}, or
* I remember what the current state of @{push} is without checking.

I may not see "unexpected" work appearing there in most cases, but I certainly appreciate the reminder when returning to a topic after working on something else. Have I rebased/amended/git-history'd lately and need to force-push? Do I care about the differences? Sometimes I already know the answer and want to validate what I'm about to send out, kind of like "git send-email" with sendemail.annotate (and multiedit, for me) configured.

I have a number of ways of helping answer this question, personally:
* git status: only ahead-behind count, but lets me know if there's
anything to do. I don't actually check this output too often myself
because I built the below prior the config under discussion, and they
are focused + finger memory---I almost always run short status when I
do look at status, but that's because I don't normally need the
verbose output these days ;) That's not the case for most of our
users.
* "git sbup" = show-branch HEAD HEAD@{push} HEAD@{upstream}: a quick
divergence check
* "git rdup" = range-diff HEAD@{upstream} HEAD@{push} HEAD: a detailed
comparison
* "git div" [1] runs a triple-dot graph log (with more options)
comparing HEAD against @{push} (if they differ) or @{upstream} (if
they're the same), omitting some other inferences and ways to supply
which topic to inspect.
[1]: https://github.com/benknoble/Dotfiles/blob/master/links/bin/git-div

So, I suppose my point is: as someone who almost exclusively has triangular workflows, I'm already checking this push--local divergence on a regular basis. I just built my own extensions to do so prior to Harald's welcome addition to status. Perhaps that can help Harald argue the case more convincingly in a proposed log message?

(Julia and I discussed briefly off-list whether "git-div"/"git-vee" should be part of Git, and I'm noodling on whether such a thing might make sense as "git log --divergence" or something.)

-- 
D. Ben Knoble
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 16 in “status: compare against both upstream and push branch by default”
  1. status: compare against both upstream and push branch by defaultHarald Nordgren via GitGitGadget, Oct 19, 2026
  2. Junio C HamanoOct 19, 2026
  3. Harald NordgrenOct 20, 2026
  4. Phillip WoodOct 20, 2026
  5. Harald NordgrenOct 20, 2026
  6. Kristoffer HaugsbakkOct 20, 2026
  7. Phillip WoodOct 20, 2026
  8. status: compare against both upstream and push branch by defaultHarald Nordgren via GitGitGadget, Oct 21, 2026
  9. Junio C HamanoOct 23, 2026
  10. Harald NordgrenOct 23, 2026
  11. Junio C HamanoOct 23, 2026
  12. Harald NordgrenOct 23, 2026
  13. Junio C HamanoOct 23, 2026
  14. D. Ben KnobleOct 24, 2026
  15. Junio C HamanoOct 24, 2026
  16. status: compare against both upstream and push branch by defaultHarald Nordgren via GitGitGadget, Oct 25, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.