[GSoC]: t2107-refs-tests: drop '-f' from test_path_is_missing#2250
Open
jayesh0104 wants to merge 1 commit intogit:masterfrom
Open
[GSoC]: t2107-refs-tests: drop '-f' from test_path_is_missing#2250jayesh0104 wants to merge 1 commit intogit:masterfrom
jayesh0104 wants to merge 1 commit intogit:masterfrom
Conversation
Replace a raw '! test -f' check with test_path_is_missing to use the standard test helper and improve consistency with other tests. Signed-off-by: Jayesh Daga <jayeshdaga99@gmail.com>
Author
|
/submit |
|
Submitted as pull.2250.git.git.1774197600379.gitgitgadget@gmail.com To fetch this version into To fetch this version to local tag |
|
This branch is now known as |
|
This patch series was integrated into seen via bcada48. |
|
This patch series was integrated into next via 56d10e5. |
|
This patch series was integrated into seen via 5eba6db. |
|
This patch series was integrated into seen via 17c2383. |
|
This patch series was integrated into seen via 66289ea. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/index.lockThis 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 found
Replaced raw file check with the appropriate helper:
Summary
Replace test_path_is_missing .git/index.lock
cc :Karthik Nayak karthik.188@gmail.com
cc: Justin Tobler jltobler@gmail.com
cc: Ayush Chandekar ayu.chandekar@gmail.com
cc: Siddharth Asthana siddharthasthana31@gmail.com