[PATCH 3/3] scalar: disable orphaned commit checks by default
- From
- Wyatt 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