{"thread":{"id":"66533","subject":"[PATCH] t0200: use path checking helpers","startedAt":"2026-10-14T10:56:13Z","lastAt":"2026-10-14T19:24:52Z","messageCount":3,"participants":["Victor Okafor","Usman Akinyemi","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"555002","messageId":"20261014105613.49334-1-vua.okafor@gmail.com","threadId":"66533","inReplyTo":null,"subject":"[PATCH] t0200: use path checking helpers","fromName":"Victor Okafor","fromEmail":"vua.okafor@gmail.com","sentAt":"2026-10-14T10:56:13Z","receivedAt":"2026-10-14T10:56:13Z","isPatch":true,"sender":{"key":"vua.okafor@gmail.com","avatar":null},"body":"Replace direct directory and file checks with the corresponding\ntest helpers in t/t0200-gettext-basic.sh.\n\nInstances were located using:\ngit grep -n -E 'test -[efds]' -- 't/t[0-9]*.sh'\n\nSigned-off-by: Victor Okafor <vua.okafor@gmail.com>\n---\n t/t0200-gettext-basic.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t0200-gettext-basic.sh b/t/t0200-gettext-basic.sh\nindex 8db26c1ada..177cf658fd 100755\n--- a/t/t0200-gettext-basic.sh\n+++ b/t/t0200-gettext-basic.sh\n@@ -31,12 +31,12 @@ test_expect_success 'xgettext sanity: Comment extraction with --add-comments sto\n '\n \n test_expect_success GETTEXT 'sanity: $TEXTDOMAINDIR exists without NO_GETTEXT=YesPlease' '\n-    test -d \"$TEXTDOMAINDIR\" &&\n+    test_path_is_dir \"$TEXTDOMAINDIR\" &&\n     test \"$TEXTDOMAINDIR\" = \"$GIT_TEXTDOMAINDIR\"\n '\n \n test_expect_success GETTEXT 'sanity: Icelandic locale was compiled' '\n-    test -f \"$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo\"\n+    test_path_is_file \"$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo\"\n '\n \n # TODO: When we have more locales, generalize this to test them\n-- \n2.55.0\n\n\n"},{"id":"555028","messageId":"CAPSxiM-VB_JUexggYTMmYcHe7W7pw=XNuMrENB4gZoq2Zo8J7Q@mail.gmail.com","threadId":"66533","inReplyTo":"20261014105613.49334-1-vua.okafor@gmail.com","subject":"Re: [PATCH] t0200: use path checking helpers","fromName":"Usman Akinyemi","fromEmail":"usmanakinyemi202@gmail.com","sentAt":"2026-10-14T14:45:00Z","receivedAt":"2026-10-14T14:45:00Z","isPatch":true,"sender":{"key":"usmanakinyemi202@gmail.com","avatar":"https://avatars.githubusercontent.com/u/86585626?v=4"},"body":">\n> Replace direct directory and file checks with the corresponding\n> test helpers in t/t0200-gettext-basic.sh.\nThis is a little bit more confusing. The commit message does not\nreally show why you did what you did. Along the line of\n\n\"Modernize the code testing whether a file exists in \"filename\"' seems\nbetter. Also, your patches is doing two things, i.e modernizing the 'test -f'\nand 'test -d'. Ideally a patch should only focus on one thing but,\nsince this is\nsimple patch. It is okay.\n>\n> Instances were located using:\n> git grep -n -E 'test -[efds]' -- 't/t[0-9]*.sh'\nThis part is nto necessary.\n>\n> Signed-off-by: Victor Okafor <vua.okafor@gmail.com>\n> ---\n>  t/t0200-gettext-basic.sh | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t0200-gettext-basic.sh b/t/t0200-gettext-basic.sh\n>  test_expect_success GETTEXT 'sanity: Icelandic locale was compiled' '\n> -    test -f \"$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo\"\n> +    test_path_is_file \"$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo\"\n>  '\n>\n>  # TODO: When we have more locales, generalize this to test them\n> --\n> 2.55.0\n>\nThanks\n>\n\n"},{"id":"555065","messageId":"xmqqtsmoqe4b.fsf@gitster.g","threadId":"66533","inReplyTo":"CAPSxiM-VB_JUexggYTMmYcHe7W7pw=XNuMrENB4gZoq2Zo8J7Q@mail.gmail.com","subject":"Re: [PATCH] t0200: use path checking helpers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-10-14T19:24:52Z","receivedAt":"2026-10-14T19:24:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Usman Akinyemi <usmanakinyemi202@gmail.com> writes:\n\n>>\n>> Replace direct directory and file checks with the corresponding\n>> test helpers in t/t0200-gettext-basic.sh.\n> This is a little bit more confusing. The commit message does not\n> really show why you did what you did. Along the line of\n>\n> \"Modernize the code testing whether a file exists in \"filename\"' seems\n> better. Also, your patches is doing two things, i.e modernizing the 'test -f'\n> and 'test -d'. Ideally a patch should only focus on one thing but,\n> since this is\n> simple patch. It is okay.\n>>\n>> Instances were located using:\n>> git grep -n -E 'test -[efds]' -- 't/t[0-9]*.sh'\n> This part is nto necessary.\n\nSince many candidates are working on similar microprojects (which is\nfine) and making the same mistakes (which is expected), perhaps mentors\nshould tell them to read the review exchanges on other candidates'\npatches and learn from them.\n\n>>\n>> Signed-off-by: Victor Okafor <vua.okafor@gmail.com>\n>> ---\n>>  t/t0200-gettext-basic.sh | 4 ++--\n>>  1 file changed, 2 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/t/t0200-gettext-basic.sh b/t/t0200-gettext-basic.sh\n>>  test_expect_success GETTEXT 'sanity: Icelandic locale was compiled' '\n>> -    test -f \"$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo\"\n>> +    test_path_is_file \"$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo\"\n>>  '\n>>\n>>  # TODO: When we have more locales, generalize this to test them\n>> --\n>> 2.55.0\n>>\n> Thanks\n>>\n\n"}]}