Re: Bug Report: Subtrees and GPG Signed Commits
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 5, 2018, 18:45 UTC
- Message-ID
- <xmqqh8qvb7h4.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CADfK3RWAcb0m+m_U51JLA9tNyru_7XEsfy55i5EUsKh98jGFtA@mail.gmail.com>
Stephen R Guglielmo <srguglielmo@gmail.com> writes:
Show 12 quoted lines
> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
> index cc033af73..dec085a23 100755
> --- a/contrib/subtree/git-subtree.sh
> +++ b/contrib/subtree/git-subtree.sh
> @@ -475,7 +475,7 @@ squash_msg () {
>
> toptree_for_commit () {
> commit="$1"
> - git log -1 --pretty=format:'%T' "$commit" -- || exit $?
> + git log --no-show-signature -1 --pretty=format:'%T' "$commit"
> -- || exit $?
> }Given that all references to this shell function seem to do
sometree=$(toptree_for_commit $something)
and then $sometree is used as if it were a tree object name, I can understand why the lack of --no-show-signature in the original breaks it when the user has show-signature configured.
It probably makes more sense to replace the "git log" with something more appropirate for the job, like
git rev-parse --verify "$commit^{tree}"though.