* [PATCH] t2107: modernize path existence check
@ 2026-03-18 18:12 QUANTUM via GitGitGadget
2026-03-18 18:51 ` Junio C Hamano
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: QUANTUM via GitGitGadget @ 2026-03-18 18:12 UTC (permalink / raw)
To: git; +Cc: QUANTUM, Aditya
From: Aditya <adityabnw07@gmail.com>
Replace '! test -f' with 'test_path_is_missing' for better
debugging information when the assertion fails.
Found using: git grep "test -[efd]" t/t????-*.sh
Signed-off-by: Aditya <adityabnw07@gmail.com>
---
[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
--
gitgitgadget
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] t2107: modernize path existence check
2026-03-18 18:12 [PATCH] t2107: modernize path existence check QUANTUM via GitGitGadget
@ 2026-03-18 18:51 ` Junio C Hamano
2026-03-18 19:03 ` Pablo
2026-03-18 18:58 ` Pablo
2026-03-18 20:07 ` [PATCH v2] " QUANTUM via GitGitGadget
2 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2026-03-18 18:51 UTC (permalink / raw)
To: QUANTUM via GitGitGadget; +Cc: git, QUANTUM
"QUANTUM via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Aditya <adityabnw07@gmail.com>
>
> 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.
>
> Signed-off-by: Aditya <adityabnw07@gmail.com>
> ---
> [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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] t2107: modernize path existence check
2026-03-18 18:12 [PATCH] t2107: modernize path existence check QUANTUM via GitGitGadget
2026-03-18 18:51 ` Junio C Hamano
@ 2026-03-18 18:58 ` Pablo
2026-03-18 20:07 ` [PATCH v2] " QUANTUM via GitGitGadget
2 siblings, 0 replies; 9+ messages in thread
From: Pablo @ 2026-03-18 18:58 UTC (permalink / raw)
To: QUANTUM via GitGitGadget; +Cc: git, QUANTUM
Aditya <adityabnw07@gmail.com> writes:
> Replace '! test -f' with 'test_path_is_missing' for better
> debugging information when the assertion fails.
This seems fine but it could add more about why it is better,
something like: by reporting loudly what expectation was not met.
Also, If this is for GSoC when submitting the patches or anything
relevant to GSoC contributions add to the prefix with PATCH something
like: [GSoC PATCH] and CC your possible co-mentors. Read [1].
> Found using: git grep "test -[efd]" t/t????-*.sh
As Junio said in other microprojects reviews, including the search
command it's not very useful when you only address one instance.
[1]: https://git.github.io/General-Microproject-Information/ "about
microprojects information"
> Signed-off-by: Aditya <adityabnw07@gmail.com>
> ---
> [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
> )
> '
Looks fine to me.
>
>
> base-commit: ca1db8a0f7dc0dbea892e99f5b37c5fe5861be71
> --
> gitgitgadget
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] t2107: modernize path existence check
2026-03-18 18:51 ` Junio C Hamano
@ 2026-03-18 19:03 ` Pablo
2026-03-18 20:05 ` Aditya Indora
0 siblings, 1 reply; 9+ messages in thread
From: Pablo @ 2026-03-18 19:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: QUANTUM via GitGitGadget, git, QUANTUM
Junio C Hamano (<gitster@pobox.com>) writes:
>
> "QUANTUM via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: Aditya <adityabnw07@gmail.com>
> >
> > 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 <adityabnw07@gmail.com>
> > ---
> > [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
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] t2107: modernize path existence check
2026-03-18 19:03 ` Pablo
@ 2026-03-18 20:05 ` Aditya Indora
0 siblings, 0 replies; 9+ messages in thread
From: Aditya Indora @ 2026-03-18 20:05 UTC (permalink / raw)
To: Pablo; +Cc: Junio C Hamano, QUANTUM via GitGitGadget, git
Junio C Hamano <gitster@pobox.com> writes:
> 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.
Understood. Will remove in v2.
Pablo <pabloosabaterr@gmail.com> writes:
> This seems fine but it could add more about why it is better,
> something like: by reporting loudly what expectation was not met.
Good point. Will expand the description in v2.
> I think it is because of how it is explained on Ideas for
> microprojects [1].
Yes, that was the reason. Thanks for pointing it out.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] t2107: modernize path existence check
2026-03-18 18:12 [PATCH] t2107: modernize path existence check QUANTUM via GitGitGadget
2026-03-18 18:51 ` Junio C Hamano
2026-03-18 18:58 ` Pablo
@ 2026-03-18 20:07 ` QUANTUM via GitGitGadget
2026-03-18 20:12 ` Junio C Hamano
2 siblings, 1 reply; 9+ messages in thread
From: QUANTUM via GitGitGadget @ 2026-03-18 20:07 UTC (permalink / raw)
To: git; +Cc: QUANTUM, Aditya
From: Aditya <adityabnw07@gmail.com>
Replace '! test -f' with 'test_path_is_missing' to get better
debugging information by reporting loudly what expectation was
not met when the assertion fails.
Signed-off-by: Aditya <adityabnw07@gmail.com>
---
[GSoC PATCH] t2107: modernize path existence check
CC: Pablo Sabater pabloosabaterr@gmail.com, Christian Couder
christian.couder@gmail.com, Karthik Nayak karthik.188@gmail.com, Justin
Tobler jltobler@gmail.com, Ayush Chandekar ayu.chandekar@gmail.com,
Siddharth Asthana siddharthasthana31@gmail.com
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2071%2FQuantumDev-CERN%2Fgsoc-microproject-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2071/QuantumDev-CERN/gsoc-microproject-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/2071
Range-diff vs v1:
1: 264040c6a8 ! 1: 6ed91f8d9b t2107: modernize path existence check
@@ Metadata
## Commit message ##
t2107: modernize path existence check
- Replace '! test -f' with 'test_path_is_missing' for better
- debugging information when the assertion fails.
-
- Found using: git grep "test -[efd]" t/t????-*.sh
+ Replace '! test -f' with 'test_path_is_missing' to get better
+ debugging information by reporting loudly what expectation was
+ not met when the assertion fails.
Signed-off-by: Aditya <adityabnw07@gmail.com>
+ ---
+ v2:
+ - remove "Found using" line
+ - expand description to mention reporting behavior
## t/t2107-update-index-basic.sh ##
@@ t/t2107-update-index-basic.sh: test_expect_success '.lock files cleaned up' '
v2:
- remove "Found using" line
- expand description to mention reporting behavior
---
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
--
gitgitgadget
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2] t2107: modernize path existence check
2026-03-18 20:07 ` [PATCH v2] " QUANTUM via GitGitGadget
@ 2026-03-18 20:12 ` Junio C Hamano
[not found] ` <CAP6n+1Uj6sd75ENFY8=7NtcOUehTjY86YQV9YOWgdOqfmFHYPw@mail.gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2026-03-18 20:12 UTC (permalink / raw)
To: QUANTUM via GitGitGadget; +Cc: git, QUANTUM
"QUANTUM via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Aditya <adityabnw07@gmail.com>
>
> Replace '! test -f' with 'test_path_is_missing' to get better
> debugging information by reporting loudly what expectation was
> not met when the assertion fails.
>
> Signed-off-by: Aditya <adityabnw07@gmail.com>
> ---
So we've seen you identify yourself as quantum, aditya, and aditya
indora; which one do you want to be known as to this community?
cf. Documentation/SubmittingPatches:[[dco/real-name]]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] t2107: modernize path existence check
[not found] ` <CAP6n+1Uj6sd75ENFY8=7NtcOUehTjY86YQV9YOWgdOqfmFHYPw@mail.gmail.com>
@ 2026-03-19 5:35 ` Aditya Indora
2026-03-19 15:39 ` Aditya Indora
0 siblings, 1 reply; 9+ messages in thread
From: Aditya Indora @ 2026-03-19 5:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: QUANTUM via GitGitGadget, git
> On Thu, 19 Mar, 2026, 1:43 am Junio C Hamano, <gitster@pobox.com> wrote:
>>
>> So we've seen you identify yourself as quantum, aditya, and aditya
>> indora; which one do you want to be known as to this community?.
quantum is just my github username inspired from steins gate anime, my
first name is aditya and last name is indora , i want to be known as
aditya to this community .
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] t2107: modernize path existence check
2026-03-19 5:35 ` Aditya Indora
@ 2026-03-19 15:39 ` Aditya Indora
0 siblings, 0 replies; 9+ messages in thread
From: Aditya Indora @ 2026-03-19 15:39 UTC (permalink / raw)
To: Junio C Hamano; +Cc: QUANTUM via GitGitGadget, git
Hi Junio,
I have submitted my patch v2, in this thread please tell if any other
changes need to be made or is it being queued.
Thanks
On Thu, Mar 19, 2026 at 11:05 AM Aditya Indora <adityabnw07@gmail.com> wrote:
>
> > On Thu, 19 Mar, 2026, 1:43 am Junio C Hamano, <gitster@pobox.com> wrote:
> >>
> >> So we've seen you identify yourself as quantum, aditya, and aditya
> >> indora; which one do you want to be known as to this community?.
>
> quantum is just my github username inspired from steins gate anime, my
> first name is aditya and last name is indora , i want to be known as
> aditya to this community .
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-03-19 15:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 18:12 [PATCH] t2107: modernize path existence check QUANTUM via GitGitGadget
2026-03-18 18:51 ` Junio C Hamano
2026-03-18 19:03 ` Pablo
2026-03-18 20:05 ` Aditya Indora
2026-03-18 18:58 ` Pablo
2026-03-18 20:07 ` [PATCH v2] " QUANTUM via GitGitGadget
2026-03-18 20:12 ` Junio C Hamano
[not found] ` <CAP6n+1Uj6sd75ENFY8=7NtcOUehTjY86YQV9YOWgdOqfmFHYPw@mail.gmail.com>
2026-03-19 5:35 ` Aditya Indora
2026-03-19 15:39 ` Aditya Indora
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox