public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Pushkar Singh <pushkarkumarsingh1970@gmail•com>
To: git@vger•kernel.org
Cc: gitster@pobox•com
Subject: [PATCH v2] t1410: use test helpers in reflog rewind test
Date: Sun, 11 Jan 2026 19:07:52 +0000	[thread overview]
Message-ID: <20260111191525.17087-1-pushkarkumarsingh1970@gmail.com> (raw)
In-Reply-To: <xmqqh5ssouub.fsf@gitster.g>

Replace raw `test -f` and `! test -f` checks in the rewind test with
`test_path_is_file` and `test_path_is_missing`. This provides clearer
failure diagnostics and keeps the test consistent with the rest of
the test suite.

Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail•com>
---
 t/t1410-reflog.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index e30f87a358..ce71f9a30a 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -130,10 +130,10 @@ test_expect_success 'pass through -- to sub-command' '
 
 test_expect_success rewind '
 	test_tick && git reset --hard HEAD~2 &&
-	test -f C &&
-	test -f A/B/E &&
-	! test -f F &&
-	! test -f A/G &&
+	test_path_is_file C &&
+	test_path_is_file A/B/E &&
+	test_path_is_missing F &&
+	test_path_is_missing A/G &&
 
 	check_have A B C D E F G H I J K L &&
 
-- 
2.43.0


      reply	other threads:[~2026-01-11 19:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-11 14:03 [PATCH] t1410: check files and missing paths after reflog rewind Pushkar Singh
2026-01-11 18:41 ` Junio C Hamano
2026-01-11 19:07   ` Pushkar Singh [this message]

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=20260111191525.17087-1-pushkarkumarsingh1970@gmail.com \
    --to=pushkarkumarsingh1970@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox