From: Pablo Date: Wed, 18 Mar 2026 19:03:13 GMT Subject: Re: [PATCH] t2107: modernize path existence check Message-ID: In-Reply-To: Junio C Hamano () writes: > > "QUANTUM via GitGitGadget" writes: > > > From: Aditya > > > > Replace '! test -f' with 'test_path_is_missing' for better > > debugging information when the assertion fails. > > OK. > > > Found using: git grep "test -[efd]" t/t????-*.sh > > People seem to add the above to their test-path helper patches, but > unless the coverage of the work is fairly thorough and you want to > say "all the similar issues should be found with this command and I > addressed all of them", I do not see much point saying how you found > one of them and addressed it. I think it is because of how it is explained on Ideas for microprojects [1]. It is written: Steps to Complete Find a test script using old-style path checks: git grep "test -[efd]" t/ and later says "Include which command you used to find the instances in your commit message" [1]: https://git.github.io/SoC-2026-Microprojects/ "Ideas for microprojects" > > > > > Signed-off-by: Aditya > > --- > > [GSoC] t2107: modernize path existence check > > > > Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2071%2FQuantumDev-CERN%2Fgsoc-microproject-v1 > > Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2071/QuantumDev-CERN/gsoc-microproject-v1 > > Pull-Request: https://github.com/gitgitgadget/git/pull/2071 > > > > t/t2107-update-index-basic.sh | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh > > index cc72ead79f..3bffe5da8a 100755 > > --- a/t/t2107-update-index-basic.sh > > +++ b/t/t2107-update-index-basic.sh > > @@ -86,7 +86,7 @@ test_expect_success '.lock files cleaned up' ' > > # the_index.cache_changed is zero, rollback_lock_file fails > > git update-index --refresh --verbose >out && > > test_must_be_empty out && > > - ! test -f .git/index.lock > > + test_path_is_missing .git/index.lock > > ) > > ' > > > > > > base-commit: ca1db8a0f7dc0dbea892e99f5b37c5fe5861be71 >