{"thread":{"id":"61210","subject":"GSoC 2024 [RFC PATCH]","startedAt":"2024-03-27T13:04:55Z","lastAt":"2024-03-27T13:30:44Z","messageCount":2,"participants":["Aishwarya Narayanan","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"491692","messageId":"CAHCXyj09EKKdBOAdQ319LGY-6GbQw+HHp9u_Mbpf4C+wF6ReSw@mail.gmail.com","threadId":"61210","inReplyTo":null,"subject":"GSoC 2024 [RFC PATCH]","fromName":"Aishwarya Narayanan","fromEmail":"aishnana.03@gmail.com","sentAt":"2024-03-27T13:04:41Z","receivedAt":"2024-03-27T13:04:55Z","isPatch":true,"sender":{"key":"aishnana.03@gmail.com","avatar":null},"body":"Dear Git Organization,\n\nI hope this email finds you well. I've prepared a patch to address an\nissue related to the handling of exit codes in our test suite. The\nchanges ensure that the exit code of the write_utf16 and write_utf32\nfunctions is properly captured and not suppressed, improving the\nreliability of our testing process.\nBelow are the details of the patch:\n\n---\n t/t0028-working-tree-encoding.sh | 11 +++++++----\n 1 file changed, 7 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\nindex ad151a3467..f372c14bc0 100755\n--- a/t/t0028-working-tree-encoding.sh\n+++ b/t/t0028-working-tree-encoding.sh\n@@ -19,10 +19,13 @@ test_expect_success 'setup test files' '\n  echo \"*.utf16 text working-tree-encoding=utf-16\" >.gitattributes &&\n  echo \"*.utf16lebom text working-tree-encoding=UTF-16LE-BOM\"\n>>.gitattributes &&\n  printf \"$text\" >test.utf8.raw &&\n- printf \"$text\" | write_utf16 >test.utf16.raw &&\n- printf \"$text\" | write_utf32 >test.utf32.raw &&\n- printf \"\\377\\376\"                         >test.utf16lebom.raw &&\n- printf \"$text\" | iconv -f UTF-8 -t UTF-16LE >>test.utf16lebom.raw &&\n+ test_utf16_raw=$(printf \"$text\" | write_utf16) &&\n+ test_utf32_raw=$(printf \"$text\" | write_utf32) &&\n+ test_utf16lebom_raw=$(printf \"\\377\\376\"; printf \"$text\" | iconv -f\nUTF-8 -t UTF-16LE) &&\n+ echo \"$test_utf16_raw\" > test.utf16.raw &&\n+ echo \"$test_utf32_raw\" > test.utf32.raw &&\n+ echo \"$test_utf16lebom_raw\" > test.utf16lebom.raw &&\n+\n\n  # Line ending tests\n  printf \"one\\ntwo\\nthree\\n\" >lf.utf8.raw &&\n-- \n\nI kindly request your review and any remarks or changes you may have.\nPlease accept my apologies for any mistakes or oversights.\n\nThank you for your time and attention.\n\nBest regards, Aishwarya Narayanan\n"},{"id":"491695","messageId":"ZgQffea0krKmZUEt@tanuki","threadId":"61210","inReplyTo":"CAHCXyj09EKKdBOAdQ319LGY-6GbQw+HHp9u_Mbpf4C+wF6ReSw@mail.gmail.com","subject":"Re: GSoC 2024 [RFC PATCH]","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-03-27T13:30:37Z","receivedAt":"2024-03-27T13:30:44Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Mar 27, 2024 at 06:34:41PM +0530, Aishwarya Narayanan wrote:\n> Dear Git Organization,\n> \n> I hope this email finds you well. I've prepared a patch to address an\n> issue related to the handling of exit codes in our test suite. The\n> changes ensure that the exit code of the write_utf16 and write_utf32\n> functions is properly captured and not suppressed, improving the\n> reliability of our testing process.\n> Below are the details of the patch:\n\nThe mail's subject should ideally be a short summary of what the patch\ndoes, whereas the commit message here should contain a description of\nwhat the problem is, why it is a problem and how you fix it.\n\n> ---\n\nAdditional context like the greetings you wrote above or the trailer of\nthis mail can go here, between the \"---\" and the diff stat. This kind of\ninformation should not go into the commit history because people\nwouldn't care about greetings when going through the logs, but about\nwhat the patch itself is about.\n\n>  t/t0028-working-tree-encoding.sh | 11 +++++++----\n>  1 file changed, 7 insertions(+), 4 deletions(-)\n> \n> diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh\n> index ad151a3467..f372c14bc0 100755\n> --- a/t/t0028-working-tree-encoding.sh\n> +++ b/t/t0028-working-tree-encoding.sh\n> @@ -19,10 +19,13 @@ test_expect_success 'setup test files' '\n>   echo \"*.utf16 text working-tree-encoding=utf-16\" >.gitattributes &&\n>   echo \"*.utf16lebom text working-tree-encoding=UTF-16LE-BOM\"\n> >>.gitattributes &&\n>   printf \"$text\" >test.utf8.raw &&\n> - printf \"$text\" | write_utf16 >test.utf16.raw &&\n> - printf \"$text\" | write_utf32 >test.utf32.raw &&\n> - printf \"\\377\\376\"                         >test.utf16lebom.raw &&\n> - printf \"$text\" | iconv -f UTF-8 -t UTF-16LE >>test.utf16lebom.raw &&\n> + test_utf16_raw=$(printf \"$text\" | write_utf16) &&\n> + test_utf32_raw=$(printf \"$text\" | write_utf32) &&\n> + test_utf16lebom_raw=$(printf \"\\377\\376\"; printf \"$text\" | iconv -f\n> UTF-8 -t UTF-16LE) &&\n> + echo \"$test_utf16_raw\" > test.utf16.raw &&\n> + echo \"$test_utf32_raw\" > test.utf32.raw &&\n> + echo \"$test_utf16lebom_raw\" > test.utf16lebom.raw &&\n\nOn the technical side: I don't think that these commands actually need\nto be converted. As the microproject site [1] says, pipes may discard\nthe left-hand side of the pipe, not the right-hand side. And given that\nthe left-hand side is in all cases only using `printf` I rather doubt\nthat this would ever really fail.\n\nSo ultimately, we care more about converting sites where the left-hand\nside is a Git command itself. \"t2104-update-index-skip-worktree.sh\" for\nexample has several cases where Git commands are on the left-hand side\nand that could be converted.\n\nPatrick\n\n[1]: https://git.github.io/SoC-2024-Microprojects/\n\n>   # Line ending tests\n>   printf \"one\\ntwo\\nthree\\n\" >lf.utf8.raw &&\n> -- \n> \n> I kindly request your review and any remarks or changes you may have.\n> Please accept my apologies for any mistakes or oversights.\n> \n> Thank you for your time and attention.\n> \n> Best regards, Aishwarya Narayanan\n"}]}