git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep
Date: Mon, 12 Feb 2018 23:51:42 -0800	[thread overview]
Message-ID: <xmqqvaf1qqcx.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <69c7dc21-fb52-5982-f7d8-04518d06db6c@ramsayjones.plus.com> (Ramsay Jones's message of "Tue, 13 Feb 2018 01:58:19 +0000")

Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

> I must admit that I didn't think about the effect of the useless
> "| sort" on the exit status!  What I saw was: a process that
> received no input, sorted nothing and produced no output - pretty
> much the definition of useless! ;-)

I am not sure what you mean by "receive no input, sort nothing and
produce no output".

Ahh, OK, this is a funny one.  I think the original meant to do

	grep ... | grep -v ... | sort >actual

but it did

	grep ... | grep -v ... >actual | sort

instead by mistake.

And we have two possible "fixes" for that mistake.  Either removing
"|sort" (and replace its only effect, which is to hide brittleness
of relying on exit status of the second grep, with something else)
to declare that we do care about the order multiple warning messages
are given by the last test in the script (by the way, the script is
t5536, not t5556; the patch needs to be retitled), or keeping the "|
sort" and move the redirection into ">actual" to the correct place,
which is to follow through the intention of having that "sort" on
the pipeline in the first place.  I somewhat favor the former in
this particular case myself, but the preference is not a very strong
one.

Thanks.


  reply	other threads:[~2018-02-13  7:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12  0:18 [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep Ramsay Jones
2018-02-12 20:18 ` Junio C Hamano
2018-02-12 21:12   ` Junio C Hamano
2018-02-13  1:58   ` Ramsay Jones
2018-02-13  7:51     ` Junio C Hamano [this message]
2018-02-13 10:04       ` SZEDER Gábor
2018-02-13 17:08         ` Junio C Hamano
2018-02-13 17:26           ` Jeff King
2018-02-13 18:10             ` Junio C Hamano
2018-02-27 20:16               ` Junio C Hamano
2018-02-27 22:05                 ` Junio C Hamano
2018-02-27 23:47                   ` Ramsay Jones
2018-02-28  0:42                     ` SZEDER Gábor
2018-02-28 15:33                       ` Ramsay Jones
2018-02-28 16:18                         ` Junio C Hamano

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=xmqqvaf1qqcx.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ramsay@ramsayjones.plus.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.
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).