{"thread":{"id":"65334","subject":"[PATCH] t/t2107-update-index-basic: use test_path_is_missing","startedAt":"2026-03-22T16:40:03Z","lastAt":"2026-03-22T21:55:50Z","messageCount":2,"participants":["Jayesh Daga via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"539654","messageId":"pull.2250.git.git.1774197600379.gitgitgadget@gmail.com","threadId":"65334","inReplyTo":null,"subject":"[PATCH] t/t2107-update-index-basic: use test_path_is_missing","fromName":"Jayesh Daga via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-03-22T16:40:00Z","receivedAt":"2026-03-22T16:40:03Z","isPatch":true,"sender":{"key":"jayeshdaga99@gmail.com","avatar":"https://avatars.githubusercontent.com/u/86013121?v=4"},"body":"From: jayesh0104 <jayeshdaga99@gmail.com>\n\nReplace a raw '! test -f' check with test_path_is_missing to\nuse the standard test helper and improve consistency with\nother tests.\n\nSigned-off-by: Jayesh Daga <jayeshdaga99@gmail.com>\n---\n    [GSoC]: t2107-refs-tests: drop '-f' from test_path_is_missing\n    \n    \n    High-level (Intent & Context)\n    =============================\n    \n    The test script t/pack-refs-tests.sh has two issues that prevent it from\n    running correctly.\n    \n    It uses: ! test -f .git/index.lock\n    \n    This is inconsistent with the Git test framework, where helper functions\n    such as test_path_is_missing should be used instead of raw test checks.\n    \n    \n    Low-level (Implementation & Justification)\n    ==========================================\n    \n    Without sourcing test-lib.sh, the test framework is not initialized,\n    leading to errors such as: test_expect_success: not found\n    \n    Replaced raw file check with the appropriate helper:\n    \n    - ! test -f .git/index.lock\n    + test_path_is_missing .git/index.lock\n    \n    \n    \n    Summary\n    =======\n    \n    Replace test_path_is_missing .git/index.lock\n    \n    cc :Karthik Nayak karthik.188@gmail.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2250%2Fjayesh0104%2Ft2107-missing-helper-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2250/jayesh0104/t2107-missing-helper-v1\nPull-Request: https://github.com/git/git/pull/2250\n\n t/t2107-update-index-basic.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh\nindex cc72ead79f..3bffe5da8a 100755\n--- a/t/t2107-update-index-basic.sh\n+++ b/t/t2107-update-index-basic.sh\n@@ -86,7 +86,7 @@ test_expect_success '.lock files cleaned up' '\n \t# the_index.cache_changed is zero, rollback_lock_file fails\n \tgit update-index --refresh --verbose >out &&\n \ttest_must_be_empty out &&\n-\t! test -f .git/index.lock\n+\ttest_path_is_missing .git/index.lock\n \t)\n '\n \n\nbase-commit: 6e8d538aab8fe4dd07ba9fb87b5c7edcfa5706ad\n-- \ngitgitgadget\n"},{"id":"539676","messageId":"xmqqpl4v7cm4.fsf@gitster.g","threadId":"65334","inReplyTo":"pull.2250.git.git.1774197600379.gitgitgadget@gmail.com","subject":"Re: [PATCH] t/t2107-update-index-basic: use test_path_is_missing","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-22T21:55:47Z","receivedAt":"2026-03-22T21:55:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Jayesh Daga via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: jayesh0104 <jayeshdaga99@gmail.com>\n\nThe author identifier (name and email) used here to identify the\nauthor must match the identifier used to sign-off.  You'd probably\nneed to \"git commit --amend --reset-author\" this commit with updatec\nuser.name set to \"Jayesh Daga\", not \"jayesh0104\" or something.\n\n>\n> Replace a raw '! test -f' check with test_path_is_missing to\n> use the standard test helper and improve consistency with\n> other tests.\n>\n> Signed-off-by: Jayesh Daga <jayeshdaga99@gmail.com>\n> ---\n>  t/t2107-update-index-basic.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh\n> index cc72ead79f..3bffe5da8a 100755\n> --- a/t/t2107-update-index-basic.sh\n> +++ b/t/t2107-update-index-basic.sh\n> @@ -86,7 +86,7 @@ test_expect_success '.lock files cleaned up' '\n>  \t# the_index.cache_changed is zero, rollback_lock_file fails\n>  \tgit update-index --refresh --verbose >out &&\n>  \ttest_must_be_empty out &&\n> -\t! test -f .git/index.lock\n> +\ttest_path_is_missing .git/index.lock\n>  \t)\n>  '\n>  \n>\n> base-commit: 6e8d538aab8fe4dd07ba9fb87b5c7edcfa5706ad\n"}]}