Re: [PATCH v2] subtree: fix add and pull for GPG-signed commits
- From
Stephen R Guglielmo <srguglielmo@gmail.com>
- Date
- Feb 26, 2018, 14:46 UTC
- Message-ID
- <CADfK3RXa9wngOZ9YmurThm=Xu8J=nq0tK5yaMOMT4T0be2sUZA@mail.gmail.com>
- In-Reply-To
- <xmqq7er3s4t7.fsf@gitster-ct.c.googlers.com>
On Fri, Feb 23, 2018 at 5:45 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 37 quoted lines
> Stephen R Guglielmo <srguglielmo@gmail.com> writes: > >> 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> >> --- >> contrib/subtree/git-subtree.sh | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) > > This was too heavily whitespace damaged so I recreated your patch > manually from scratch and queued, during which time I may have made > silly and simple mistakes. Please double check what appears on the > 'pu' branch in a few hours. > > Thanks. > > I am however starting to feel that > > (1) add gitlog="git log" and then do s/git log/$gitlog/; to the > remainder of the whole script in patch 1/2; and > > (2) turn the variable definition to gitlog="git log --no-show-signature" > in patch 2/2 > > may be a better approach. After all, this script is not prepared to > be used by any group of people who use signed commits, and showing > commit signature in any of its use of 'git log', either present or > in the future, will not be useful to it, I suspect.
Hi Junio,
I can confirm the changes to the pu branch looks good. I apologize for the whitespace issue; Gmail must've mangled it.
I'm happy to develop a new patch based on your recommendations. Should it be on top of the previous patch I sent or should it replace the previous patch?
Thanks, Steve