git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: chizobajames21@gmail.com,  git@vger.kernel.org,
	phillip.wood@dunelm.org.uk,  ps@pks.im
Subject: Re: [Outreachy][PATCH v3] t6050: avoid pipes with downstream Git commands
Date: Fri, 11 Oct 2024 10:49:57 -0700	[thread overview]
Message-ID: <xmqqzfnaedh6.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cRLdzAEA-G=L81yR9dmm8Y-5VEU7ybyohKmbq9=0bDUaQ@mail.gmail.com> (Eric Sunshine's message of "Fri, 11 Oct 2024 12:03:14 -0400")

Eric Sunshine <sunshine@sunshineco.com> writes:

> On Fri, Oct 11, 2024 at 11:46 AM <chizobajames21@gmail.com> wrote:
>> In pipes, the exit code of a chain of commands is determined by
>> the final command. In order not to miss the exit code of a failed
>> Git command, avoid pipes instead write output of Git commands
>> into a file.
>> For better debugging experience, instances of "grep" were changed
>> to "test_grep". "test_grep" provides more context in case of a
>> failed "grep".
>>
>> Signed-off-by: Chizoba ODINAKA <chizobajames21@gmail.com>
>> ---
>> diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
>> @@ -344,7 +374,8 @@ test_expect_success 'test --format medium' '
>> -       git replace -l --format medium | sort >actual &&
>> +       git replace -l --format medium >actual &&
>> +       sort actual &&
>>         test_cmp expected actual
>
> Isn't this conversion broken? The `sort` command emits the sorted
> content to its standard output stream; it does not sort the file in
> place. So this is doing the sort but then simply throwing the output
> away, not capturing it to a file for comparison via `test_cmp`.

Good eyes.

  reply	other threads:[~2024-10-11 17:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 16:21 [Outreachy][PATCH] t6050: avoid pipes in git related commands chizobajames21
2024-10-09  7:28 ` Patrick Steinhardt
2024-10-10  7:26   ` Chizoba ODINAKA
2024-10-10  6:39 ` [Outreachy][PATCH v2] t6050: avoid pipes with downstream Git commands chizobajames21
2024-10-10 14:08   ` Phillip Wood
2024-10-10 18:51     ` Chizoba ODINAKA
2024-10-11  9:17       ` phillip.wood123
2024-10-11 15:45   ` [Outreachy][PATCH v3] " chizobajames21
2024-10-11 16:02     ` Junio C Hamano
2024-10-11 16:03     ` Eric Sunshine
2024-10-11 17:49       ` Junio C Hamano [this message]
2024-10-11 23:59         ` [Outreachy][PATCH v4] t6050: avoid pipes with upstream " chizobajames21
2024-10-12  5:35           ` Eric Sunshine
2024-10-12  6:28             ` Chizoba ODINAKA
2024-10-12  6:21           ` [Outreachy][PATCH v5] " chizobajames21
2024-10-14 14:00             ` Phillip Wood
2024-10-14 15:27               ` Chizoba ODINAKA
2024-10-14 15:24             ` [Outreachy][PATCH v6] " chizobajames21
2024-10-14 21:57               ` Taylor Blau
2024-10-15 11:07                 ` Chizoba ODINAKA
2024-10-15 11:26                   ` [Outreachy][PATCH v7] " chizobajames21
2024-10-22  1:27               ` chizobajames21
2024-10-22  1:37                 ` Chizoba ODINAKA
2024-10-22  5:02                 ` Patrick Steinhardt
2024-10-22 16:48                   ` Taylor Blau

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

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

  git send-email \
    --in-reply-to=xmqqzfnaedh6.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=chizobajames21@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    --cc=sunshine@sunshineco.com \
    /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.
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 NNTP newsgroup(s).