From: Junio C Hamano Date: Wed, 11 Nov 2026 18:52:32 GMT Subject: Re: [PATCH 2/3] checkout: advise when orphaned commit checks are slow Message-ID: In-Reply-To: "Wyatt Holden via GitGitGadget" 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"