Conversation
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]>
|
/submit |
|
Submitted as [email protected] To fetch this version into To fetch this version to local tag |
|
Hi Tian Yuchen, Thanks for the review! You're right, the earlier version mistakenly removed the shebang I'll make sure to properly version future updates as v2. Thanks again for pointing this out. |
@jayesh0104 Unfortunately, this won't reach the intended recipient. You will have to follow the instructions in https://gitgitgadget.github.io/reply-to-this to send your reply. |
High-level (Intent & Context)
The test script t/pack-refs-tests.sh has two issues that prevent it from running correctly.
It uses:
! test -f .git/refs/heads/fThis is inconsistent with the Git test framework, where helper functions such as test_path_is_missing should be used instead of raw test checks.
Low-level (Implementation & Justification)
Without sourcing test-lib.sh, the test framework is not initialized, leading to errors such as:
test_expect_success: not foundReplaced raw file check with the appropriate helper:
Summary
Replace test -f with test_path_is_missing
cc: K Jayatheerth [email protected]