Subject: Another look?

From: Harald Nordgren <[email-masked]>
Date: Mon, 5 Jan 2026 14:16:54 +0100

> 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