git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stephen R Guglielmo <srguglielmo@gmail.com>
Cc: Avery Pennarun <apenwarr@gmail.com>,
	Stefan Beller <sbeller@google.com>, git <git@vger.kernel.org>
Subject: Re: Bug Report: Subtrees and GPG Signed Commits
Date: Mon, 05 Feb 2018 10:45:59 -0800	[thread overview]
Message-ID: <xmqqh8qvb7h4.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CADfK3RWAcb0m+m_U51JLA9tNyru_7XEsfy55i5EUsKh98jGFtA@mail.gmail.com> (Stephen R. Guglielmo's message of "Mon, 5 Feb 2018 09:30:18 -0500")

Stephen R Guglielmo <srguglielmo@gmail.com> writes:

> 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.

  parent reply	other threads:[~2018-02-05 18:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-06 22:45 Bug Report: Subtrees and GPG Signed Commits Stephen R Guglielmo
2018-01-18 16:19 ` Stephen R Guglielmo
2018-01-30 19:15   ` Stephen R Guglielmo
2018-01-30 23:17     ` Stefan Beller
2018-01-30 23:24       ` Junio C Hamano
2018-01-30 23:37         ` Avery Pennarun
2018-01-31 12:33           ` Stephen R Guglielmo
2018-02-02 23:39             ` Junio C Hamano
2018-02-05 14:30             ` Stephen R Guglielmo
2018-02-05 14:40               ` Stephen R Guglielmo
2018-02-05 18:45               ` Junio C Hamano [this message]
2018-02-08 13:53                 ` Stephen R Guglielmo

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqh8qvb7h4.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sbeller@google.com \
    --cc=srguglielmo@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.
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 NNTP newsgroup(s).