t/pack-refs-tests: drop '-f' from test_path_is_missing
PATCH 1/1 t/pack-refs-tests: drop '-f' from test_path_is_missing
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 <[email protected]>
--- t/pack-refs-tests.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) mode change 100755 => 100644 t/pack-refs-tests.sh
t/pack-refs-tests.sh +4 -14
@@ -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 &&
Signature · 1 line
2.43.0