All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Wyatt Holden via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  stolee@gmail.com,  wyattj.holden@gmail.com,
	 Wyatt Holden <wyattholden@microsoft.com>
Subject: Re: [PATCH 2/3] checkout: advise when orphaned commit checks are slow
Date: Wed, 11 Nov 2026 10:52:32 -0800	[thread overview]
Message-ID: <xmqqtslnmc9b.fsf@gitster.g> (raw)
In-Reply-To: <a9b81eb87684fa9bfbc83e845eb67ded8d7cb6d9.1794337920.git.gitgitgadget@gmail.com> (Wyatt Holden via GitGitGadget's message of "Tue, 10 Nov 2026 19:11:59 +0000")

"Wyatt Holden via GitGitGadget" <gitgitgadget@gmail.com> writes:

> 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"





  parent reply	other threads:[~2026-11-11 18:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 19:11 [PATCH 0/3] Make orphaned commit checks configurable Wyatt Holden via GitGitGadget
2026-11-10 19:11 ` [PATCH 1/3] checkout: make " Wyatt Holden via GitGitGadget
2026-11-10 22:05   ` Junio C Hamano
2026-11-10 19:11 ` [PATCH 2/3] checkout: advise when orphaned commit checks are slow Wyatt Holden via GitGitGadget
2026-11-10 20:48   ` Derrick Stolee
2026-11-10 22:22     ` Junio C Hamano
2026-11-11 18:52   ` Junio C Hamano [this message]
2026-11-10 19:12 ` [PATCH 3/3] scalar: disable orphaned commit checks by default Wyatt Holden via GitGitGadget
2026-11-10 20:57 ` [PATCH 0/3] Make orphaned commit checks configurable Derrick Stolee
2026-11-10 22:29 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqtslnmc9b.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=stolee@gmail.com \
    --cc=wyattholden@microsoft.com \
    --cc=wyattj.holden@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.