From: jayesh0104 <jayeshdaga99@gmail.com>
To: git@vger.kernel.org
Cc: jayesh0104 <jayeshdaga99@gmail.com>
Subject: [PATCH] t/pack-refs-tests: drop '-f' from test_path_is_missing
Date: Sun, 22 Mar 2026 10:56:10 +0000 [thread overview]
Message-ID: <20260322105625.183804-1-jayeshdaga99@gmail.com> (raw)
test_path_is_missing expects exactly one argument: the path to
check for absence. Passing '-f' is incorrect and results in
"bug in the test script: 1 param" during test execution.
The '-f' flag appears to have been carried over from the
equivalent 'test -f' usage, but test_path_is_missing does not
accept such flags.
Remove the extraneous '-f' to use the helper correctly and
restore proper test behavior.
Signed-off-by: Jayesh Daga <jayeshdaga99@gmail.com>
---
t/pack-refs-tests.sh | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
mode change 100755 => 100644 t/pack-refs-tests.sh
diff --git a/t/pack-refs-tests.sh b/t/pack-refs-tests.sh
old mode 100755
new mode 100644
index fa27d43a58..4a85d96c6b
--- a/t/pack-refs-tests.sh
+++ b/t/pack-refs-tests.sh
@@ -1,9 +1,3 @@
-#!/bin/sh
-
-test_description='test pack-refs'
-
-. ./test-lib.sh
-
pack_refs=${pack_refs:-pack-refs}
test_expect_success 'enable reflogs' '
@@ -119,16 +113,14 @@ test_expect_success 'test excluded refs are not packed' '
git ${pack_refs} --all --exclude "refs/heads/dont_pack*" &&
test -f .git/refs/heads/dont_pack1 &&
test -f .git/refs/heads/dont_pack2 &&
- ! test -f .git/refs/heads/pack_this
-'
+ ! test -f .git/refs/heads/pack_this'
test_expect_success 'test --no-exclude refs clears excluded refs' '
git branch dont_pack3 &&
git branch dont_pack4 &&
git ${pack_refs} --all --exclude "refs/heads/dont_pack*" --no-exclude &&
! test -f .git/refs/heads/dont_pack3 &&
- ! test -f .git/refs/heads/dont_pack4
-'
+ ! test -f .git/refs/heads/dont_pack4'
test_expect_success 'test only included refs are packed' '
git branch pack_this1 &&
@@ -137,16 +129,14 @@ test_expect_success 'test only included refs are packed' '
git ${pack_refs} --include "refs/heads/pack_this*" &&
test -f .git/refs/tags/dont_pack5 &&
! test -f .git/refs/heads/pack_this1 &&
- ! test -f .git/refs/heads/pack_this2
-'
+ ! test -f .git/refs/heads/pack_this2'
test_expect_success 'test --no-include refs clears included refs' '
git branch pack1 &&
git branch pack2 &&
git ${pack_refs} --include "refs/heads/pack*" --no-include &&
test -f .git/refs/heads/pack1 &&
- test -f .git/refs/heads/pack2
-'
+ test -f .git/refs/heads/pack2'
test_expect_success 'test --exclude takes precedence over --include' '
git branch dont_pack5 &&
--
2.43.0
next reply other threads:[~2026-03-22 10:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-22 10:56 jayesh0104 [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-22 13:50 [PATCH] t/pack-refs-tests: drop '-f' from test_path_is_missing Jayesh Daga via GitGitGadget
2026-03-22 14:27 ` K Jayatheerth
2026-03-22 16:37 ` Tian Yuchen
2026-03-24 4:11 ` jayesh0104
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=20260322105625.183804-1-jayeshdaga99@gmail.com \
--to=jayeshdaga99@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox