subtree: fix add and pull for GPG-signed commits
commit8841b5222c63f4105d8751139a2b26dc2e3c5f9d
authorStephen R Guglielmo <srguglielmo@gmail.com>
Fri, 23 Feb 2018 20:41:25 +0000 (23 15:41 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 23 Feb 2018 22:36:59 +0000 (23 14:36 -0800)
treeb965464b236bbc78e7278d2580e3391e75279f52
parentffa952497288d29d94b16675c6789ef83850def3
subtree: fix add and pull for GPG-signed commits

If log.showsignature is true (or --show-signature is passed) while
performing a `subtree add` or `subtree pull`, the command fails.

toptree_for_commit() calls `log` and passes the output to `commit-tree`.
If this output shows the GPG signature data, `commit-tree` throws a
fatal error.

This commit fixes the issue by adding --no-show-signature to `log` calls
in a few places, as well as using the more appropriate `rev-parse`
instead where possible.

Signed-off-by: Stephen R Guglielmo <srg@guglielmo.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree/git-subtree.sh