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

[PATCH 3/3] scalar: disable orphaned commit checks by default

From
WGWyatt Holden via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 10, 2026, 19:12 UTC
Message-ID
<f24d4019e889b12cd6237217c3cf31f47aa318d5.1794337920.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.2264.git.1794337920.gitgitgadget@gmail.com>
From: Wyatt Holden <wyattholden@microsoft.com>

Checking for commits left behind when leaving a detached HEAD can be expensive in large repositories. Add checkout.orphanedCommitWarning=false to Scalar's recommended settings to avoid this foreground work while preserving normal checkout output.

Use the existing set-if-missing behavior so explicit user choices are preserved during clone, register, and reconfigure. Document the loss of the immediate orphan warning and the availability of reflog recovery. Existing Scalar tests cover configuration preservation, so no additional inventory of recommended settings is needed.

Signed-off-by: Wyatt Holden <wyattholden@microsoft.com>
---
 Documentation/scalar.adoc | 7 +++++++
 scalar.c                  | 1 +
 2 files changed, 8 insertions(+)
diff --git a/Documentation/scalar.adoc b/Documentation/scalar.adoc
index 5252fb134a..d2b8c9a6ca 100644
--- a/Documentation/scalar.adoc
+++ b/Documentation/scalar.adoc
@@ -214,6 +214,13 @@ am.keepCR=true::
 	and non-Windows platforms and keeping carriage return (`\r`) characters
 	in certain workflows.
 
+checkout.orphanedCommitWarning=false::
+	This disables the reachability check that warns about commits left
+	behind when `git checkout` or `git switch` leaves a detached `HEAD`.
+	The check can be expensive in large repositories. Other checkout
+	output is unchanged, and commits left behind can still be found
+	in the `HEAD` reflog until its entries expire.
+
 commitGraph.changedPaths=true::
 	This setting helps the background maintenance steps that compute the
 	serialized commit-graph to also store changed-path Bloom filters. This
diff --git a/scalar.c b/scalar.c
index a80d8ee3ff..7f851f5610 100644
--- a/scalar.c
+++ b/scalar.c
@@ -138,6 +138,7 @@ static int set_recommended_config(int reconfigure)
 	 */
 	struct scalar_config config[] = {
 		{ "am.keepCR", "true" },
+		{ "checkout.orphanedCommitWarning", "false" },
 		{ "commitGraph.changedPaths", "true" },
 		{ "commitGraph.generationVersion", "1" },
 		{ "core.autoCRLF", "false" },
-- 
gitgitgadget
Previous: Junio C HamanoNext: Derrick Stolee
Message 8 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.