{"thread":{"id":"62885","subject":"[PATCH 1/1] t5401: prefer test_path_is_* helper function","startedAt":"2025-02-01T07:13:20Z","lastAt":"2025-02-02T23:43:52Z","messageCount":4,"participants":["ambar chakravartty","Meet Soni","ambar","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"511626","messageId":"20250201071210.30509-1-amch9605@gmail.com","threadId":"62885","inReplyTo":null,"subject":"[PATCH 1/1] t5401: prefer test_path_is_* helper function","fromName":"ambar chakravartty","fromEmail":"amch9605@gmail.com","sentAt":"2025-02-01T07:12:10Z","receivedAt":"2025-02-01T07:13:20Z","isPatch":true,"sender":{"key":"amch9605@gmail.com","avatar":null},"body":"From: ambar chakravartty <chakravarttyambar@gmail.com>\n\n    test -f does not provide a nice error message when we hit test\n    failures, so use test_path_is_file instead\n\nSigned-off-by: ambar chakravartty <amch9605@gmail.com>\n---\n t/t5401-update-hooks.sh | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh\nindex 723d1e17ec..17a46fd3ba 100755\n--- a/t/t5401-update-hooks.sh\n+++ b/t/t5401-update-hooks.sh\n@@ -64,14 +64,14 @@ test_expect_success 'updated as expected' '\n '\n \n test_expect_success 'hooks ran' '\n-\ttest -f victim.git/pre-receive.args &&\n-\ttest -f victim.git/pre-receive.stdin &&\n-\ttest -f victim.git/update.args &&\n-\ttest -f victim.git/update.stdin &&\n-\ttest -f victim.git/post-receive.args &&\n-\ttest -f victim.git/post-receive.stdin &&\n-\ttest -f victim.git/post-update.args &&\n-\ttest -f victim.git/post-update.stdin\n+\ttest_path_is_file victim.git/pre-receive.args &&\n+\ttest_path_is_file victim.git/pre-receive.stdin &&\n+\ttest_path_is_file victim.git/update.args &&\n+\ttest_path_is_file victim.git/update.stdin &&\n+\ttest_path_is_file victim.git/post-receive.args &&\n+\ttest_path_is_file victim.git/post-receive.stdin &&\n+\ttest_path_is_file victim.git/post-update.args &&\n+\ttest_path_is_file victim.git/post-update.stdin\n '\n \n test_expect_success 'pre-receive hook input' '\n-- \n2.48.1\n\n"},{"id":"511627","messageId":"CAPhwyn0tGHuX_Gh=rno9wj8fLb6zG4M3QAZyQDQ8qZyE+Uyg_Q@mail.gmail.com","threadId":"62885","inReplyTo":"20250201071210.30509-1-amch9605@gmail.com","subject":"Re: [PATCH 1/1] t5401: prefer test_path_is_* helper function","fromName":"Meet Soni","fromEmail":"meetsoni3017@gmail.com","sentAt":"2025-02-01T09:32:42Z","receivedAt":"2025-02-01T09:32:55Z","isPatch":true,"sender":{"key":"meetsoni3017@gmail.com","avatar":"https://avatars.githubusercontent.com/u/92802561?v=4"},"body":"Hi Ambar\nOn Sat, 1 Feb 2025 at 12:43, ambar chakravartty <amch9605@gmail.com> wrote:\n>\n> From: ambar chakravartty <chakravarttyambar@gmail.com>\n>\n>     test -f does not provide a nice error message when we hit test\n>     failures, so use test_path_is_file instead\n>\n> Signed-off-by: ambar chakravartty <amch9605@gmail.com>\n> ---\nInstead of sending a separate cover letter, you can add it here between\n\"---\" and diffstat.\ncf. https://github.com/git/git/blob/58b5801aa94ad5031978f8e42c1be1230b3d352f/Documentation/MyFirstContribution.txt#L1220\n>  t/t5401-update-hooks.sh | 16 ++++++++--------\n>  1 file changed, 8 insertions(+), 8 deletions(-)\n>\n> diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh\n> index 723d1e17ec..17a46fd3ba 100755\n> --- a/t/t5401-update-hooks.sh\n> +++ b/t/t5401-update-hooks.sh\n> @@ -64,14 +64,14 @@ test_expect_success 'updated as expected' '\n>  '\n>\n>  test_expect_success 'hooks ran' '\n> -       test -f victim.git/pre-receive.args &&\n> -       test -f victim.git/pre-receive.stdin &&\n> -       test -f victim.git/update.args &&\n> -       test -f victim.git/update.stdin &&\n> -       test -f victim.git/post-receive.args &&\n> -       test -f victim.git/post-receive.stdin &&\n> -       test -f victim.git/post-update.args &&\n> -       test -f victim.git/post-update.stdin\n> +       test_path_is_file victim.git/pre-receive.args &&\n> +       test_path_is_file victim.git/pre-receive.stdin &&\n> +       test_path_is_file victim.git/update.args &&\n> +       test_path_is_file victim.git/update.stdin &&\n> +       test_path_is_file victim.git/post-receive.args &&\n> +       test_path_is_file victim.git/post-receive.stdin &&\n> +       test_path_is_file victim.git/post-update.args &&\n> +       test_path_is_file victim.git/post-update.stdin\n>  '\n>\n>  test_expect_success 'pre-receive hook input' '\n> --\n> 2.48.1\n>\n>\nThe patch looks great! Thanks.\nMeet\n"},{"id":"511636","messageId":"CAMG7Y2w5ANKYG6BsfSmELtewvgU3A0hpYm35EMi__70OO_rtnw@mail.gmail.com","threadId":"62885","inReplyTo":"CAPhwyn0tGHuX_Gh=rno9wj8fLb6zG4M3QAZyQDQ8qZyE+Uyg_Q@mail.gmail.com","subject":"Re: [PATCH 1/1] t5401: prefer test_path_is_* helper function","fromName":"ambar","fromEmail":"amch9605@gmail.com","sentAt":"2025-02-01T13:29:35Z","receivedAt":"2025-02-01T13:30:50Z","isPatch":true,"sender":{"key":"amch9605@gmail.com","avatar":null},"body":"> Instead of sending a separate cover letter, you can add it here between\n> \"---\" and diffstat.\nUnderstood.\nShould I resend this patch with the change ?\n\n> The patch looks great! Thanks.\nThank you for your time and feedback :-)\n\nAmbar\n\nOn Sat, Feb 1, 2025 at 3:02 PM Meet Soni <meetsoni3017@gmail.com> wrote:\n>\n> Hi Ambar\n> On Sat, 1 Feb 2025 at 12:43, ambar chakravartty <amch9605@gmail.com> wrote:\n> >\n> > From: ambar chakravartty <chakravarttyambar@gmail.com>\n> >\n> >     test -f does not provide a nice error message when we hit test\n> >     failures, so use test_path_is_file instead\n> >\n> > Signed-off-by: ambar chakravartty <amch9605@gmail.com>\n> > ---\n> Instead of sending a separate cover letter, you can add it here between\n> \"---\" and diffstat.\n> cf. https://github.com/git/git/blob/58b5801aa94ad5031978f8e42c1be1230b3d352f/Documentation/MyFirstContribution.txt#L1220\n> >  t/t5401-update-hooks.sh | 16 ++++++++--------\n> >  1 file changed, 8 insertions(+), 8 deletions(-)\n> >\n> > diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh\n> > index 723d1e17ec..17a46fd3ba 100755\n> > --- a/t/t5401-update-hooks.sh\n> > +++ b/t/t5401-update-hooks.sh\n> > @@ -64,14 +64,14 @@ test_expect_success 'updated as expected' '\n> >  '\n> >\n> >  test_expect_success 'hooks ran' '\n> > -       test -f victim.git/pre-receive.args &&\n> > -       test -f victim.git/pre-receive.stdin &&\n> > -       test -f victim.git/update.args &&\n> > -       test -f victim.git/update.stdin &&\n> > -       test -f victim.git/post-receive.args &&\n> > -       test -f victim.git/post-receive.stdin &&\n> > -       test -f victim.git/post-update.args &&\n> > -       test -f victim.git/post-update.stdin\n> > +       test_path_is_file victim.git/pre-receive.args &&\n> > +       test_path_is_file victim.git/pre-receive.stdin &&\n> > +       test_path_is_file victim.git/update.args &&\n> > +       test_path_is_file victim.git/update.stdin &&\n> > +       test_path_is_file victim.git/post-receive.args &&\n> > +       test_path_is_file victim.git/post-receive.stdin &&\n> > +       test_path_is_file victim.git/post-update.args &&\n> > +       test_path_is_file victim.git/post-update.stdin\n> >  '\n> >\n> >  test_expect_success 'pre-receive hook input' '\n> > --\n> > 2.48.1\n> >\n> >\n> The patch looks great! Thanks.\n> Meet\n"},{"id":"511671","messageId":"xmqqjza73oax.fsf@gitster.g","threadId":"62885","inReplyTo":"20250201071210.30509-1-amch9605@gmail.com","subject":"Re: [PATCH 1/1] t5401: prefer test_path_is_* helper function","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-02-02T23:43:50Z","receivedAt":"2025-02-02T23:43:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"ambar chakravartty <amch9605@gmail.com> writes:\n\n> From: ambar chakravartty <chakravarttyambar@gmail.com>\n>\n>     test -f does not provide a nice error message when we hit test\n>     failures, so use test_path_is_file instead\n>\n> Signed-off-by: ambar chakravartty <amch9605@gmail.com>\n> ---\n\nMuch better.  You do not have to and you should not indent the\nproposed log message, and you want the full-stop (.) at the end of\nthe word \"instead\" at the end of the sentence, but other than that\nthis looks very good.\n\nWill queue after tweaking the log message.\n\nThanks.\n\n\n>  t/t5401-update-hooks.sh | 16 ++++++++--------\n>  1 file changed, 8 insertions(+), 8 deletions(-)\n>\n> diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh\n> index 723d1e17ec..17a46fd3ba 100755\n> --- a/t/t5401-update-hooks.sh\n> +++ b/t/t5401-update-hooks.sh\n> @@ -64,14 +64,14 @@ test_expect_success 'updated as expected' '\n>  '\n>  \n>  test_expect_success 'hooks ran' '\n> -\ttest -f victim.git/pre-receive.args &&\n> -\ttest -f victim.git/pre-receive.stdin &&\n> -\ttest -f victim.git/update.args &&\n> -\ttest -f victim.git/update.stdin &&\n> -\ttest -f victim.git/post-receive.args &&\n> -\ttest -f victim.git/post-receive.stdin &&\n> -\ttest -f victim.git/post-update.args &&\n> -\ttest -f victim.git/post-update.stdin\n> +\ttest_path_is_file victim.git/pre-receive.args &&\n> +\ttest_path_is_file victim.git/pre-receive.stdin &&\n> +\ttest_path_is_file victim.git/update.args &&\n> +\ttest_path_is_file victim.git/update.stdin &&\n> +\ttest_path_is_file victim.git/post-receive.args &&\n> +\ttest_path_is_file victim.git/post-receive.stdin &&\n> +\ttest_path_is_file victim.git/post-update.args &&\n> +\ttest_path_is_file victim.git/post-update.stdin\n>  '\n>  \n>  test_expect_success 'pre-receive hook input' '\n"}]}