git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Stephen R GuglielmoNext: Stephen R Guglielmo
Message 11 of 12 in “Bug Report: Subtrees and GPG Signed Commits”
  1. Stephen R GuglielmoJan 6, 2018
  2. Stephen R GuglielmoJan 18, 2018
  3. Stephen R GuglielmoJan 30, 2018
  4. Stefan BellerJan 30, 2018
  5. Junio C HamanoJan 30, 2018
  6. Avery PennarunJan 30, 2018
  7. Stephen R GuglielmoJan 31, 2018
  8. Junio C HamanoFeb 2, 2018
  9. Stephen R GuglielmoFeb 5, 2018
  10. Stephen R GuglielmoFeb 5, 2018
  11. Junio C HamanoFeb 5, 2018
  12. Stephen R GuglielmoFeb 8, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.