git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Aishwarya Narayanan <aishnana.03@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: GSoC 2024 [RFC PATCH]
Date: Wed, 27 Mar 2024 14:30:37 +0100	[thread overview]
Message-ID: <ZgQffea0krKmZUEt@tanuki> (raw)
In-Reply-To: <CAHCXyj09EKKdBOAdQ319LGY-6GbQw+HHp9u_Mbpf4C+wF6ReSw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3135 bytes --]

On Wed, Mar 27, 2024 at 06:34:41PM +0530, Aishwarya Narayanan wrote:
> Dear Git Organization,
> 
> I hope this email finds you well. I've prepared a patch to address an
> issue related to the handling of exit codes in our test suite. The
> changes ensure that the exit code of the write_utf16 and write_utf32
> functions is properly captured and not suppressed, improving the
> reliability of our testing process.
> Below are the details of the patch:

The mail's subject should ideally be a short summary of what the patch
does, whereas the commit message here should contain a description of
what the problem is, why it is a problem and how you fix it.

> ---

Additional context like the greetings you wrote above or the trailer of
this mail can go here, between the "---" and the diff stat. This kind of
information should not go into the commit history because people
wouldn't care about greetings when going through the logs, but about
what the patch itself is about.

>  t/t0028-working-tree-encoding.sh | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh
> index ad151a3467..f372c14bc0 100755
> --- a/t/t0028-working-tree-encoding.sh
> +++ b/t/t0028-working-tree-encoding.sh
> @@ -19,10 +19,13 @@ test_expect_success 'setup test files' '
>   echo "*.utf16 text working-tree-encoding=utf-16" >.gitattributes &&
>   echo "*.utf16lebom text working-tree-encoding=UTF-16LE-BOM"
> >>.gitattributes &&
>   printf "$text" >test.utf8.raw &&
> - printf "$text" | write_utf16 >test.utf16.raw &&
> - printf "$text" | write_utf32 >test.utf32.raw &&
> - printf "\377\376"                         >test.utf16lebom.raw &&
> - printf "$text" | iconv -f UTF-8 -t UTF-16LE >>test.utf16lebom.raw &&
> + test_utf16_raw=$(printf "$text" | write_utf16) &&
> + test_utf32_raw=$(printf "$text" | write_utf32) &&
> + test_utf16lebom_raw=$(printf "\377\376"; printf "$text" | iconv -f
> UTF-8 -t UTF-16LE) &&
> + echo "$test_utf16_raw" > test.utf16.raw &&
> + echo "$test_utf32_raw" > test.utf32.raw &&
> + echo "$test_utf16lebom_raw" > test.utf16lebom.raw &&

On the technical side: I don't think that these commands actually need
to be converted. As the microproject site [1] says, pipes may discard
the left-hand side of the pipe, not the right-hand side. And given that
the left-hand side is in all cases only using `printf` I rather doubt
that this would ever really fail.

So ultimately, we care more about converting sites where the left-hand
side is a Git command itself. "t2104-update-index-skip-worktree.sh" for
example has several cases where Git commands are on the left-hand side
and that could be converted.

Patrick

[1]: https://git.github.io/SoC-2024-Microprojects/

>   # Line ending tests
>   printf "one\ntwo\nthree\n" >lf.utf8.raw &&
> -- 
> 
> I kindly request your review and any remarks or changes you may have.
> Please accept my apologies for any mistakes or oversights.
> 
> Thank you for your time and attention.
> 
> Best regards, Aishwarya Narayanan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2024-03-27 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 13:04 GSoC 2024 [RFC PATCH] Aishwarya Narayanan
2024-03-27 13:30 ` Patrick Steinhardt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZgQffea0krKmZUEt@tanuki \
    --to=ps@pks.im \
    --cc=aishnana.03@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).