git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Barret Rhoden <brho@google.com>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"David Kastrup" <dak@gnu.org>, "Jeff King" <peff@peff.net>,
	"Jeff Smith" <whydoubt@gmail.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"René Scharfe" <l.s.r@web.de>,
	"Stefan Beller" <stefanbeller@gmail.com>
Subject: Re: [PATCH v3 5/5] blame: add tests for ignoring revisions
Date: Wed, 13 Feb 2019 15:31:35 -0800	[thread overview]
Message-ID: <xmqqef8b9sfc.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190212222722.240676-6-brho@google.com> (Barret Rhoden's message of "Tue, 12 Feb 2019 17:27:22 -0500")

Barret Rhoden <brho@google.com> writes:

> +	git rev-parse Y > expect &&

Not limited to this one, but lose the SP between the redirection
operator and its target pathname, i.e. "git rev-parse Y >expect".

> +	sed -i -e "s/[0-9a-f]/0/g" expect &&

Don't use "sed -i" in-place rewrite, that is not portable.

In the meantime, I'd patch it up with this so that we can keep 'pu'
working.  Placing "git rev-parse" upstream of a pipe is not kosher,
but in the meantime...

 t/t8013-blame-ignore-revs.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/t/t8013-blame-ignore-revs.sh b/t/t8013-blame-ignore-revs.sh
index 3a4ad7cf93..e3396a78d0 100755
--- a/t/t8013-blame-ignore-revs.sh
+++ b/t/t8013-blame-ignore-revs.sh
@@ -57,8 +57,7 @@ test_expect_success ignore_rev_adding_lines '
 	git commit -m Y &&
 	git tag Y &&
 
-	git rev-parse Y > expect &&
-	sed -i -e "s/[0-9a-f]/0/g" expect &&
+	git rev-parse Y | sed -e "s/[0-9a-f]/0/g" >expect &&
 	git blame --line-porcelain file --ignore-rev Y > blame_raw &&
 
 	grep "^[0-9a-f]\+ 3 3" blame_raw | sed -e "s/ .*//" > actual &&




  reply	other threads:[~2019-02-13 23:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 22:27 [PATCH v3 0/5] blame: add the ability to ignore commits Barret Rhoden
2019-02-12 22:27 ` [PATCH v3 1/5] Move init_skiplist() outside of fsck Barret Rhoden
2019-02-12 22:27 ` [PATCH v3 2/5] blame: use a helper function in blame_chunk() Barret Rhoden
2019-02-12 22:27 ` [PATCH v3 3/5] blame: add the ability to ignore commits and their changes Barret Rhoden
2019-02-12 22:27 ` [PATCH v3 4/5] blame: add a config option to mark ignored lines Barret Rhoden
2019-02-12 22:27 ` [PATCH v3 5/5] blame: add tests for ignoring revisions Barret Rhoden
2019-02-13 23:31   ` Junio C Hamano [this message]
2019-02-14 15:21     ` Barret Rhoden

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=xmqqef8b9sfc.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=peff@peff.net \
    --cc=stefanbeller@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.
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).