git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "W. Trevor King" <wking@tremily.us>
Cc: Git <git@vger.kernel.org>, "Łukasz Gryglicki" <lukaszgryglicki@o2.pl>
Subject: Re: [PATCH] pull: pass --signoff/--no-signoff to "git merge"
Date: Thu, 12 Oct 2017 20:08:40 +0900	[thread overview]
Message-ID: <xmqq7ew0zkqv.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqqefq92mgw.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Thu, 12 Oct 2017 10:17:51 +0900")

Junio C Hamano <gitster@pobox.com> writes:

> 	get_signoff () {
> 		git cat-file commit "$1" | sed -n -e '/^Signed-off-by: /p'
> 	}
>
> Some may say "cat-file can fail, and having it on the LHS of a pipe
> hides its failure", advocating for something like:
>
> 	get_signoff () {
> 		git cat-file commit "$1" >sign-off-temp &&
> 		sed -n -e '/^Signed-off-by: /p' sign-off-temp
> 	}

Actually we should use git itself for things like this, e.g.

	git -C dst show -s --pretty='format:%(trailers)' HEAD >actual &&
	test_cmp expect actual




  parent reply	other threads:[~2017-10-12 11:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 20:10 [PATCH] pull: pass --signoff/--no-signoff to "git merge" W. Trevor King
2017-10-12  1:17 ` Junio C Hamano
2017-10-12  5:30   ` W. Trevor King
2017-10-12  5:42     ` Junio C Hamano
2017-10-12  6:23       ` W. Trevor King
2017-10-12 11:08   ` Junio C Hamano [this message]
2017-10-12  8:46 ` [PATCH v2] " W. Trevor King
2017-10-12  9:18   ` W. Trevor King
2017-10-12 10:11   ` Junio C Hamano
2017-10-12 18:35   ` [PATCH v3] " W. Trevor King
2017-10-13  1:48     ` 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=xmqq7ew0zkqv.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=lukaszgryglicki@o2.pl \
    --cc=wking@tremily.us \
    /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).