From: Junio C Hamano Date: Mon, 05 Jan 2026 01:16:26 GMT Subject: Re: Another look? Message-ID: In-Reply-To: <20260104104855.31105-1-haraldnordgren@gmail.com> Harald Nordgren writes: > Sorry, here's what the code block will look like: > > ``` > } else if (abf == AHEAD_BEHIND_QUICK) { > strbuf_addf(sb, > _("Your branch and '%s' refer to different commits.\n"), > branch_name); > if (advice_enabled(ADVICE_STATUS_HINTS)) > strbuf_addf(sb, _(" (use \"%s\" for details)\n"), > "git status --ahead-behind"); > } else if (!theirs && !ours) { > strbuf_addf(sb, > _("Your branch is up to date with '%s'.\n"), > branch_name); > ``` I did not check what comes before or after this block, but the above looks like a reversed ordering. If you have "the branches are the same" check first, it would make more sense, as after ruling out that case, QUICK can short-cut comparison and asy "they are different", and presumably after these two else/if arms, you'd have cases for "theirs && !ours -> they are ahead of us", "!theirs && ours -> we are ahead of them", and "theirs && ours -> we diverged" to handle.