{"thread":{"id":"65191","subject":"[PATCH] t7605: use test_path_is_file instead of test -f","startedAt":"2026-03-10T05:33:36Z","lastAt":"2026-03-10T22:50:24Z","messageCount":3,"participants":["Mansi Singh via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"538361","messageId":"pull.2067.git.1773120813628.gitgitgadget@gmail.com","threadId":"65191","inReplyTo":null,"subject":"[PATCH] t7605: use test_path_is_file instead of test -f","fromName":"Mansi Singh via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-03-10T05:33:33Z","receivedAt":"2026-03-10T05:33:36Z","isPatch":true,"sender":{"key":"mansimaanu8627@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40687671?v=4"},"body":"From: Mansi <mansimaanu8627@gmail.com>\n\nReplace old-style 'test -f' path checks with the modern\ntest_path_is_file helper in the merge_c1_to_c2_cmds block.\n\nThe helper provides clearer failure messages and is the\nestablished convention in Git's test suite.\n\nThese instances were found using:\n  grep -rn \"test -[efd]\" t/ --include=\"*.sh\"\n\nSigned-off-by: Mansi <mansimaanu8627@gmail.com>\n---\n    t7605: use test_path_is_file instead of test -f\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2067%2FMansiSingh17%2Ffix-t7605-test-path-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2067/MansiSingh17/fix-t7605-test-path-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2067\n\n t/t7605-merge-resolve.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t7605-merge-resolve.sh b/t/t7605-merge-resolve.sh\nindex 5d56c38546..44de97a480 100755\n--- a/t/t7605-merge-resolve.sh\n+++ b/t/t7605-merge-resolve.sh\n@@ -34,9 +34,9 @@ merge_c1_to_c2_cmds='\n \ttest \"$(git rev-parse c1)\" = \"$(git rev-parse HEAD^1)\" &&\n \ttest \"$(git rev-parse c2)\" = \"$(git rev-parse HEAD^2)\" &&\n \tgit diff --exit-code &&\n-\ttest -f c0.c &&\n-\ttest -f c1.c &&\n-\ttest -f c2.c &&\n+\ttest_path_is_file c0.c &&\n+\ttest_path_is_file c1.c &&\n+\ttest_path_is_file c2.c &&\n \ttest 3 = $(git ls-tree -r HEAD | wc -l) &&\n \ttest 3 = $(git ls-files | wc -l)\n '\n\nbase-commit: d181b9354cf85b44455ce3ca9e6af0b9559e0ae2\n-- \ngitgitgadget\n"},{"id":"538434","messageId":"xmqq7brjyfpo.fsf@gitster.g","threadId":"65191","inReplyTo":"pull.2067.git.1773120813628.gitgitgadget@gmail.com","subject":"Re: [PATCH] t7605: use test_path_is_file instead of test -f","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-10T13:30:27Z","receivedAt":"2026-03-10T13:30:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Mansi Singh via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\nThe e-mail header seems to imply you are \"Mansi Singh\".  Do you want\nto be known to this community under that name, or just \"Mansi\"?\n\n> From: Mansi <mansimaanu8627@gmail.com>\n>\n> Replace old-style 'test -f' path checks with the modern\n> test_path_is_file helper in the merge_c1_to_c2_cmds block.\n>\n> The helper provides clearer failure messages and is the\n> established convention in Git's test suite.\n\nOK.\n\n> These instances were found using:\n>   grep -rn \"test -[efd]\" t/ --include=\"*.sh\"\n\nPeople seem to add the above paragraph to their test-path helper\npatches, but unless the coverage of the work is fairly thorough and\nyou want to say \"all the similar issues should be found with this\ncommand and I addressed all of them\", I do not see much point saying\nhow you found one of them and addressed it.\n\nYou could have used \"git grep -e <pattern> -- t/\\*.sh\", or you could\nhave been working to fix something in t7605 and noticed these while\nyou were doing something else to the file.\n\nI do not see it as too huge a deal and it is probably not a cause to\nsend in another iteration once it is already written, though.\n\n> Signed-off-by: Mansi <mansimaanu8627@gmail.com>\n\nNo matter which name you pick, this should match the identity used\non your in-body \"From:\" header.  In this message you are using the\nsame \"Mansi\" with address, which is good, but see also\nDocumentation/SubmittingPatches::real-name section.\n\n> diff --git a/t/t7605-merge-resolve.sh b/t/t7605-merge-resolve.sh\n> index 5d56c38546..44de97a480 100755\n> --- a/t/t7605-merge-resolve.sh\n> +++ b/t/t7605-merge-resolve.sh\n> @@ -34,9 +34,9 @@ merge_c1_to_c2_cmds='\n>  \ttest \"$(git rev-parse c1)\" = \"$(git rev-parse HEAD^1)\" &&\n>  \ttest \"$(git rev-parse c2)\" = \"$(git rev-parse HEAD^2)\" &&\n>  \tgit diff --exit-code &&\n> -\ttest -f c0.c &&\n> -\ttest -f c1.c &&\n> -\ttest -f c2.c &&\n> +\ttest_path_is_file c0.c &&\n> +\ttest_path_is_file c1.c &&\n> +\ttest_path_is_file c2.c &&\n\nThe patch is quite straight-forward.  Good.\n\n>  \ttest 3 = $(git ls-tree -r HEAD | wc -l) &&\n>  \ttest 3 = $(git ls-files | wc -l)\n>  '\n>\n> base-commit: d181b9354cf85b44455ce3ca9e6af0b9559e0ae2\n"},{"id":"538538","messageId":"pull.2067.v2.git.1773183022175.gitgitgadget@gmail.com","threadId":"65191","inReplyTo":"pull.2067.git.1773120813628.gitgitgadget@gmail.com","subject":"[PATCH v2] t7605: use test_path_is_file instead of test -f","fromName":"Mansi Singh via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-03-10T22:50:22Z","receivedAt":"2026-03-10T22:50:24Z","isPatch":true,"sender":{"key":"mansimaanu8627@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40687671?v=4"},"body":"From: Mansi Singh <mansimaanu8627@gmail.com>\n\nReplace old-style 'test -f' path checks with the modern\ntest_path_is_file helper in the merge_c1_to_c2_cmds block.\n\nThe helper provides clearer failure messages and is the\nestablished convention in Git's test suite.\n\nSigned-off-by: Mansi Singh <mansimaanu8627@gmail.com>\n---\n    t7605: use test_path_is_file instead of test -f\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2067%2FMansiSingh17%2Ffix-t7605-test-path-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2067/MansiSingh17/fix-t7605-test-path-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/2067\n\nRange-diff vs v1:\n\n 1:  8753a5d919 ! 1:  388d8d7118 t7605: use test_path_is_file instead of test -f\n     @@\n       ## Metadata ##\n     -Author: Mansi <mansimaanu8627@gmail.com>\n     +Author: Mansi Singh <mansimaanu8627@gmail.com>\n      \n       ## Commit message ##\n          t7605: use test_path_is_file instead of test -f\n     @@ Commit message\n          The helper provides clearer failure messages and is the\n          established convention in Git's test suite.\n      \n     -    These instances were found using:\n     -      grep -rn \"test -[efd]\" t/ --include=\"*.sh\"\n     -\n     -    Signed-off-by: Mansi <mansimaanu8627@gmail.com>\n     +    Signed-off-by: Mansi Singh <mansimaanu8627@gmail.com>\n      \n       ## t/t7605-merge-resolve.sh ##\n      @@ t/t7605-merge-resolve.sh: merge_c1_to_c2_cmds='\n\n\n t/t7605-merge-resolve.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t7605-merge-resolve.sh b/t/t7605-merge-resolve.sh\nindex 5d56c38546..44de97a480 100755\n--- a/t/t7605-merge-resolve.sh\n+++ b/t/t7605-merge-resolve.sh\n@@ -34,9 +34,9 @@ merge_c1_to_c2_cmds='\n \ttest \"$(git rev-parse c1)\" = \"$(git rev-parse HEAD^1)\" &&\n \ttest \"$(git rev-parse c2)\" = \"$(git rev-parse HEAD^2)\" &&\n \tgit diff --exit-code &&\n-\ttest -f c0.c &&\n-\ttest -f c1.c &&\n-\ttest -f c2.c &&\n+\ttest_path_is_file c0.c &&\n+\ttest_path_is_file c1.c &&\n+\ttest_path_is_file c2.c &&\n \ttest 3 = $(git ls-tree -r HEAD | wc -l) &&\n \ttest 3 = $(git ls-files | wc -l)\n '\n\nbase-commit: d181b9354cf85b44455ce3ca9e6af0b9559e0ae2\n-- \ngitgitgadget\n"}]}