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

Re: [PATCH 0/3] Make orphaned commit checks configurable

From
Derrick Stolee <stolee@gmail.com>
Date
Nov 10, 2026, 20:57 UTC
Message-ID
<dd253dfe-446e-4f2d-bd00-95ebc529cbc1@gmail.com>
In-Reply-To
<pull.2264.git.1794337920.gitgitgadget@gmail.com>
On 11/10/2026 2:11 PM, Wyatt Holden via GitGitGadget wrote:
> Hi there - my name's Wyatt Holden and I'm a Software Engineer at Microsoft
> :) I've been working with Derrick Stolee over the past few weeks on
> optimizing git in the Office mono-repo. We found some issues around slow
> checkouts on mono-repos in an automated environment:
Welcome, Wyatt! (I was prepared for your series.) 
Show 13 quoted lines
> When leaving a detached HEAD, git checkout and git switch
> call orphaned_commit_warning() to warn about commits that are not reachable
> from any existing ref or the destination HEAD. This requires enumerating
> refs and walking commit history, which can be expensive in large
> repositories.
> 
> In an internal mono-repo, Trace2 showed tree unpacking finishing
> approximately 12 seconds into checkout, but the process continuing for
> roughly another 193 seconds. A stack dump captured the main thread inside
>  orphaned_commit_warning(), enumerating loose refs and opening ref files.
> Running checkout with --quiet, which bypasses this routine, reduced the
> observed runtime to approximately 14 seconds. However, --quiet also
> suppresses unrelated output.

This example shows a significant pain caused by this check, but we also want to be able to see progress indicators over time in our logs, so using --quiet isn't preferred, long term.

> This three-commit series adds a targeted opt-out, advertises it when the
> check is slow, and enables it in Scalar:

I did some pre-review with Wyatt (but found one nitpick in my on-list re-review) so I'm biased. Further bias: I recommended that he follow the model of the status.aheadBehind config [1] and advice.statusAheadBehind [2] patches as prior art.

[1] https://lore.kernel.org/git/2f0f2a2df9410947b985d83a924d2549d62bb65f.1560889284.git.gitgitgadget@gmail.com/
[2] https://lore.kernel.org/git/c1056545b617b89e881f5991beb2fe0d860de740.1560889284.git.gitgitgadget@gmail.com/

And also I added status.aheadBehind to Scalar's recommended config in its very first version [3]. Wyatt has updated the Scalar config docs that justify the recommendation, which was introduced only recently [4].

[3] https://lore.kernel.org/git/4439ab4de0bc3f48a6bdcf4b5165b16fad792ebd.1638538470.git.gitgitgadget@gmail.com/
[4] https://lore.kernel.org/git/f062b0e0773b9d168c031bb1f35538665394a077.1765552528.git.gitgitgadget@gmail.com/
So I give my support publicly for Wyatt's updates.

Thanks, -Stolee

Previous: Wyatt Holden via GitGitGadgetNext: Junio C Hamano
Message 9 of 10 in “Make orphaned commit checks configurable”
  1. 0/3 Make orphaned commit checks configurableWyatt Holden via GitGitGadget, Nov 10, 2026
  2. 1/3 checkout: make orphaned commit checks configurableWyatt Holden via GitGitGadget, Nov 10, 2026
  3. Junio C HamanoNov 10, 2026
  4. 2/3 checkout: advise when orphaned commit checks are slowWyatt Holden via GitGitGadget, Nov 10, 2026
  5. Derrick StoleeNov 10, 2026
  6. Junio C HamanoNov 10, 2026
  7. Junio C HamanoNov 11, 2026
  8. 3/3 scalar: disable orphaned commit checks by defaultWyatt Holden via GitGitGadget, Nov 10, 2026
  9. Derrick StoleeNov 10, 2026
  10. Junio C HamanoNov 10, 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.