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

Re: [PATCH 2/3] checkout: advise when orphaned commit checks are slow

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 11, 2026, 18:52 UTC
Message-ID
<xmqqtslnmc9b.fsf@gitster.g>
In-Reply-To
<a9b81eb87684fa9bfbc83e845eb67ded8d7cb6d9.1794337920.git.gitgitgadget@gmail.com>
"Wyatt Holden via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 17 quoted lines
> diff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh
> index d21dbd5b72..7dfaaab1b8 100755
> --- a/t/t2020-checkout-detach.sh
> +++ b/t/t2020-checkout-detach.sh
> @@ -186,6 +186,46 @@ do
>  		check_not_detached
>  	'
>  
> +	test_expect_success "$command advises when the orphan check is slow" '
> +		git checkout --detach "$orphan2" &&
> +		GIT_TEST_CHECKOUT_DELAY_WARNING=true \
> +			git $command main 2>stderr &&
> +		check_orphan_warning stderr "2 commits" &&
> +		test_grep -E "^hint: Checking for orphaned commits took [0-9]+[.][0-9]{2} seconds[.]$" stderr &&
> +		test_grep "git config set checkout.orphanedCommitWarning false" stderr &&
> +		test_grep "git config set advice.checkoutOrphanedCommitWarning false" stderr
> +	'

This test will not pass in the modern world where the advice message suggests to use "git config set --global advice.FOO false".

It probably makes sense to grep for something looser like
	"git config .* advice\.checkoutOrphanedCommitWarning"
Previous: Junio C HamanoNext: Wyatt Holden via GitGitGadget
Message 7 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.