{"thread":{"id":"62363","subject":"[[PATCH][Outreachy]] t7011-skip-worktree-reading.sh: ensure no whitespace after redirect operators","startedAt":"2024-10-18T19:17:54Z","lastAt":"2024-10-19T08:43:00Z","messageCount":4,"participants":["Seyi Kuforiji","Kristoffer Haugsbakk","Taylor Blau","Seyi Chamber"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"505455","messageId":"20241018191744.209746-1-kuforiji98@gmail.com","threadId":"62363","inReplyTo":null,"subject":"[[PATCH][Outreachy]] t7011-skip-worktree-reading.sh: ensure no whitespace after redirect operators","fromName":"Seyi Kuforiji","fromEmail":"kuforiji98@gmail.com","sentAt":"2024-10-18T19:17:43Z","receivedAt":"2024-10-18T19:17:54Z","isPatch":true,"sender":{"key":"kuforiji98@gmail.com","avatar":"https://avatars.githubusercontent.com/u/94905626?v=4"},"body":"As discussed in the thread on lore.kernel.org (link below), it is important\nto ensure there is no whitespace after redirect operators. This change updates\nthe script to conform to this standard, changing instances like:\n\n    foo > actual &&\n\nto:\n\n    foo >actual &&\n\nReference: https://lore.kernel.org/git/CAPig+cQpUu2UO-+jWn1nTaDykWnxwuEitzVB7PnW2SS_b7V8Hg@mail.gmail.com/\n\nSigned-off-by: Seyi Kuforiji <kuforiji98@gmail.com>\n---\n t/t7011-skip-worktree-reading.sh | 22 +++++++++++-----------\n 1 file changed, 11 insertions(+), 11 deletions(-)\n\ndiff --git a/t/t7011-skip-worktree-reading.sh b/t/t7011-skip-worktree-reading.sh\nindex 4adac5acd5..c86abd99bf 100755\n--- a/t/t7011-skip-worktree-reading.sh\n+++ b/t/t7011-skip-worktree-reading.sh\n@@ -32,24 +32,24 @@ setup_absent() {\n }\n \n test_absent() {\n-\techo \"100644 $EMPTY_BLOB 0\t1\" > expected &&\n-\tgit ls-files --stage 1 > result &&\n+\techo \"100644 $EMPTY_BLOB 0\t1\" >expected &&\n+\tgit ls-files --stage 1 >result &&\n \ttest_cmp expected result &&\n \ttest ! -f 1\n }\n \n setup_dirty() {\n \tgit update-index --force-remove 1 &&\n-\techo dirty > 1 &&\n+\techo dirty >1 &&\n \tgit update-index --add --cacheinfo 100644 $EMPTY_BLOB 1 &&\n \tgit update-index --skip-worktree 1\n }\n \n test_dirty() {\n-\techo \"100644 $EMPTY_BLOB 0\t1\" > expected &&\n-\tgit ls-files --stage 1 > result &&\n+\techo \"100644 $EMPTY_BLOB 0\t1\" >expected &&\n+\tgit ls-files --stage 1 >result &&\n \ttest_cmp expected result &&\n-\techo dirty > expected\n+\techo dirty >expected\n \ttest_cmp expected 1\n }\n \n@@ -59,7 +59,7 @@ test_expect_success 'setup' '\n \ttouch ./1 ./2 sub/1 sub/2 &&\n \tgit add 1 2 sub/1 sub/2 &&\n \tgit update-index --skip-worktree 1 sub/1 &&\n-\tgit ls-files -t > result &&\n+\tgit ls-files -t >result &&\n \ttest_cmp expect.skip result\n '\n \n@@ -86,7 +86,7 @@ test_expect_success 'update-index --remove' '\n \tsetup_dirty &&\n \tgit update-index --remove 1 &&\n \ttest -z \"$(git ls-files 1)\" &&\n-\techo dirty > expected &&\n+\techo dirty >expected &&\n \ttest_cmp expected 1\n '\n \n@@ -110,16 +110,16 @@ test_expect_success 'ls-files --modified' '\n \ttest -z \"$(git ls-files -m)\"\n '\n \n-echo \":000000 100644 $ZERO_OID $EMPTY_BLOB A\t1\" > expected\n+echo \":000000 100644 $ZERO_OID $EMPTY_BLOB A\t1\" >expected\n test_expect_success 'diff-index does not examine skip-worktree absent entries' '\n \tsetup_absent &&\n-\tgit diff-index HEAD -- 1 > result &&\n+\tgit diff-index HEAD -- 1 >result &&\n \ttest_cmp expected result\n '\n \n test_expect_success 'diff-index does not examine skip-worktree dirty entries' '\n \tsetup_dirty &&\n-\tgit diff-index HEAD -- 1 > result &&\n+\tgit diff-index HEAD -- 1 >result &&\n \ttest_cmp expected result\n '\n \n-- \n2.47.0.86.g15030f9556\n\n"},{"id":"505456","messageId":"b005084c-2710-4567-9217-27f34c2bbc95@app.fastmail.com","threadId":"62363","inReplyTo":"20241018191744.209746-1-kuforiji98@gmail.com","subject":"Re: [[PATCH][Outreachy]] t7011-skip-worktree-reading.sh: ensure no whitespace after redirect operators","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-18T20:04:43Z","receivedAt":"2024-10-18T20:05:31Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"Hiya\n\n> [[PATCH][Outreachy]]\n\nApparently you can’t nest brackets like this according to git-am(1).  I\ngot this:\n\n    ] t7011-skip-worktree-reading.sh: ensure no whitespace after redirect operators\n\nDoesn’t really matter though.  I suspect `[PATCH Outreachy]` would work.\n\nOn Fri, Oct 18, 2024, at 21:17, Seyi Kuforiji wrote:\n> As discussed in the thread on lore.kernel.org (link below), it is important\n\nThis is documented in Documentation/CodingGuidelines at “Redirection\noperators”.  That’s a more straightforward reference.\n\n> to ensure there is no whitespace after redirect operators. This change updates\n> the script to conform to this standard, changing instances like:\n>\n>     foo > actual &&\n>\n> to:\n>\n>     foo >actual &&\n\nWe can see that from the patch.  Saying what it does is redundant in\nthis case in my opinion. :)\n\nI think it suffices to say that you are fixing the code style.  If so\nthis would have been enough:\n\n> As discussed in the thread on lore.kernel.org (link below), it is important\n> to ensure there is no whitespace after redirect operators.\n\n...\n\nYou seem to be wrapping the lines at 80 columns.  72 columns is more\ncommon here.  The idea is (I think) that you add some slack for things\nlike commit message indentation in git-log(1), multiple levels of email\nquoting and so on.\n\nIt’s kind of indirectly mentioned in Documentation/MyFirstContribution.\nI also found this:\n\nhttps://lore.kernel.org/git/ZrCdDHqKfwWbr_Zn@tanuki/\n\n>\n> Reference:\n> https://lore.kernel.org/git/CAPig+cQpUu2UO-+jWn1nTaDykWnxwuEitzVB7PnW2SS_b7V8Hg@mail.gmail.com/\n>\n> Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com>\n> ---\n>  t/t7011-skip-worktree-reading.sh | 22 +++++++++++-----------\n>  1 file changed, 11 insertions(+), 11 deletions(-)\n>\n> diff --git a/t/t7011-skip-worktree-reading.sh b/t/t7011-skip-worktree-reading.sh\n> index 4adac5acd5..c86abd99bf 100755\n> --- a/t/t7011-skip-worktree-reading.sh\n> +++ b/t/t7011-skip-worktree-reading.sh\n> @@ -32,24 +32,24 @@ setup_absent() {\n>  }\n>\n>  test_absent() {\n> -\techo \"100644 $EMPTY_BLOB 0\t1\" > expected &&\n> -\tgit ls-files --stage 1 > result &&\n> +\techo \"100644 $EMPTY_BLOB 0\t1\" >expected &&\n> +\tgit ls-files --stage 1 >result &&\n>  \ttest_cmp expected result &&\n>  \ttest ! -f 1\n>  }\n>\n>  setup_dirty() {\n>  \tgit update-index --force-remove 1 &&\n> -\techo dirty > 1 &&\n> +\techo dirty >1 &&\n>  \tgit update-index --add --cacheinfo 100644 $EMPTY_BLOB 1 &&\n>  \tgit update-index --skip-worktree 1\n>  }\n>\n>  test_dirty() {\n> -\techo \"100644 $EMPTY_BLOB 0\t1\" > expected &&\n> -\tgit ls-files --stage 1 > result &&\n> +\techo \"100644 $EMPTY_BLOB 0\t1\" >expected &&\n> +\tgit ls-files --stage 1 >result &&\n>  \ttest_cmp expected result &&\n> -\techo dirty > expected\n> +\techo dirty >expected\n>  \ttest_cmp expected 1\n>  }\n>\n> @@ -59,7 +59,7 @@ test_expect_success 'setup' '\n>  \ttouch ./1 ./2 sub/1 sub/2 &&\n>  \tgit add 1 2 sub/1 sub/2 &&\n>  \tgit update-index --skip-worktree 1 sub/1 &&\n> -\tgit ls-files -t > result &&\n> +\tgit ls-files -t >result &&\n>  \ttest_cmp expect.skip result\n>  '\n>\n> @@ -86,7 +86,7 @@ test_expect_success 'update-index --remove' '\n>  \tsetup_dirty &&\n>  \tgit update-index --remove 1 &&\n>  \ttest -z \"$(git ls-files 1)\" &&\n> -\techo dirty > expected &&\n> +\techo dirty >expected &&\n>  \ttest_cmp expected 1\n>  '\n>\n> @@ -110,16 +110,16 @@ test_expect_success 'ls-files --modified' '\n>  \ttest -z \"$(git ls-files -m)\"\n>  '\n>\n> -echo \":000000 100644 $ZERO_OID $EMPTY_BLOB A\t1\" > expected\n> +echo \":000000 100644 $ZERO_OID $EMPTY_BLOB A\t1\" >expected\n>  test_expect_success 'diff-index does not examine skip-worktree absent\n> entries' '\n>  \tsetup_absent &&\n> -\tgit diff-index HEAD -- 1 > result &&\n> +\tgit diff-index HEAD -- 1 >result &&\n>  \ttest_cmp expected result\n>  '\n>\n>  test_expect_success 'diff-index does not examine skip-worktree dirty entries' '\n>  \tsetup_dirty &&\n> -\tgit diff-index HEAD -- 1 > result &&\n> +\tgit diff-index HEAD -- 1 >result &&\n>  \ttest_cmp expected result\n>  '\n>\n> --\n> 2.47.0.86.g15030f9556\n\nThe diff here is clean.  It only does what you describe in the commit\nmessage.  Good.\n\nI checked the file and I can’t find any missed instances.  Nice!\n\n-- \nKristoffer Haugsbakk\n"},{"id":"505460","messageId":"ZxLNBxcnTf8nsT1H@nand.local","threadId":"62363","inReplyTo":"b005084c-2710-4567-9217-27f34c2bbc95@app.fastmail.com","subject":"Re: [[PATCH][Outreachy]] t7011-skip-worktree-reading.sh: ensure no whitespace after redirect operators","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-18T21:03:03Z","receivedAt":"2024-10-18T21:03:07Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Fri, Oct 18, 2024 at 10:04:43PM +0200, Kristoffer Haugsbakk wrote:\n> Hiya\n>\n> > [[PATCH][Outreachy]]\n>\n> Apparently you can’t nest brackets like this according to git-am(1).  I\n> got this:\n>\n>     ] t7011-skip-worktree-reading.sh: ensure no whitespace after redirect operators\n>\n> Doesn’t really matter though.  I suspect `[PATCH Outreachy]` would work.\n\nIndeed. With format-patch, you can do '--rfc=-Outreachy' to achieve the\ndesired effect.\n\n> The diff here is clean.  It only does what you describe in the commit\n> message.  Good.\n>\n> I checked the file and I can’t find any missed instances.  Nice!\n\nThanks for the helpful review and feedback for Seyi's patch.\n\nSeyi: I'll queue this into my tree, but mark it as expecting a new\nversion to address Kristoffer's comments above. Thanks.\n\nThanks,\nTaylor\n"},{"id":"505488","messageId":"CAGedMtcBbzA57Cs3W3f4ZbS9roERMhxe3GK=HL-7oRBOUsxB-A@mail.gmail.com","threadId":"62363","inReplyTo":"ZxLNBxcnTf8nsT1H@nand.local","subject":"Re: [[PATCH][Outreachy]] t7011-skip-worktree-reading.sh: ensure no whitespace after redirect operators","fromName":"Seyi Chamber","fromEmail":"kuforiji98@gmail.com","sentAt":"2024-10-19T08:42:45Z","receivedAt":"2024-10-19T08:43:00Z","isPatch":true,"sender":{"key":"kuforiji98@gmail.com","avatar":"https://avatars.githubusercontent.com/u/94905626?v=4"},"body":"On Fri, 18 Oct 2024 at 22:03, Taylor Blau <me@ttaylorr.com> wrote:\n>\n> On Fri, Oct 18, 2024 at 10:04:43PM +0200, Kristoffer Haugsbakk wrote:\n>> We can see that from the patch.  Saying what it does is redundant in\n>> this case in my opinion. :)\n\n>> I think it suffices to say that you are fixing the code style.  If so\n>> this would have been enough:\n>> You seem to be wrapping the lines at 80 columns.  72 columns is more\n>> common here.  The idea is (I think) that you add some slack for things\n>> like commit message indentation in git-log(1), multiple levels of email\n>> quoting and so on.\n\n>> It’s kind of indirectly mentioned in Documentation/MyFirstContribution.\n>> I also found this:\n\n>> https://lore.kernel.org/git/ZrCdDHqKfwWbr_Zn@tanuki/\n\nDuly noted, haha!\n\n> > Hiya\n> >\n> > > [[PATCH][Outreachy]]\n> >\n> > Apparently you can’t nest brackets like this according to git-am(1).  I\n> > got this:\n> >\n> >     ] t7011-skip-worktree-reading.sh: ensure no whitespace after redirect operators\n> >\n> > Doesn’t really matter though.  I suspect `[PATCH Outreachy]` would work.\n>\n> Indeed. With format-patch, you can do '--rfc=-Outreachy' to achieve the\n> desired effect.\n\nThank you for the feedback Kristoffer and Taylor!\n\nI'll adjust the subject line to conform to git-am using Taylor's\nsuggestion for my next patch :)\n\n>\n> > The diff here is clean.  It only does what you describe in the commit\n> > message.  Good.\n> >\n> > I checked the file and I can’t find any missed instances.  Nice!\n>\n> Thanks for the helpful review and feedback for Seyi's patch.\n>\n> Seyi: I'll queue this into my tree, but mark it as expecting a new\n> version to address Kristoffer's comments above. Thanks.\n>\n> Thanks,\n> Taylor\n\nDuly noted, Thanks.\n"}]}