Skip to content

[GSoC]: t2107-refs-tests: drop '-f' from test_path_is_missing#2250

Open
jayesh0104 wants to merge 1 commit intogit:masterfrom
jayesh0104:t2107-missing-helper
Open

[GSoC]: t2107-refs-tests: drop '-f' from test_path_is_missing#2250
jayesh0104 wants to merge 1 commit intogit:masterfrom
jayesh0104:t2107-missing-helper

Conversation

@jayesh0104
Copy link
Copy Markdown

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.lock

This 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:

- ! test -f .git/index.lock
+ test_path_is_missing .git/index.lock

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

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

/submit

@gitgitgadget-git
Copy link
Copy Markdown

Submitted as pull.2250.git.git.1774197600379.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-git-2250/jayesh0104/t2107-missing-helper-v1

To fetch this version to local tag pr-git-2250/jayesh0104/t2107-missing-helper-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-git-2250/jayesh0104/t2107-missing-helper-v1

@gitgitgadget-git
Copy link
Copy Markdown

This branch is now known as ai/t2107-test-path-is-helpers.

@gitgitgadget-git
Copy link
Copy Markdown

This patch series was integrated into seen via bcada48.

@gitgitgadget-git
Copy link
Copy Markdown

This patch series was integrated into next via 56d10e5.

@gitgitgadget-git
Copy link
Copy Markdown

This patch series was integrated into seen via 5eba6db.

@gitgitgadget-git
Copy link
Copy Markdown

This patch series was integrated into seen via 17c2383.

@gitgitgadget-git
Copy link
Copy Markdown

This patch series was integrated into seen via 66289ea.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant