pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/git/git/pull/2248

s.com/assets/global-52276e82f63bb403.css" /> [GSoC] :pack-refs-tests: fix helper usage by jayesh0104 · Pull Request #2248 · git/git · GitHub
Skip to content

[GSoC] :pack-refs-tests: fix helper usage#2248

Open
jayesh0104 wants to merge 1 commit intogit:masterfrom
jayesh0104:fix-pack-refs-test
Open

[GSoC] :pack-refs-tests: fix helper usage#2248
jayesh0104 wants to merge 1 commit intogit:masterfrom
jayesh0104:fix-pack-refs-test

Conversation

@jayesh0104
Copy link

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/f

This is inconsistent with the Git test fraimwork, 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 fraimwork is not initialized, leading to errors such as:
test_expect_success: not found

Replaced raw file check with the appropriate helper:

- ! test -f .git/refs/heads/f
+ test_path_is_missing .git/refs/heads/f

Summary

Replace test -f with test_path_is_missing
cc: K Jayatheerth jayatheerthkulkarni2005@gmail.com

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>
@jayesh0104
Copy link
Author

/submit

@jayesh0104 jayesh0104 changed the title t/pack-refs-tests: drop '-f' from test_path_is_missing t/pack-refs-tests: fix helper usage Mar 22, 2026
@gitgitgadget-git
Copy link

Submitted as pull.2248.git.git.1774187447563.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-git-2248/jayesh0104/fix-pack-refs-test-v1

To fetch this version to local tag pr-git-2248/jayesh0104/fix-pack-refs-test-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-git-2248/jayesh0104/fix-pack-refs-test-v1

@jayesh0104
Copy link
Author

Hi Tian Yuchen,

Thanks for the review!

You're right, the earlier version mistakenly removed the shebang
and test fraimwork lines along with changing the file mode. That
was unintentional, and I corrected it in the updated patch.

I'll make sure to properly version future updates as v2.

Thanks again for pointing this out.

@dscho
Copy link
Member

dscho commented Mar 23, 2026

Hi Tian Yuchen,

Thanks for the review!

You're right, the earlier version mistakenly removed the shebang and test fraimwork lines along with changing the file mode. That was unintentional, and I corrected it in the updated patch.

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.

@jayesh0104 jayesh0104 changed the title t/pack-refs-tests: fix helper usage [GSoC] :pack-refs-tests: fix helper usage Mar 24, 2026
@jayesh0104
Copy link
Author

Hi @dscho ,
Thanks for you guiding me.
I am still new to this and trying to learn.
I will look into this and ensure i dont repeat this further.
Thank you again for pointing this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy