Another look?
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Jan 5, 2026, 13:16 UTC
- Message-ID
- <20260105131654.88348-1-haraldnordgren@gmail.com>
- In-Reply-To
- <xmqqldickzva.fsf@gitster.g>
Show 6 quoted lines
> Please don't. Unless my assumption, which is that in the old code > "!sti" and "!ours && !theirs" is equivalent, is wrong, all you need > to do around that part is to first check "if (!ours && !theirs)" and > say "your branch is up to date with...", and then have the check > "else if (abf == ABQ)" next. That way, when we check abf we know > the branches are different.
It seems to be an incorrect assumption. This code change breaks several tests including old ones:
```
diff --git a/remote.c b/remote.c index 1f87b85b22..8db4fcd7b5 100644 --- a/remote.c +++ b/remote.c @@ -2303,7 +2303,7 @@ static void format_branch_comparison(struct strbuf *sb, enum branch_mode_flags advice_flags, int show_divergence_advice) { - if (!sti) { + if (!ours && !theirs) { strbuf_addf(sb, _("Your branch is up to date with '%s'.\n"), branch_name); ``` Harald