{"thread":{"id":"66534","subject":"[PATCH] t2030: modernize test path checks","startedAt":"2026-10-14T11:52:47Z","lastAt":"2026-10-18T05:05:43Z","messageCount":8,"participants":["Srujith A Poojary via GitGitGadget","Harald Nordgren","Srujith Poojary","Usman Akinyemi"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"555014","messageId":"pull.2256.git.1791978767497.gitgitgadget@gmail.com","threadId":"66534","inReplyTo":null,"subject":"[PATCH] t2030: modernize test path checks","fromName":"Srujith A Poojary via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-10-14T11:52:47Z","receivedAt":"2026-10-14T11:52:47Z","isPatch":true,"sender":{"key":"name:Srujith A Poojary","avatar":null},"body":"From: Srujith Poojary <poojarysrujith@gmail.com>\n\nReplace old-style file checks with test_path_is_file and the helper\ntest_path_is_missing for clearer failure diagnostics in test output.\n\nSearch with: git grep \"test -[efd]\" t/\n\nSigned-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n---\n    t2030: modernize test path checks\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2256%2Fpoojarysrujith%2Fmicroproject-modernize-path-check-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2256/poojarysrujith/microproject-modernize-path-check-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2256\n\n t/t2030-unresolve-info.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh\nindex 9af24b1204..56a7f849d6 100755\n--- a/t/t2030-unresolve-info.sh\n+++ b/t/t2030-unresolve-info.sh\n@@ -170,7 +170,7 @@ test_expect_success 'rerere and rerere forget' '\n \tgit rerere &&\n \trerere_id=$(cd .git/rr-cache && echo */postimage) &&\n \trerere_id=${rerere_id%/postimage} &&\n-\ttest -f .git/rr-cache/$rerere_id/postimage &&\n+\ttest_path_is_file .git/rr-cache/$rerere_id/postimage &&\n \tgit checkout -m fi/le &&\n \techo resurrect the conflict &&\n \ttest_grep \"^=======\" fi/le &&\n@@ -182,7 +182,7 @@ test_expect_success 'rerere and rerere forget' '\n \tcheck_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&\n \ttest -z \"$(git ls-files -u)\" &&\n \tgit rerere forget fi/le &&\n-\t! test -f .git/rr-cache/$rerere_id/postimage &&\n+\ttest_path_is_missing .git/rr-cache/$rerere_id/postimage &&\n \ttr \"\\0\" \"\\n\" <.git/MERGE_RR >actual &&\n \techo \"$rerere_id\tfi/le\" >expect &&\n \ttest_cmp expect actual\n\nbase-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n-- \ngitgitgadget\n\n"},{"id":"555216","messageId":"pull.2256.v2.git.1792135548923.gitgitgadget@gmail.com","threadId":"66534","inReplyTo":"pull.2256.git.1791978767497.gitgitgadget@gmail.com","subject":"[PATCH v2] [Outreachy PATCH] t2030: modernize test path checks","fromName":"Srujith A Poojary via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-10-16T07:25:48Z","receivedAt":"2026-10-16T07:25:48Z","isPatch":true,"sender":{"key":"name:Srujith A Poojary","avatar":null},"body":"From: Srujith Poojary <poojarysrujith@gmail.com>\n\nReplace old-style file checks with test_path_is_file and the helper\n\ntest_path_is_missing for clearer failure diagnostics in test output.\n\nSearch with: git grep \"test -[efd]\" t/\n\nSigned-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n---\n    t2030: modernize test path checks\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2256%2Fpoojarysrujith%2Fmicroproject-modernize-path-check-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2256/poojarysrujith/microproject-modernize-path-check-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/2256\n\nRange-diff vs v1:\n\n 1:  641b9330c9 ! 1:  93cf6c12f4 t2030: modernize test path checks\n     @@ Metadata\n      Author: Srujith Poojary <poojarysrujith@gmail.com>\n      \n       ## Commit message ##\n     -    t2030: modernize test path checks\n     +    [Outreachy PATCH] t2030: modernize test path checks\n      \n          Replace old-style file checks with test_path_is_file and the helper\n     +\n          test_path_is_missing for clearer failure diagnostics in test output.\n      \n          Search with: git grep \"test -[efd]\" t/\n\n\n t/t2030-unresolve-info.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh\nindex 9af24b1204..56a7f849d6 100755\n--- a/t/t2030-unresolve-info.sh\n+++ b/t/t2030-unresolve-info.sh\n@@ -170,7 +170,7 @@ test_expect_success 'rerere and rerere forget' '\n \tgit rerere &&\n \trerere_id=$(cd .git/rr-cache && echo */postimage) &&\n \trerere_id=${rerere_id%/postimage} &&\n-\ttest -f .git/rr-cache/$rerere_id/postimage &&\n+\ttest_path_is_file .git/rr-cache/$rerere_id/postimage &&\n \tgit checkout -m fi/le &&\n \techo resurrect the conflict &&\n \ttest_grep \"^=======\" fi/le &&\n@@ -182,7 +182,7 @@ test_expect_success 'rerere and rerere forget' '\n \tcheck_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&\n \ttest -z \"$(git ls-files -u)\" &&\n \tgit rerere forget fi/le &&\n-\t! test -f .git/rr-cache/$rerere_id/postimage &&\n+\ttest_path_is_missing .git/rr-cache/$rerere_id/postimage &&\n \ttr \"\\0\" \"\\n\" <.git/MERGE_RR >actual &&\n \techo \"$rerere_id\tfi/le\" >expect &&\n \ttest_cmp expect actual\n\nbase-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n-- \ngitgitgadget\n\n"},{"id":"555221","messageId":"CAHwyqnWT9f0FvthhsPcRb+c7j7xb1LBxGxxBheb_ddfcUqij+A@mail.gmail.com","threadId":"66534","inReplyTo":"pull.2256.v2.git.1792135548923.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] [Outreachy PATCH] t2030: modernize test path checks","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2026-10-16T08:36:10Z","receivedAt":"2026-10-16T08:36:10Z","isPatch":true,"sender":{"key":"haraldnordgren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9569897?v=4"},"body":"> +       test_path_is_file .git/rr-cache/$rerere_id/postimage &&\n>         git checkout -m fi/le &&\n>         echo resurrect the conflict &&\n>         test_grep \"^=======\" fi/le &&\n> @@ -182,7 +182,7 @@ test_expect_success 'rerere and rerere forget' '\n>         check_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&\n>         test -z \"$(git ls-files -u)\" &&\n>         git rerere forget fi/le &&\n> -       ! test -f .git/rr-cache/$rerere_id/postimage &&\n> +       test_path_is_missing .git/rr-cache/$rerere_id/postimage &&\n\nSeems like a good change, but there are lots of these calls in the\ncodebase. Maybe change the others ones too, while you're at it?\n\n\nHarald\n\n"},{"id":"555224","messageId":"CABh_KWi-MkiTY56LOLdaZu1dxxYjkSNX3jjO8+9_+mp3-FaNkg@mail.gmail.com","threadId":"66534","inReplyTo":"CAHwyqnWT9f0FvthhsPcRb+c7j7xb1LBxGxxBheb_ddfcUqij+A@mail.gmail.com","subject":"Re: [PATCH v2] [Outreachy PATCH] t2030: modernize test path checks","fromName":"Srujith Poojary","fromEmail":"poojarysrujith@gmail.com","sentAt":"2026-10-16T08:50:52Z","receivedAt":"2026-10-16T08:50:52Z","isPatch":true,"sender":{"key":"poojarysrujith@gmail.com","avatar":null},"body":"Hi Harald,\n\nThanks for taking a look at my patch!\nSince this is for an Outreachy microproject, I kept the scope small to\nfollow the guidelines. But I completely understand—if it helps, I can\ntake a look at modernizing some of the other ones too in a separate\npatch.\n\nThanks,\nSrujith A Poojary\n\nOn Fri, Oct 16, 2026 at 2:06 PM Harald Nordgren\n<haraldnordgren@gmail.com> wrote:\n>\n> > +       test_path_is_file .git/rr-cache/$rerere_id/postimage &&\n> >         git checkout -m fi/le &&\n> >         echo resurrect the conflict &&\n> >         test_grep \"^=======\" fi/le &&\n> > @@ -182,7 +182,7 @@ test_expect_success 'rerere and rerere forget' '\n> >         check_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&\n> >         test -z \"$(git ls-files -u)\" &&\n> >         git rerere forget fi/le &&\n> > -       ! test -f .git/rr-cache/$rerere_id/postimage &&\n> > +       test_path_is_missing .git/rr-cache/$rerere_id/postimage &&\n>\n> Seems like a good change, but there are lots of these calls in the\n> codebase. Maybe change the others ones too, while you're at it?\n>\n>\n> Harald\n\n"},{"id":"555226","messageId":"CAPSxiM9rW9mLdUVjMF9dVYNAPj+FFRShqFrbikqXmbPxd+RSxQ@mail.gmail.com","threadId":"66534","inReplyTo":"pull.2256.v2.git.1792135548923.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] [Outreachy PATCH] t2030: modernize test path checks","fromName":"Usman Akinyemi","fromEmail":"usmanakinyemi202@gmail.com","sentAt":"2026-10-16T09:18:24Z","receivedAt":"2026-10-16T09:18:24Z","isPatch":true,"sender":{"key":"usmanakinyemi202@gmail.com","avatar":"https://avatars.githubusercontent.com/u/86585626?v=4"},"body":">\n> test_path_is_missing for clearer failure diagnostics in test output.\n>\n> Search with: git grep \"test -[efd]\" t/\nPlease, remove this, it is not needed and kindly go through other\ncomments on other Outreachy applicant patches.\n>\n> Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n> ---\n>     t2030: modernize test path checks\n\n> Range-diff vs v1:\n>\n>  1:  641b9330c9 ! 1:  93cf6c12f4 t2030: modernize test path checks\n\nI will also advise that whenever you are sending your patches or\nsending any query, kindly cc'ed\nthe mentors for visibility purposes.\n\nThanks for your interest in the Git project.\n\nUsman\n\n"},{"id":"555227","messageId":"CAPSxiM8N4MjXpXjryxhx4170gEEQS6mfZu3+MQQ-1iRaFrxibQ@mail.gmail.com","threadId":"66534","inReplyTo":"CABh_KWi-MkiTY56LOLdaZu1dxxYjkSNX3jjO8+9_+mp3-FaNkg@mail.gmail.com","subject":"Re: [PATCH v2] [Outreachy PATCH] t2030: modernize test path checks","fromName":"Usman Akinyemi","fromEmail":"usmanakinyemi202@gmail.com","sentAt":"2026-10-16T09:35:58Z","receivedAt":"2026-10-16T09:35:58Z","isPatch":true,"sender":{"key":"usmanakinyemi202@gmail.com","avatar":"https://avatars.githubusercontent.com/u/86585626?v=4"},"body":"> Thanks for taking a look at my patch!\n> Since this is for an Outreachy microproject, I kept the scope small to\n> follow the guidelines. But I completely understand—if it helps, I can\n> take a look at modernizing some of the other ones too in a separate\n> patch.\nFirstly, do not toppost when replying to a message at Git. Use inline comments.\nWhile the guidelines talked about keeping the changes small, which is valid.\nBut, that file has about four instances of the same \"test -f\", that is\nnot a big change.\nYou can change all of those instances.\n\nThe main idea of Microproject is to get you familiar with the Git workflow.\n> >\n> > Seems like a good change, but there are lots of these calls in the\n> > codebase. Maybe change the others ones too, while you're at it?\nValid.\n> >\n> >\n> > Harald\nThanks at Harald for the review.\n\nThanks.\n\nUsman.\n\n"},{"id":"555229","messageId":"CABh_KWg58zWEBL-FydbOy5L31_datHfhXih5kcs1rge1a1LHng@mail.gmail.com","threadId":"66534","inReplyTo":"CAPSxiM8N4MjXpXjryxhx4170gEEQS6mfZu3+MQQ-1iRaFrxibQ@mail.gmail.com","subject":"Re: [PATCH v2] [Outreachy PATCH] t2030: modernize test path checks","fromName":"Srujith Poojary","fromEmail":"poojarysrujith@gmail.com","sentAt":"2026-10-16T10:16:29Z","receivedAt":"2026-10-16T10:16:29Z","isPatch":true,"sender":{"key":"poojarysrujith@gmail.com","avatar":null},"body":"Hi Usman,\n\nThanks for the feedback!\n\nGot it—I will remove the search command and update all four instances\nof test -f in that file, and I'll make sure to use inline replies and\nCC mentors going forward.\n\nI'll send out the v3 patch shortly.\n\nThanks,\nSrujith A Poojary\n\nOn Fri, Oct 16, 2026 at 3:06 PM Usman Akinyemi\n<usmanakinyemi202@gmail.com> wrote:\n>\n> > Thanks for taking a look at my patch!\n> > Since this is for an Outreachy microproject, I kept the scope small to\n> > follow the guidelines. But I completely understand—if it helps, I can\n> > take a look at modernizing some of the other ones too in a separate\n> > patch.\n> Firstly, do not toppost when replying to a message at Git. Use inline comments.\n> While the guidelines talked about keeping the changes small, which is valid.\n> But, that file has about four instances of the same \"test -f\", that is\n> not a big change.\n> You can change all of those instances.\n>\n> The main idea of Microproject is to get you familiar with the Git workflow.\n> > >\n> > > Seems like a good change, but there are lots of these calls in the\n> > > codebase. Maybe change the others ones too, while you're at it?\n> Valid.\n> > >\n> > >\n> > > Harald\n> Thanks at Harald for the review.\n>\n> Thanks.\n>\n> Usman.\n\n"},{"id":"555342","messageId":"pull.2256.v3.git.1792299943380.gitgitgadget@gmail.com","threadId":"66534","inReplyTo":"pull.2256.git.1791978767497.gitgitgadget@gmail.com","subject":"[PATCH v3] [Outreachy PATCH] t2030: modernize test path checks","fromName":"Srujith A Poojary via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-10-18T05:05:43Z","receivedAt":"2026-10-18T05:05:43Z","isPatch":true,"sender":{"key":"name:Srujith A Poojary","avatar":null},"body":"From: Srujith Poojary <poojarysrujith@gmail.com>\n\nReplace old-style file checks with test_path_is_file and the helper\n\ntest_path_is_missing for clearer failure diagnostics in test output.\n\nSigned-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n---\n    t2030: modernize test path checks\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2256%2Fpoojarysrujith%2Fmicroproject-modernize-path-check-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2256/poojarysrujith/microproject-modernize-path-check-v3\nPull-Request: https://github.com/gitgitgadget/git/pull/2256\n\nRange-diff vs v2:\n\n 1:  93cf6c12f4 ! 1:  75086e1db0 [Outreachy PATCH] t2030: modernize test path checks\n     @@ Commit message\n      \n          test_path_is_missing for clearer failure diagnostics in test output.\n      \n     -    Search with: git grep \"test -[efd]\" t/\n     -\n          Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n      \n       ## t/t2030-unresolve-info.sh ##\n     @@ t/t2030-unresolve-info.sh: test_expect_success 'rerere and rerere forget' '\n       \ttr \"\\0\" \"\\n\" <.git/MERGE_RR >actual &&\n       \techo \"$rerere_id\tfi/le\" >expect &&\n       \ttest_cmp expect actual\n     +@@ t/t2030-unresolve-info.sh: test_expect_success 'rerere and rerere forget (subdirectory)' '\n     + \t(cd fi && git rerere) &&\n     + \trerere_id=$(cd .git/rr-cache && echo */postimage) &&\n     + \trerere_id=${rerere_id%/postimage} &&\n     +-\ttest -f .git/rr-cache/$rerere_id/postimage &&\n     ++\ttest_path_is_file .git/rr-cache/$rerere_id/postimage &&\n     + \t(cd fi && git checkout -m le) &&\n     + \techo resurrect the conflict &&\n     + \ttest_grep \"^=======\" fi/le &&\n     +@@ t/t2030-unresolve-info.sh: test_expect_success 'rerere and rerere forget (subdirectory)' '\n     + \tcheck_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&\n     + \ttest -z \"$(git ls-files -u)\" &&\n     + \t(cd fi && git rerere forget le) &&\n     +-\t! test -f .git/rr-cache/$rerere_id/postimage &&\n     ++\ttest_path_is_missing .git/rr-cache/$rerere_id/postimage &&\n     + \ttr \"\\0\" \"\\n\" <.git/MERGE_RR >actual &&\n     + \techo \"$rerere_id\tfi/le\" >expect &&\n     + \ttest_cmp expect actual\n\n\n t/t2030-unresolve-info.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh\nindex 9af24b1204..f6f5dd7cb8 100755\n--- a/t/t2030-unresolve-info.sh\n+++ b/t/t2030-unresolve-info.sh\n@@ -170,7 +170,7 @@ test_expect_success 'rerere and rerere forget' '\n \tgit rerere &&\n \trerere_id=$(cd .git/rr-cache && echo */postimage) &&\n \trerere_id=${rerere_id%/postimage} &&\n-\ttest -f .git/rr-cache/$rerere_id/postimage &&\n+\ttest_path_is_file .git/rr-cache/$rerere_id/postimage &&\n \tgit checkout -m fi/le &&\n \techo resurrect the conflict &&\n \ttest_grep \"^=======\" fi/le &&\n@@ -182,7 +182,7 @@ test_expect_success 'rerere and rerere forget' '\n \tcheck_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&\n \ttest -z \"$(git ls-files -u)\" &&\n \tgit rerere forget fi/le &&\n-\t! test -f .git/rr-cache/$rerere_id/postimage &&\n+\ttest_path_is_missing .git/rr-cache/$rerere_id/postimage &&\n \ttr \"\\0\" \"\\n\" <.git/MERGE_RR >actual &&\n \techo \"$rerere_id\tfi/le\" >expect &&\n \ttest_cmp expect actual\n@@ -196,7 +196,7 @@ test_expect_success 'rerere and rerere forget (subdirectory)' '\n \t(cd fi && git rerere) &&\n \trerere_id=$(cd .git/rr-cache && echo */postimage) &&\n \trerere_id=${rerere_id%/postimage} &&\n-\ttest -f .git/rr-cache/$rerere_id/postimage &&\n+\ttest_path_is_file .git/rr-cache/$rerere_id/postimage &&\n \t(cd fi && git checkout -m le) &&\n \techo resurrect the conflict &&\n \ttest_grep \"^=======\" fi/le &&\n@@ -208,7 +208,7 @@ test_expect_success 'rerere and rerere forget (subdirectory)' '\n \tcheck_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&\n \ttest -z \"$(git ls-files -u)\" &&\n \t(cd fi && git rerere forget le) &&\n-\t! test -f .git/rr-cache/$rerere_id/postimage &&\n+\ttest_path_is_missing .git/rr-cache/$rerere_id/postimage &&\n \ttr \"\\0\" \"\\n\" <.git/MERGE_RR >actual &&\n \techo \"$rerere_id\tfi/le\" >expect &&\n \ttest_cmp expect actual\n\nbase-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n-- \ngitgitgadget\n\n"}]}