{"thread":{"id":"54454","subject":"[Outreachy-Microproject][PATCH 1/1] t0000: replace an instant of test -f with test_path_is_file functions.","startedAt":"2020-10-18T00:55:35Z","lastAt":"2020-10-18T20:11:58Z","messageCount":3,"participants":["Caleb Tillman","Taylor Blau","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"407830","messageId":"20201018005522.217397-1-caleb.tillman@gmail.com","threadId":"54454","inReplyTo":null,"subject":"[Outreachy-Microproject][PATCH 1/1] t0000: replace an instant of test -f with test_path_is_file functions.","fromName":"Caleb Tillman","fromEmail":"caleb.tillman@gmail.com","sentAt":"2020-10-18T00:55:22Z","receivedAt":"2020-10-18T00:55:35Z","isPatch":true,"sender":{"key":"caleb.tillman@gmail.com","avatar":null},"body":"The test_path_is* functions provide debug-friendly messages upon failure.\n\nSigned-off-by: Caleb Tillman <caleb.tillman@gmail.com>\n--- Outrachy Microproject, revised submission\n t/t0000-basic.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\nindex 923281af93..eb99892a87 100755\n--- a/t/t0000-basic.sh\n+++ b/t/t0000-basic.sh\n@@ -1191,7 +1191,7 @@ test_expect_success 'writing this tree with --missing-ok' '\n test_expect_success 'git read-tree followed by write-tree should be idempotent' '\n \trm -f .git/index &&\n \tgit read-tree $tree &&\n-\ttest -f .git/index &&\n+\ttest_path_is_file .git/index &&\n \tnewtree=$(git write-tree) &&\n \ttest \"$newtree\" = \"$tree\"\n '\n-- \n2.25.1\n\n"},{"id":"407831","messageId":"20201018035547.GA2262492@nand.local","threadId":"54454","inReplyTo":"20201018005522.217397-1-caleb.tillman@gmail.com","subject":"Re: [Outreachy-Microproject][PATCH 1/1] t0000: replace an instant of test -f with test_path_is_file functions.","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-10-18T03:55:47Z","receivedAt":"2020-10-18T03:55:54Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Hi Caleb,\n\nOn Sun, Oct 18, 2020 at 12:55:22AM +0000, Caleb Tillman wrote:\n> The test_path_is* functions provide debug-friendly messages upon failure.\n\nThe body looks fine to me. Your subject is getting a little long,\nhowever. Typical guidance would be somewhere around 50 (at least in my\nopinion, I thought we had something in Documentation/CodingGuidelines,\nbut I couldn't find anything).\n\nMaybe something instead like:\n\n  t0000: replace 'test -f' with helpers\n\nor:\n\n  t0000: modernize test style\n\nIf you're looking for inspiration, you can use `git log`'s `-S` flag to\nlook for anything that mentions 'test_path_is_file' to see how similar\npatches have been written in the past. (When I was recommending\nalternatives, I ran \"git log --oneline -Stest_path_is_file -- t\").\n\n> Signed-off-by: Caleb Tillman <caleb.tillman@gmail.com>\n> --- Outrachy Microproject, revised submission\n\nI think that you meant to put this \"Outrachy ...\" _below_ the\ntriple-dash line. Incidentally, Git still applies this patch just fine,\nbut it is easier for reviewers to pick it up if the \"---\" line is left\nalone.\n\n>  t/t0000-basic.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\n> index 923281af93..eb99892a87 100755\n> --- a/t/t0000-basic.sh\n> +++ b/t/t0000-basic.sh\n> @@ -1191,7 +1191,7 @@ test_expect_success 'writing this tree with --missing-ok' '\n>  test_expect_success 'git read-tree followed by write-tree should be idempotent' '\n>  \trm -f .git/index &&\n>  \tgit read-tree $tree &&\n> -\ttest -f .git/index &&\n> +\ttest_path_is_file .git/index &&\n\nThis looks totally correct to me.\n\nThanks,\nTaylor\n"},{"id":"407861","messageId":"xmqqk0vn70qe.fsf@gitster.c.googlers.com","threadId":"54454","inReplyTo":"20201018035547.GA2262492@nand.local","subject":"Re: [Outreachy-Microproject][PATCH 1/1] t0000: replace an instant of test -f with test_path_is_file functions.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-18T20:11:53Z","receivedAt":"2020-10-18T20:11:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Taylor Blau <me@ttaylorr.com> writes:\n\n> Hi Caleb,\n>\n> On Sun, Oct 18, 2020 at 12:55:22AM +0000, Caleb Tillman wrote:\n>> The test_path_is* functions provide debug-friendly messages upon failure.\n>\n> The body looks fine to me. Your subject is getting a little long,\n> however. Typical guidance would be somewhere around 50 (at least in my\n> opinion, I thought we had something in Documentation/CodingGuidelines,\n> but I couldn't find anything).\n>\n> Maybe something instead like:\n>\n>   t0000: replace 'test -f' with helpers\n>\n> or:\n>\n>   t0000: modernize test style\n>\n> If you're looking for inspiration, you can use `git log`'s `-S` flag to\n> look for anything that mentions 'test_path_is_file' to see how similar\n> patches have been written in the past. (When I was recommending\n> alternatives, I ran \"git log --oneline -Stest_path_is_file -- t\").\n\nThanks for a great educational input.\n\n>> diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\n>> index 923281af93..eb99892a87 100755\n>> --- a/t/t0000-basic.sh\n>> +++ b/t/t0000-basic.sh\n>> @@ -1191,7 +1191,7 @@ test_expect_success 'writing this tree with --missing-ok' '\n>>  test_expect_success 'git read-tree followed by write-tree should be idempotent' '\n>>  \trm -f .git/index &&\n>>  \tgit read-tree $tree &&\n>> -\ttest -f .git/index &&\n>> +\ttest_path_is_file .git/index &&\n>\n> This looks totally correct to me.\n\nBy nature of \"microproject\" exchange, it is almost trivial to get\nthe patch text right after an exchange.  The problems are typically\nso easy that there is only one way to write the code part correctly.\n\nPolishing proposed log message is much harder ;-)\n\nThanks.\n"}]}