{"thread":{"id":"64255","subject":"[PATCH] t1410: modernize test path checks","startedAt":"2025-10-06T09:00:56Z","lastAt":"2025-10-09T17:04:17Z","messageCount":2,"participants":["Imvedansh via GitGitGadget","Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"527964","messageId":"pull.2066.git.git.1759741252581.gitgitgadget@gmail.com","threadId":"64255","inReplyTo":null,"subject":"[PATCH] t1410: modernize test path checks","fromName":"Imvedansh via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-10-06T09:00:52Z","receivedAt":"2025-10-06T09:00:56Z","isPatch":true,"sender":{"key":"name:Imvedansh","avatar":null},"body":"From: Imvedansh <veds17007@gmail.com>\n\nConvert old-style \"test -f\" and \"! test -f\" checks to use the\nmodern helper functions 'test_path_is_file' and\n'test_path_is_missing' in t/t1410-reflog.sh.\n\nThis improves readability and consistency in the test suite.\n\nSigned-off-by: Imvedansh <veds17007@gmail.com>\n---\n    t1410: modernize test path checks\n    \n    Hello,\n    \n    I'm Vedansh and I'm interested in contributing to Git through Outreachy\n    2025.\n    \n    I have successfully built Git from source on Ubuntu (via WSL2) and run\n    the test suite. All tests pass.\n    \n    For my microproject, I'd like to modernize the path checking in\n    t/t1410-reflog.sh by replacing 'test -f' with test_path_is_file in lines\n    133-136 (in the 'rewind' test).\n    \n    I found 4 instances that are assertions (part of && chains):\n    \n     * test -f C\n     * test -f A/B/E\n     * ! test -f F\n     * ! test -f A/G\n    \n    I've verified these are test assertions, not flow control statements,\n    and the test currently passes on my system.\n    \n    Is this appropriate for a microproject?\n    \n    Thanks, Vedansh\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2066%2FImvedansh%2Fmodernize-t1410-reflog-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2066/Imvedansh/modernize-t1410-reflog-v1\nPull-Request: https://github.com/git/git/pull/2066\n\n t/t1410-reflog.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh\nindex e30f87a358..ce71f9a30a 100755\n--- a/t/t1410-reflog.sh\n+++ b/t/t1410-reflog.sh\n@@ -130,10 +130,10 @@ test_expect_success 'pass through -- to sub-command' '\n \n test_expect_success rewind '\n \ttest_tick && git reset --hard HEAD~2 &&\n-\ttest -f C &&\n-\ttest -f A/B/E &&\n-\t! test -f F &&\n-\t! test -f A/G &&\n+\ttest_path_is_file C &&\n+\ttest_path_is_file A/B/E &&\n+\ttest_path_is_missing F &&\n+\ttest_path_is_missing A/G &&\n \n \tcheck_have A B C D E F G H I J K L &&\n \n\nbase-commit: 821f583da6d30a84249f75f33501504d597bc16b\n-- \ngitgitgadget\n"},{"id":"528395","messageId":"CAP8UFD0wa6s1z==dVhuiCALeC7X56CS50qMhoPAdTzT-qy6wXA@mail.gmail.com","threadId":"64255","inReplyTo":"pull.2066.git.git.1759741252581.gitgitgadget@gmail.com","subject":"Re: [PATCH] t1410: modernize test path checks","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2025-10-09T17:04:03Z","receivedAt":"2025-10-09T17:04:17Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Mon, Oct 6, 2025 at 11:01 AM Imvedansh via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n>\n> From: Imvedansh <veds17007@gmail.com>\n>\n> Convert old-style \"test -f\" and \"! test -f\" checks to use the\n> modern helper functions 'test_path_is_file' and\n> 'test_path_is_missing' in t/t1410-reflog.sh.\n>\n> This improves readability and consistency in the test suite.\n\nI think that it might also improve the error message when a test fails, right?\n\n> Signed-off-by: Imvedansh <veds17007@gmail.com>\n\nWe prefer when the \"Signed-off-by:\" contains the full real name of the\nperson contributing.\n\n\"Documentation/SubmittingPatches\" says:\n\n[[real-name]]\nPlease use a known identity in the `Signed-off-by` trailer, since we cannot\naccept anonymous contributions. It is common, but not required, to use some form\nof your real name. We realize that some contributors are not comfortable doing\nso or prefer to contribute under a pseudonym or preferred name and we can accept\nyour patch either way, as long as the name and email you use are distinctive,\nidentifying, and not misleading.\n\nThe goal of this policy is to allow us to have sufficient information to contact\nyou if questions arise about your contribution.\n\n\n> ---\n>     t1410: modernize test path checks\n>\n>     Hello,\n>\n>     I'm Vedansh and I'm interested in contributing to Git through Outreachy\n>     2025.\n\nThanks for your interest in contributing to Git!\n\n>     I have successfully built Git from source on Ubuntu (via WSL2) and run\n>     the test suite. All tests pass.\n>\n>     For my microproject, I'd like to modernize the path checking in\n>     t/t1410-reflog.sh by replacing 'test -f' with test_path_is_file in lines\n>     133-136 (in the 'rewind' test).\n>\n>     I found 4 instances that are assertions (part of && chains):\n>\n>      * test -f C\n>      * test -f A/B/E\n>      * ! test -f F\n>      * ! test -f A/G\n>\n>     I've verified these are test assertions, not flow control statements,\n>     and the test currently passes on my system.\n>\n>     Is this appropriate for a microproject?\n\nIt seems to me that Usman already answered this.\n\n>  t/t1410-reflog.sh | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh\n> index e30f87a358..ce71f9a30a 100755\n> --- a/t/t1410-reflog.sh\n> +++ b/t/t1410-reflog.sh\n> @@ -130,10 +130,10 @@ test_expect_success 'pass through -- to sub-command' '\n>\n>  test_expect_success rewind '\n>         test_tick && git reset --hard HEAD~2 &&\n> -       test -f C &&\n> -       test -f A/B/E &&\n> -       ! test -f F &&\n> -       ! test -f A/G &&\n> +       test_path_is_file C &&\n> +       test_path_is_file A/B/E &&\n> +       test_path_is_missing F &&\n> +       test_path_is_missing A/G &&\n\nThis looks good to me.\n"}]}