Subject: Re: [PATCH v20 0/2] status: show comparison with push remote tracking branch

From: Junio C Hamano <[email-masked]>
Date: Sat, 10 Jan 2026 09:41:47 -0800

"Harald Nordgren via GitGitGadget" <[email-masked]> writes:

Here is a place for you to explain what helps people to decypher the
differences since the previous iteration in Range-diff (which is not
very easy to read).

> cc: Chris Torek [email-masked] cc: Yee Cheng Chin
> [email-masked] cc: "brian m. carlson" [email-masked]
> cc: Ben Knoble [email-masked] cc: "Kristoffer Haugsbakk"
> [email-masked] cc: Phillip Wood [email-masked]
> cc: Nico Williams [email-masked] cc: Patrick Steinhardt [email-masked]

I am not sure what good these lines are doing (to GGG).

> Harald Nordgren (2):
>   refactor format_branch_comparison in preparation
>   status: show comparison with push remote tracking branch
>
>  remote.c                 | 183 ++++++++++++++++++++-------
>  t/t6040-tracking-info.sh | 262 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 403 insertions(+), 42 deletions(-)
>
>
> base-commit: d529f3a197364881746f558e5652f0236131eb86
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2138%2FHaraldNordgren%2Fahead_of_main_status-v20
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2138/HaraldNordgren/ahead_of_main_status-v20
> Pull-Request: https://github.com/git/git/pull/2138
>
> Range-diff vs v19:
>
>  1:  451d7a4986 ! 1:  bb3e00863b refactor format_branch_comparison in preparation
>      @@ remote.c: int format_tracking_info(struct branch *branch, struct strbuf *sb,
>        		if (advice_enabled(ADVICE_STATUS_HINTS))
>        			strbuf_addstr(sb,
>        				_("  (use \"git pull\" to update your local branch)\n"));
>      -@@ remote.c: int format_tracking_info(struct branch *branch, struct strbuf *sb,
>      - 			       "and have %d and %d different commits each, "
>      - 			       "respectively.\n",
>      - 			   ours + theirs),
>      + 	} else {
>      + 		strbuf_addf(sb,
>      +-			Q_("Your branch and '%s' have diverged,\n"
>      +-			       "and have %d and %d different commit each, "
>      +-			       "respectively.\n",
>      +-			   "Your branch and '%s' have diverged,\n"
>      +-			       "and have %d and %d different commits each, "
>      +-			       "respectively.\n",
>      +-			   ours + theirs),
>       -			base, ours, theirs);
>      ++			"Your branch and '%s' have diverged,\n"
>      ++			       "and have %d and %d different commits each, respectively.\n",
>       +			branch_name, ours, theirs);
>        		if (show_divergence_advice &&
>        		    advice_enabled(ADVICE_STATUS_HINTS))

Could you not mix the ours+theirs thing into the same step?  Either
make it a standalone patch to clean up before or after your main 2
patches, or leave it totally outside the series and send it after
this series settles.