From: Junio C Hamano Date: Thu, 12 Oct 2017 11:08:40 GMT Subject: Re: [PATCH] pull: pass --signoff/--no-signoff to "git merge" Message-ID: In-Reply-To: Junio C Hamano 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