From: Junio C Hamano <gitster@pobox.com>
To: Denton Liu <liu.denton@gmail.com>
Cc: michael@platin.gs, git@vger.kernel.org,
"Jeff King" <peff@peff.net>,
"Stefan Beller" <stefanbeller@gmail.com>,
"Jeff Smith" <whydoubt@gmail.com>, "René Scharfe" <l.s.r@web.de>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"David Kastrup" <dak@gnu.org>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Barret Rhoden" <brho@google.com>,
"SZEDER Gábor" <szeder.dev@gmail.com>
Subject: Re: [PATCH] Use an intermediate file between between git blame and sed to avoid git blame's exit code being hidden.
Date: Sun, 16 Jun 2019 15:41:22 -0700 [thread overview]
Message-ID: <xmqqy321rw4t.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190616190202.GA15262@archbookpro.localdomain> (Denton Liu's message of "Sun, 16 Jun 2019 15:02:02 -0400")
Denton Liu <liu.denton@gmail.com> writes:
> For yours, I would reword your commit message to something like
>
> t8014: avoid git command in upstream pipe
>
> Use an intermediate file between between git blame and sed to avoid
> git blame's exit code being hidden.
I agree that the main "points" of this patch that should be
highlighted on the title line are that it is about a test, and it is
about not hiding a failure of a Git command by placing it on the
upstream side of a pipe---the above title is very nicely written.
>> + "git blame -M9 --ignore-rev $IGNOREME $i >output &&
>> + sed -e \"$pick_author\" <output >actual &&
>
> We should take advantage of the fact that sed can open its own input
> here. So we should drop the `<` and just pass the filename to sed. Same
> applies to the below.
While I do not think it matters too much in this case, I agree it is
a good habit to get into, because it would give the command a chance
to produce a better error diagnosis (i.e. "malformed input on line
X" vs "malformed input on line X in file F"), when it wants to
report an error in input, if we give the name of the file to open to
the command instead of an already-open file descriptor, for one thing.
prev parent reply other threads:[~2019-06-16 22:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Re: [PATCH v8 7/9] blame: add a fingerprint heuristic to match ignored lines>
2019-06-15 18:40 ` [PATCH] Use an intermediate file between between git blame and sed to avoid git blame's exit code being hidden michael
2019-06-16 19:02 ` Denton Liu
2019-06-16 20:35 ` Michael Platings
2019-06-16 22:41 ` Junio C Hamano [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqy321rw4t.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=avarab@gmail.com \
--cc=brho@google.com \
--cc=dak@gnu.org \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=liu.denton@gmail.com \
--cc=michael@platin.gs \
--cc=peff@peff.net \
--cc=stefanbeller@gmail.com \
--cc=szeder.dev@gmail.com \
--cc=whydoubt@gmail.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).