From: "QUANTUM via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: QUANTUM <adityabnw07@gmail.com>, Aditya <adityabnw07@gmail.com>
Subject: [PATCH v2] t2107: modernize path existence check
Date: Wed, 18 Mar 2026 20:07:35 +0000 [thread overview]
Message-ID: <pull.2071.v2.git.1773864455956.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2071.git.1773857555312.gitgitgadget@gmail.com>
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
next prev parent reply other threads:[~2026-03-18 20:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` QUANTUM via GitGitGadget [this message]
2026-03-18 20:12 ` [PATCH v2] " 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
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=pull.2071.v2.git.1773864455956.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=adityabnw07@gmail.com \
--cc=git@vger.kernel.org \
/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.