{"thread":{"id":"65293","subject":"[PATCH] t2107: modernize path existence check","startedAt":"2026-03-18T18:12:38Z","lastAt":"2026-03-19T15:39:59Z","messageCount":9,"participants":["QUANTUM via GitGitGadget","Junio C Hamano","Pablo","Aditya Indora"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"539304","messageId":"pull.2071.git.1773857555312.gitgitgadget@gmail.com","threadId":"65293","inReplyTo":null,"subject":"[PATCH] t2107: modernize path existence check","fromName":"QUANTUM via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-03-18T18:12:35Z","receivedAt":"2026-03-18T18:12:38Z","isPatch":true,"sender":{"key":"name:QUANTUM","avatar":null},"body":"From: Aditya <adityabnw07@gmail.com>\n\nReplace '! test -f' with 'test_path_is_missing' for better\ndebugging information when the assertion fails.\n\nFound using: git grep \"test -[efd]\" t/t????-*.sh\n\nSigned-off-by: Aditya <adityabnw07@gmail.com>\n---\n    [GSoC] t2107: modernize path existence check\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2071%2FQuantumDev-CERN%2Fgsoc-microproject-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2071/QuantumDev-CERN/gsoc-microproject-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2071\n\n t/t2107-update-index-basic.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh\nindex cc72ead79f..3bffe5da8a 100755\n--- a/t/t2107-update-index-basic.sh\n+++ b/t/t2107-update-index-basic.sh\n@@ -86,7 +86,7 @@ test_expect_success '.lock files cleaned up' '\n \t# the_index.cache_changed is zero, rollback_lock_file fails\n \tgit update-index --refresh --verbose >out &&\n \ttest_must_be_empty out &&\n-\t! test -f .git/index.lock\n+\ttest_path_is_missing .git/index.lock\n \t)\n '\n \n\nbase-commit: ca1db8a0f7dc0dbea892e99f5b37c5fe5861be71\n-- \ngitgitgadget\n"},{"id":"539307","messageId":"xmqq7br9q8d6.fsf@gitster.g","threadId":"65293","inReplyTo":"pull.2071.git.1773857555312.gitgitgadget@gmail.com","subject":"Re: [PATCH] t2107: modernize path existence check","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-18T18:51:17Z","receivedAt":"2026-03-18T18:51:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"QUANTUM via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Aditya <adityabnw07@gmail.com>\n>\n> Replace '! test -f' with 'test_path_is_missing' for better\n> debugging information when the assertion fails.\n\nOK.\n\n> Found using: git grep \"test -[efd]\" t/t????-*.sh\n\nPeople seem to add the above to their test-path helper patches, but\nunless the coverage of the work is fairly thorough and you want to\nsay \"all the similar issues should be found with this command and I\naddressed all of them\", I do not see much point saying how you found\none of them and addressed it.\n\n>\n> Signed-off-by: Aditya <adityabnw07@gmail.com>\n> ---\n>     [GSoC] t2107: modernize path existence check\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2071%2FQuantumDev-CERN%2Fgsoc-microproject-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2071/QuantumDev-CERN/gsoc-microproject-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/2071\n>\n>  t/t2107-update-index-basic.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh\n> index cc72ead79f..3bffe5da8a 100755\n> --- a/t/t2107-update-index-basic.sh\n> +++ b/t/t2107-update-index-basic.sh\n> @@ -86,7 +86,7 @@ test_expect_success '.lock files cleaned up' '\n>  \t# the_index.cache_changed is zero, rollback_lock_file fails\n>  \tgit update-index --refresh --verbose >out &&\n>  \ttest_must_be_empty out &&\n> -\t! test -f .git/index.lock\n> +\ttest_path_is_missing .git/index.lock\n>  \t)\n>  '\n>  \n>\n> base-commit: ca1db8a0f7dc0dbea892e99f5b37c5fe5861be71\n"},{"id":"539308","messageId":"CAN5EUNTNqC6+FPjKafoFfgaEzWdpXEV0QNwumF8CaxBEUOmA6Q@mail.gmail.com","threadId":"65293","inReplyTo":"pull.2071.git.1773857555312.gitgitgadget@gmail.com","subject":"Re: [PATCH] t2107: modernize path existence check","fromName":"Pablo","fromEmail":"pabloosabaterr@gmail.com","sentAt":"2026-03-18T18:58:41Z","receivedAt":"2026-03-18T18:58:59Z","isPatch":true,"sender":{"key":"pabloosabaterr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/63864637?v=4"},"body":"Aditya <adityabnw07@gmail.com> writes:\n\n> Replace '! test -f' with 'test_path_is_missing' for better\n> debugging information when the assertion fails.\n\nThis seems fine but it could add more about why it is better,\nsomething like: by reporting loudly what expectation was not met.\nAlso, If this is for GSoC when submitting the patches or anything\nrelevant to GSoC contributions add to the prefix with PATCH something\nlike: [GSoC PATCH] and CC your possible co-mentors. Read [1].\n\n> Found using: git grep \"test -[efd]\" t/t????-*.sh\n\nAs Junio said in other microprojects reviews, including the search\ncommand it's not very useful when you only address one instance.\n\n[1]: https://git.github.io/General-Microproject-Information/ \"about\nmicroprojects information\"\n\n> Signed-off-by: Aditya <adityabnw07@gmail.com>\n> ---\n>     [GSoC] t2107: modernize path existence check\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2071%2FQuantumDev-CERN%2Fgsoc-microproject-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2071/QuantumDev-CERN/gsoc-microproject-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/2071\n>\n>  t/t2107-update-index-basic.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh\n> index cc72ead79f..3bffe5da8a 100755\n> --- a/t/t2107-update-index-basic.sh\n> +++ b/t/t2107-update-index-basic.sh\n> @@ -86,7 +86,7 @@ test_expect_success '.lock files cleaned up' '\n>         # the_index.cache_changed is zero, rollback_lock_file fails\n>         git update-index --refresh --verbose >out &&\n>         test_must_be_empty out &&\n> -       ! test -f .git/index.lock\n> +       test_path_is_missing .git/index.lock\n>         )\n>  '\n\nLooks fine to me.\n\n>\n>\n> base-commit: ca1db8a0f7dc0dbea892e99f5b37c5fe5861be71\n> --\n> gitgitgadget\n>\n"},{"id":"539310","messageId":"CAN5EUNQOrBC9o8go=Vehzyzt4R_1eN2Hn5Q8t+E7am9fRc8_sg@mail.gmail.com","threadId":"65293","inReplyTo":"xmqq7br9q8d6.fsf@gitster.g","subject":"Re: [PATCH] t2107: modernize path existence check","fromName":"Pablo","fromEmail":"pabloosabaterr@gmail.com","sentAt":"2026-03-18T19:03:13Z","receivedAt":"2026-03-18T19:03:32Z","isPatch":true,"sender":{"key":"pabloosabaterr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/63864637?v=4"},"body":"Junio C Hamano (<gitster@pobox.com>) writes:\n>\n> \"QUANTUM via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> > From: Aditya <adityabnw07@gmail.com>\n> >\n> > Replace '! test -f' with 'test_path_is_missing' for better\n> > debugging information when the assertion fails.\n>\n> OK.\n>\n> > Found using: git grep \"test -[efd]\" t/t????-*.sh\n>\n> People seem to add the above to their test-path helper patches, but\n> unless the coverage of the work is fairly thorough and you want to\n> say \"all the similar issues should be found with this command and I\n> addressed all of them\", I do not see much point saying how you found\n> one of them and addressed it.\n\nI think it is because of how it is explained on Ideas for microprojects [1].\nIt is written:\n\n    Steps to Complete\n\n    Find a test script using old-style path checks:\n\n    git grep \"test -[efd]\" t/\n\nand later says \"Include which command you used to find the instances\nin your commit message\"\n\n[1]: https://git.github.io/SoC-2026-Microprojects/ \"Ideas for microprojects\"\n\n>\n> >\n> > Signed-off-by: Aditya <adityabnw07@gmail.com>\n> > ---\n> >     [GSoC] t2107: modernize path existence check\n> >\n> > Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2071%2FQuantumDev-CERN%2Fgsoc-microproject-v1\n> > Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2071/QuantumDev-CERN/gsoc-microproject-v1\n> > Pull-Request: https://github.com/gitgitgadget/git/pull/2071\n> >\n> >  t/t2107-update-index-basic.sh | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh\n> > index cc72ead79f..3bffe5da8a 100755\n> > --- a/t/t2107-update-index-basic.sh\n> > +++ b/t/t2107-update-index-basic.sh\n> > @@ -86,7 +86,7 @@ test_expect_success '.lock files cleaned up' '\n> >       # the_index.cache_changed is zero, rollback_lock_file fails\n> >       git update-index --refresh --verbose >out &&\n> >       test_must_be_empty out &&\n> > -     ! test -f .git/index.lock\n> > +     test_path_is_missing .git/index.lock\n> >       )\n> >  '\n> >\n> >\n> > base-commit: ca1db8a0f7dc0dbea892e99f5b37c5fe5861be71\n>\n"},{"id":"539317","messageId":"CAP6n+1V6b8Kf_jci=ZMX7=HNH85nX+z1FffFzy1hYgaoySPNDg@mail.gmail.com","threadId":"65293","inReplyTo":"CAN5EUNQOrBC9o8go=Vehzyzt4R_1eN2Hn5Q8t+E7am9fRc8_sg@mail.gmail.com","subject":"Re: [PATCH] t2107: modernize path existence check","fromName":"Aditya Indora","fromEmail":"adityabnw07@gmail.com","sentAt":"2026-03-18T20:05:21Z","receivedAt":"2026-03-18T20:05:34Z","isPatch":true,"sender":{"key":"adityabnw07@gmail.com","avatar":"https://avatars.githubusercontent.com/u/213138929?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> People seem to add the above to their test-path helper patches, but\n> unless the coverage of the work is fairly thorough and you want to\n> say \"all the similar issues should be found with this command and I\n> addressed all of them\", I do not see much point saying how you found\n> one of them and addressed it.\n\nUnderstood. Will remove in v2.\n\nPablo <pabloosabaterr@gmail.com> writes:\n\n> This seems fine but it could add more about why it is better,\n> something like: by reporting loudly what expectation was not met.\n\nGood point. Will expand the description in v2.\n\n> I think it is because of how it is explained on Ideas for\n> microprojects [1].\n\nYes, that was the reason. Thanks for pointing it out.\n"},{"id":"539318","messageId":"pull.2071.v2.git.1773864455956.gitgitgadget@gmail.com","threadId":"65293","inReplyTo":"pull.2071.git.1773857555312.gitgitgadget@gmail.com","subject":"[PATCH v2] t2107: modernize path existence check","fromName":"QUANTUM via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-03-18T20:07:35Z","receivedAt":"2026-03-18T20:07:39Z","isPatch":true,"sender":{"key":"name:QUANTUM","avatar":null},"body":"From: Aditya <adityabnw07@gmail.com>\n\nReplace '! test -f' with 'test_path_is_missing' to get better\ndebugging information by reporting loudly what expectation was\nnot met when the assertion fails.\n\nSigned-off-by: Aditya <adityabnw07@gmail.com>\n---\n    [GSoC PATCH] t2107: modernize path existence check\n    \n    CC: Pablo Sabater pabloosabaterr@gmail.com, Christian Couder\n    christian.couder@gmail.com, Karthik Nayak karthik.188@gmail.com, Justin\n    Tobler jltobler@gmail.com, Ayush Chandekar ayu.chandekar@gmail.com,\n    Siddharth Asthana siddharthasthana31@gmail.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2071%2FQuantumDev-CERN%2Fgsoc-microproject-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2071/QuantumDev-CERN/gsoc-microproject-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/2071\n\nRange-diff vs v1:\n\n 1:  264040c6a8 ! 1:  6ed91f8d9b t2107: modernize path existence check\n     @@ Metadata\n       ## Commit message ##\n          t2107: modernize path existence check\n      \n     -    Replace '! test -f' with 'test_path_is_missing' for better\n     -    debugging information when the assertion fails.\n     -\n     -    Found using: git grep \"test -[efd]\" t/t????-*.sh\n     +    Replace '! test -f' with 'test_path_is_missing' to get better\n     +    debugging information by reporting loudly what expectation was\n     +    not met when the assertion fails.\n      \n          Signed-off-by: Aditya <adityabnw07@gmail.com>\n     +    ---\n     +    v2:\n     +     - remove \"Found using\" line\n     +     - expand description to mention reporting behavior\n      \n       ## t/t2107-update-index-basic.sh ##\n      @@ t/t2107-update-index-basic.sh: test_expect_success '.lock files cleaned up' '\n\n\nv2:\n - remove \"Found using\" line\n - expand description to mention reporting behavior\n---\n t/t2107-update-index-basic.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh\nindex cc72ead79f..3bffe5da8a 100755\n--- a/t/t2107-update-index-basic.sh\n+++ b/t/t2107-update-index-basic.sh\n@@ -86,7 +86,7 @@ test_expect_success '.lock files cleaned up' '\n \t# the_index.cache_changed is zero, rollback_lock_file fails\n \tgit update-index --refresh --verbose >out &&\n \ttest_must_be_empty out &&\n-\t! test -f .git/index.lock\n+\ttest_path_is_missing .git/index.lock\n \t)\n '\n \n\nbase-commit: ca1db8a0f7dc0dbea892e99f5b37c5fe5861be71\n-- \ngitgitgadget\n"},{"id":"539320","messageId":"xmqqtsucq4l2.fsf@gitster.g","threadId":"65293","inReplyTo":"pull.2071.v2.git.1773864455956.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] t2107: modernize path existence check","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-18T20:12:57Z","receivedAt":"2026-03-18T20:13:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"QUANTUM via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Aditya <adityabnw07@gmail.com>\n>\n> Replace '! test -f' with 'test_path_is_missing' to get better\n> debugging information by reporting loudly what expectation was\n> not met when the assertion fails.\n>\n> Signed-off-by: Aditya <adityabnw07@gmail.com>\n> ---\n\nSo we've seen you identify yourself as quantum, aditya, and aditya\nindora; which one do you want to be known as to this community?\n\ncf. Documentation/SubmittingPatches:[[dco/real-name]]\n"},{"id":"539351","messageId":"CAP6n+1U9UHp8B_DXLJu6d1tsSo1qCuKXdH0tQjXXj9wp01iHtA@mail.gmail.com","threadId":"65293","inReplyTo":"CAP6n+1Uj6sd75ENFY8=7NtcOUehTjY86YQV9YOWgdOqfmFHYPw@mail.gmail.com","subject":"Re: [PATCH v2] t2107: modernize path existence check","fromName":"Aditya Indora","fromEmail":"adityabnw07@gmail.com","sentAt":"2026-03-19T05:35:29Z","receivedAt":"2026-03-19T05:35:42Z","isPatch":true,"sender":{"key":"adityabnw07@gmail.com","avatar":"https://avatars.githubusercontent.com/u/213138929?v=4"},"body":"> On Thu, 19 Mar, 2026, 1:43 am Junio C Hamano, <gitster@pobox.com> wrote:\n>>\n>> So we've seen you identify yourself as quantum, aditya, and aditya\n>> indora; which one do you want to be known as to this community?.\n\nquantum is just my github username inspired from steins gate anime, my\nfirst name is aditya and last name is indora , i want to be known as\naditya to this community .\n"},{"id":"539390","messageId":"CAP6n+1W2tr-WW401MkVTE_tEHnp4Cabe2EOb9=pwjRWraiCRWw@mail.gmail.com","threadId":"65293","inReplyTo":"CAP6n+1U9UHp8B_DXLJu6d1tsSo1qCuKXdH0tQjXXj9wp01iHtA@mail.gmail.com","subject":"Re: [PATCH v2] t2107: modernize path existence check","fromName":"Aditya Indora","fromEmail":"adityabnw07@gmail.com","sentAt":"2026-03-19T15:39:45Z","receivedAt":"2026-03-19T15:39:59Z","isPatch":true,"sender":{"key":"adityabnw07@gmail.com","avatar":"https://avatars.githubusercontent.com/u/213138929?v=4"},"body":"Hi Junio,\nI have submitted my patch v2, in this thread please tell if any other\nchanges need to be made or is it being queued.\nThanks\n\nOn Thu, Mar 19, 2026 at 11:05 AM Aditya Indora <adityabnw07@gmail.com> wrote:\n>\n> > On Thu, 19 Mar, 2026, 1:43 am Junio C Hamano, <gitster@pobox.com> wrote:\n> >>\n> >> So we've seen you identify yourself as quantum, aditya, and aditya\n> >> indora; which one do you want to be known as to this community?.\n>\n> quantum is just my github username inspired from steins gate anime, my\n> first name is aditya and last name is indora , i want to be known as\n> aditya to this community .\n"}]}