{"thread":{"id":"47555","subject":"Bug Report: Subtrees and GPG Signed Commits","startedAt":"2018-01-06T22:45:08Z","lastAt":"2018-02-08T13:53:24Z","messageCount":12,"participants":["Stephen R Guglielmo","Stefan Beller","Junio C Hamano","Avery Pennarun"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"336072","messageId":"CADfK3RWXDuE=hYD==4sHXO1iJeOiVDOp7hBqhBtSn7gnQ+x7Qg@mail.gmail.com","threadId":"47555","inReplyTo":null,"subject":"Bug Report: Subtrees and GPG Signed Commits","fromName":"Stephen R Guglielmo","fromEmail":"srguglielmo@gmail.com","sentAt":"2018-01-06T22:45:01Z","receivedAt":"2018-01-06T22:45:08Z","isPatch":false,"sender":{"key":"srguglielmo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7794973?v=4"},"body":"Hi all,\n\nI've noticed an issue regarding the use of `git subtree add` and `git\nsubtree pull` when the subtree repository's commit (either HEAD or\nwhatever commit specified by the subtree command) is signed with GPG.\nIt seems to work properly if the commit is not signed but previous\ncommits are.\n\nThe gist of the issue is that `git subtree add` does not add the\nsubree properly and a \"fatal: Not a valid object name\" error is\nthrown. Running `git subtree pull` does not pull any upstream changes\nafter that (\"'subtree' was never added\").\n\nI have not done extensive testing, however, below are instructions to\nreproduce the issue. This was tested using git version 2.15.1\ninstalled via Homebrew on MacOS. I did not test with the built-in\nversion of git on MacOS.\n\nThanks,\nSteve\n\n# Create a new repository\nmkdir repoA && cd repoA\ngit init\necho \"Test File in Repo A\" > FileA\ngit add -A && git commit -m 'Initial commit in repo A'\n\n# Create a second repository\ncd .. && mkdir repoB && cd repoB\ngit init\necho \"Test File in Repo B\" > FileB\ngit add -A && git commit -m 'Initial commit in repo B'\n\n# Create a signed commit in repo B\necho \"Signed Commit\" >> FileB\ngit commit -a -S  -m 'Signed commit in repo B'\n\n# Now, add repoB as a subtree of RepoA\ncd ../repoA\ngit subtree add --prefix repoB_subtree/ ../repoB/ master --squash\n# Output:\ngit fetch ../repoB/ master\nwarning: no common commits\nremote: Counting objects: 6, done.\nremote: Compressing objects: 100% (2/2), done.\nremote: Total 6 (delta 0), reused 0 (delta 0)\nUnpacking objects: 100% (6/6), done.\nFrom ../repoB\n * branch            master     -> FETCH_HEAD\nfatal: Not a valid object name gpg: Signature made Sat Jan  6 17:38:31 2018 EST\ngpg:                using RSA key 6900E9CFDD39B6A741D601F50999759F2DCF3E7C\ngpg: Good signature from \"Stephen Robert Guglielmo (Temple University\nComputer Services) <srg@temple.edu>\" [ultimate]\nPrimary key fingerprint: 6900 E9CF DD39 B6A7 41D6  01F5 0999 759F 2DCF 3E7C\n4b700b1a4ebb9e2c1011aafd6b0f720b38f059a4\n# Note, git exits with status 128 at this point.\n\n# FileB was in fact added and staged to repoA, despite the \"fatal\"\nabove. Commit it:\ngit commit -m 'Add repoB subtree'\n\n# Ok, let's make another commit in repoB and try a `subtree pull`\ninstead of `subtree add`\ncd ../repoB\necho \"Another Line\" >> FileB\ngit commit -a -S -m 'Another signed commit'\ncd ../repoA\ngit subtree pull --prefix repoB_subtree/ ../repoB master --squash\n# Output:\nwarning: no common commits\nremote: Counting objects: 9, done.\nremote: Compressing objects: 100% (3/3), done.\nremote: Total 9 (delta 0), reused 0 (delta 0)\nUnpacking objects: 100% (9/9), done.\nFrom ../repoB\n * branch            master     -> FETCH_HEAD\nCan't squash-merge: 'repoB_subtree' was never added.\n# Note, git exits with status 1 at this point.\n\n# RepoB's third commit ('Another signed commit') is not pulled into\nthe subree in repo A.\n# This can be verified by running a diff:\ndiff -qr --exclude \".git\" repoB_subtree ../repoB\n# Output:\nFiles repoB_subtree/FileB and ../repoB/FileB differ\n"},{"id":"336801","messageId":"CADfK3RU4WJLV9EtieWYQzzRBoJkpyE+w178WQk+wj6soFwKW7g@mail.gmail.com","threadId":"47555","inReplyTo":"CADfK3RWXDuE=hYD==4sHXO1iJeOiVDOp7hBqhBtSn7gnQ+x7Qg@mail.gmail.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Stephen R Guglielmo","fromEmail":"srguglielmo@gmail.com","sentAt":"2018-01-18T16:19:10Z","receivedAt":"2018-01-18T16:19:25Z","isPatch":false,"sender":{"key":"srguglielmo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7794973?v=4"},"body":"Hi, just following up on this bug report. I have not heard back. Is\nthere additional information that's needed? Is there a better place to\nfile bug reports?\n\nThanks\n\nOn Sat, Jan 6, 2018 at 5:45 PM, Stephen R Guglielmo\n<srguglielmo@gmail.com> wrote:\n> Hi all,\n>\n> I've noticed an issue regarding the use of `git subtree add` and `git\n> subtree pull` when the subtree repository's commit (either HEAD or\n> whatever commit specified by the subtree command) is signed with GPG.\n> It seems to work properly if the commit is not signed but previous\n> commits are.\n>\n> The gist of the issue is that `git subtree add` does not add the\n> subree properly and a \"fatal: Not a valid object name\" error is\n> thrown. Running `git subtree pull` does not pull any upstream changes\n> after that (\"'subtree' was never added\").\n>\n> I have not done extensive testing, however, below are instructions to\n> reproduce the issue. This was tested using git version 2.15.1\n> installed via Homebrew on MacOS. I did not test with the built-in\n> version of git on MacOS.\n>\n> Thanks,\n> Steve\n>\n> # Create a new repository\n> mkdir repoA && cd repoA\n> git init\n> echo \"Test File in Repo A\" > FileA\n> git add -A && git commit -m 'Initial commit in repo A'\n>\n> # Create a second repository\n> cd .. && mkdir repoB && cd repoB\n> git init\n> echo \"Test File in Repo B\" > FileB\n> git add -A && git commit -m 'Initial commit in repo B'\n>\n> # Create a signed commit in repo B\n> echo \"Signed Commit\" >> FileB\n> git commit -a -S  -m 'Signed commit in repo B'\n>\n> # Now, add repoB as a subtree of RepoA\n> cd ../repoA\n> git subtree add --prefix repoB_subtree/ ../repoB/ master --squash\n> # Output:\n> git fetch ../repoB/ master\n> warning: no common commits\n> remote: Counting objects: 6, done.\n> remote: Compressing objects: 100% (2/2), done.\n> remote: Total 6 (delta 0), reused 0 (delta 0)\n> Unpacking objects: 100% (6/6), done.\n> From ../repoB\n>  * branch            master     -> FETCH_HEAD\n> fatal: Not a valid object name gpg: Signature made Sat Jan  6 17:38:31 2018 EST\n> gpg:                using RSA key 6900E9CFDD39B6A741D601F50999759F2DCF3E7C\n> gpg: Good signature from \"Stephen Robert Guglielmo (Temple University\n> Computer Services) <srg@temple.edu>\" [ultimate]\n> Primary key fingerprint: 6900 E9CF DD39 B6A7 41D6  01F5 0999 759F 2DCF 3E7C\n> 4b700b1a4ebb9e2c1011aafd6b0f720b38f059a4\n> # Note, git exits with status 128 at this point.\n>\n> # FileB was in fact added and staged to repoA, despite the \"fatal\"\n> above. Commit it:\n> git commit -m 'Add repoB subtree'\n>\n> # Ok, let's make another commit in repoB and try a `subtree pull`\n> instead of `subtree add`\n> cd ../repoB\n> echo \"Another Line\" >> FileB\n> git commit -a -S -m 'Another signed commit'\n> cd ../repoA\n> git subtree pull --prefix repoB_subtree/ ../repoB master --squash\n> # Output:\n> warning: no common commits\n> remote: Counting objects: 9, done.\n> remote: Compressing objects: 100% (3/3), done.\n> remote: Total 9 (delta 0), reused 0 (delta 0)\n> Unpacking objects: 100% (9/9), done.\n> From ../repoB\n>  * branch            master     -> FETCH_HEAD\n> Can't squash-merge: 'repoB_subtree' was never added.\n> # Note, git exits with status 1 at this point.\n>\n> # RepoB's third commit ('Another signed commit') is not pulled into\n> the subree in repo A.\n> # This can be verified by running a diff:\n> diff -qr --exclude \".git\" repoB_subtree ../repoB\n> # Output:\n> Files repoB_subtree/FileB and ../repoB/FileB differ\n"},{"id":"337799","messageId":"CADfK3RVJdk3zK7+eE45-PSkb=_v86wrC0TzY+hUmAkfO0Dea=w@mail.gmail.com","threadId":"47555","inReplyTo":"CADfK3RU4WJLV9EtieWYQzzRBoJkpyE+w178WQk+wj6soFwKW7g@mail.gmail.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Stephen R Guglielmo","fromEmail":"srguglielmo@gmail.com","sentAt":"2018-01-30T19:15:30Z","receivedAt":"2018-01-30T19:15:37Z","isPatch":false,"sender":{"key":"srguglielmo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7794973?v=4"},"body":"Hi, just following up on this bug report. I have not heard back. Is\nthere additional information that's needed? Is there a better place to\nfile bug reports?\n\nAdditionally, I have confirmed that this bug still exists with git\nversion 2.16.1.\n\nThanks\n\nOn Thu, Jan 18, 2018 at 11:19 AM, Stephen R Guglielmo\n<srguglielmo@gmail.com> wrote:\n> Hi, just following up on this bug report. I have not heard back. Is\n> there additional information that's needed? Is there a better place to\n> file bug reports?\n>\n> Thanks\n>\n> On Sat, Jan 6, 2018 at 5:45 PM, Stephen R Guglielmo\n> <srguglielmo@gmail.com> wrote:\n>> Hi all,\n>>\n>> I've noticed an issue regarding the use of `git subtree add` and `git\n>> subtree pull` when the subtree repository's commit (either HEAD or\n>> whatever commit specified by the subtree command) is signed with GPG.\n>> It seems to work properly if the commit is not signed but previous\n>> commits are.\n>>\n>> The gist of the issue is that `git subtree add` does not add the\n>> subree properly and a \"fatal: Not a valid object name\" error is\n>> thrown. Running `git subtree pull` does not pull any upstream changes\n>> after that (\"'subtree' was never added\").\n>>\n>> I have not done extensive testing, however, below are instructions to\n>> reproduce the issue. This was tested using git version 2.15.1\n>> installed via Homebrew on MacOS. I did not test with the built-in\n>> version of git on MacOS.\n>>\n>> Thanks,\n>> Steve\n>>\n>> # Create a new repository\n>> mkdir repoA && cd repoA\n>> git init\n>> echo \"Test File in Repo A\" > FileA\n>> git add -A && git commit -m 'Initial commit in repo A'\n>>\n>> # Create a second repository\n>> cd .. && mkdir repoB && cd repoB\n>> git init\n>> echo \"Test File in Repo B\" > FileB\n>> git add -A && git commit -m 'Initial commit in repo B'\n>>\n>> # Create a signed commit in repo B\n>> echo \"Signed Commit\" >> FileB\n>> git commit -a -S  -m 'Signed commit in repo B'\n>>\n>> # Now, add repoB as a subtree of RepoA\n>> cd ../repoA\n>> git subtree add --prefix repoB_subtree/ ../repoB/ master --squash\n>> # Output:\n>> git fetch ../repoB/ master\n>> warning: no common commits\n>> remote: Counting objects: 6, done.\n>> remote: Compressing objects: 100% (2/2), done.\n>> remote: Total 6 (delta 0), reused 0 (delta 0)\n>> Unpacking objects: 100% (6/6), done.\n>> From ../repoB\n>>  * branch            master     -> FETCH_HEAD\n>> fatal: Not a valid object name gpg: Signature made Sat Jan  6 17:38:31 2018 EST\n>> gpg:                using RSA key 6900E9CFDD39B6A741D601F50999759F2DCF3E7C\n>> gpg: Good signature from \"Stephen Robert Guglielmo (Temple University\n>> Computer Services) <srg@temple.edu>\" [ultimate]\n>> Primary key fingerprint: 6900 E9CF DD39 B6A7 41D6  01F5 0999 759F 2DCF 3E7C\n>> 4b700b1a4ebb9e2c1011aafd6b0f720b38f059a4\n>> # Note, git exits with status 128 at this point.\n>>\n>> # FileB was in fact added and staged to repoA, despite the \"fatal\"\n>> above. Commit it:\n>> git commit -m 'Add repoB subtree'\n>>\n>> # Ok, let's make another commit in repoB and try a `subtree pull`\n>> instead of `subtree add`\n>> cd ../repoB\n>> echo \"Another Line\" >> FileB\n>> git commit -a -S -m 'Another signed commit'\n>> cd ../repoA\n>> git subtree pull --prefix repoB_subtree/ ../repoB master --squash\n>> # Output:\n>> warning: no common commits\n>> remote: Counting objects: 9, done.\n>> remote: Compressing objects: 100% (3/3), done.\n>> remote: Total 9 (delta 0), reused 0 (delta 0)\n>> Unpacking objects: 100% (9/9), done.\n>> From ../repoB\n>>  * branch            master     -> FETCH_HEAD\n>> Can't squash-merge: 'repoB_subtree' was never added.\n>> # Note, git exits with status 1 at this point.\n>>\n>> # RepoB's third commit ('Another signed commit') is not pulled into\n>> the subree in repo A.\n>> # This can be verified by running a diff:\n>> diff -qr --exclude \".git\" repoB_subtree ../repoB\n>> # Output:\n>> Files repoB_subtree/FileB and ../repoB/FileB differ\n"},{"id":"337855","messageId":"CAGZ79kafgyOujDM4BsXdDUnP+iFk5mp2bYnX-Q65khW-weEhUg@mail.gmail.com","threadId":"47555","inReplyTo":"CADfK3RVJdk3zK7+eE45-PSkb=_v86wrC0TzY+hUmAkfO0Dea=w@mail.gmail.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-01-30T23:17:31Z","receivedAt":"2018-01-30T23:17:37Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Tue, Jan 30, 2018 at 11:15 AM, Stephen R Guglielmo\n<srguglielmo@gmail.com> wrote:\n> Hi, just following up on this bug report. I have not heard back. Is\n> there additional information that's needed? Is there a better place to\n> file bug reports?\n>\n> Additionally, I have confirmed that this bug still exists with git\n> version 2.16.1.\n>\n> Thanks\n>\n> On Thu, Jan 18, 2018 at 11:19 AM, Stephen R Guglielmo\n> <srguglielmo@gmail.com> wrote:\n>> Hi, just following up on this bug report. I have not heard back. Is\n>> there additional information that's needed? Is there a better place to\n>> file bug reports?\n>>\n>> Thanks\n>>\n>> On Sat, Jan 6, 2018 at 5:45 PM, Stephen R Guglielmo\n>> <srguglielmo@gmail.com> wrote:\n>>> Hi all,\n>>>\n>>> I've noticed an issue regarding the use of `git subtree add` and `git\n>>> subtree pull` when the subtree repository's commit (either HEAD or\n>>> whatever commit specified by the subtree command) is signed with GPG.\n>>> It seems to work properly if the commit is not signed but previous\n>>> commits are.\n>>>\n>>> The gist of the issue is that `git subtree add` does not add the\n>>> subree properly and a \"fatal: Not a valid object name\" error is\n>>> thrown. Running `git subtree pull` does not pull any upstream changes\n>>> after that (\"'subtree' was never added\").\n>>>\n>>> I have not done extensive testing, however, below are instructions to\n>>> reproduce the issue. This was tested using git version 2.15.1\n>>> installed via Homebrew on MacOS. I did not test with the built-in\n>>> version of git on MacOS.\n>>>\n>>> Thanks,\n>>> Steve\n>>>\n>>> # Create a new repository\n>>> mkdir repoA && cd repoA\n>>> git init\n>>> echo \"Test File in Repo A\" > FileA\n>>> git add -A && git commit -m 'Initial commit in repo A'\n>>>\n>>> # Create a second repository\n>>> cd .. && mkdir repoB && cd repoB\n>>> git init\n>>> echo \"Test File in Repo B\" > FileB\n>>> git add -A && git commit -m 'Initial commit in repo B'\n>>>\n>>> # Create a signed commit in repo B\n>>> echo \"Signed Commit\" >> FileB\n>>> git commit -a -S  -m 'Signed commit in repo B'\n>>>\n>>> # Now, add repoB as a subtree of RepoA\n>>> cd ../repoA\n>>> git subtree add --prefix repoB_subtree/ ../repoB/ master --squash\n>>> # Output:\n>>> git fetch ../repoB/ master\n>>> warning: no common commits\n>>> remote: Counting objects: 6, done.\n>>> remote: Compressing objects: 100% (2/2), done.\n>>> remote: Total 6 (delta 0), reused 0 (delta 0)\n>>> Unpacking objects: 100% (6/6), done.\n>>> From ../repoB\n>>>  * branch            master     -> FETCH_HEAD\n>>> fatal: Not a valid object name gpg: Signature made Sat Jan  6 17:38:31 2018 EST\n>>> gpg:                using RSA key 6900E9CFDD39B6A741D601F50999759F2DCF3E7C\n>>> gpg: Good signature from \"Stephen Robert Guglielmo (Temple University\n>>> Computer Services) <srg@temple.edu>\" [ultimate]\n>>> Primary key fingerprint: 6900 E9CF DD39 B6A7 41D6  01F5 0999 759F 2DCF 3E7C\n>>> 4b700b1a4ebb9e2c1011aafd6b0f720b38f059a4\n>>> # Note, git exits with status 128 at this point.\n>>>\n>>> # FileB was in fact added and staged to repoA, despite the \"fatal\"\n>>> above. Commit it:\n>>> git commit -m 'Add repoB subtree'\n>>>\n>>> # Ok, let's make another commit in repoB and try a `subtree pull`\n>>> instead of `subtree add`\n>>> cd ../repoB\n>>> echo \"Another Line\" >> FileB\n>>> git commit -a -S -m 'Another signed commit'\n>>> cd ../repoA\n>>> git subtree pull --prefix repoB_subtree/ ../repoB master --squash\n>>> # Output:\n>>> warning: no common commits\n>>> remote: Counting objects: 9, done.\n>>> remote: Compressing objects: 100% (3/3), done.\n>>> remote: Total 9 (delta 0), reused 0 (delta 0)\n>>> Unpacking objects: 100% (9/9), done.\n>>> From ../repoB\n>>>  * branch            master     -> FETCH_HEAD\n>>> Can't squash-merge: 'repoB_subtree' was never added.\n>>> # Note, git exits with status 1 at this point.\n>>>\n>>> # RepoB's third commit ('Another signed commit') is not pulled into\n>>> the subree in repo A.\n>>> # This can be verified by running a diff:\n>>> diff -qr --exclude \".git\" repoB_subtree ../repoB\n>>> # Output:\n>>> Files repoB_subtree/FileB and ../repoB/FileB differ\n\nThere has not been feedback for a while on this thread.\nI think that is because subtrees are not in anyone's hot\ninterest area currently.\n\nThis is definitely the right place to submit&discuss bugs.\nLooking through \"git log --format=\"%ae %s\" -S subtree\",\nit seems as if Avery (apenwarr@gmail.com) was mostly\ninterested in developing subtrees, though I think he has\nmoved on. Originally it was invented by Junio, who is\nthe active maintainer of the project in 68faf68938\n(A new merge stragety 'subtree'., 2007-02-15)\n\nThanks,\nStefan\n"},{"id":"337857","messageId":"xmqqy3kfq6a9.fsf@gitster-ct.c.googlers.com","threadId":"47555","inReplyTo":"CAGZ79kafgyOujDM4BsXdDUnP+iFk5mp2bYnX-Q65khW-weEhUg@mail.gmail.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-01-30T23:24:30Z","receivedAt":"2018-01-30T23:24:38Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Beller <sbeller@google.com> writes:\n\n> There has not been feedback for a while on this thread.\n> I think that is because subtrees are not in anyone's hot\n> interest area currently.\n>\n> This is definitely the right place to submit&discuss bugs.\n> Looking through \"git log --format=\"%ae %s\" -S subtree\",\n> it seems as if Avery (apenwarr@gmail.com) was mostly\n> interested in developing subtrees, though I think he has\n> moved on. Originally it was invented by Junio, who is\n> the active maintainer of the project in 68faf68938\n> (A new merge stragety 'subtree'., 2007-02-15)\n\nThanks for trying to help, but I have *NOTHING* to do with the \"git\nsubtree\" subcommand (and I personally have no interest in it).  What\nI did was a subtree merge strategy (i.e. \"git merge -s subtree\"),\nwhich is totally a different thing.\n\nDavid Greene offered to take it over in 2015, and then we saw some\nactivity by David Aguilar in 2016, but otherwise the subcommand from\ncontrib/ has pretty much been dormant these days.\n\n"},{"id":"337858","messageId":"CAHqTa-0kdkDUjH1nw=4JPAivtyL84zfZ5t8Dj1UYXPrMd7Poqw@mail.gmail.com","threadId":"47555","inReplyTo":"xmqqy3kfq6a9.fsf@gitster-ct.c.googlers.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2018-01-30T23:37:39Z","receivedAt":"2018-01-30T23:38:06Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Tue, Jan 30, 2018 at 6:24 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Stefan Beller <sbeller@google.com> writes:\n>> There has not been feedback for a while on this thread.\n>> I think that is because subtrees are not in anyone's hot\n>> interest area currently.\n>>\n>> This is definitely the right place to submit&discuss bugs.\n>> Looking through \"git log --format=\"%ae %s\" -S subtree\",\n>> it seems as if Avery (apenwarr@gmail.com) was mostly\n>> interested in developing subtrees, though I think he has\n>> moved on. Originally it was invented by Junio, who is\n>> the active maintainer of the project in 68faf68938\n>> (A new merge stragety 'subtree'., 2007-02-15)\n>\n> Thanks for trying to help, but I have *NOTHING* to do with the \"git\n> subtree\" subcommand (and I personally have no interest in it).  What\n> I did was a subtree merge strategy (i.e. \"git merge -s subtree\"),\n> which is totally a different thing.\n>\n> David Greene offered to take it over in 2015, and then we saw some\n> activity by David Aguilar in 2016, but otherwise the subcommand from\n> contrib/ has pretty much been dormant these days.\n\nStrictly speaking, the 'git subtree' command does in fact use 'git\nmerge -s subtree' under the covers, so Junio is at least partly\nresponsible for giving me the idea :)\n\nI actually have never looked into how signed commits work and although\nI still use git-subtree occasionally (it hasn't needed any\nmaintenance, for my simple use cases), I have never used it with\nsigned commits.\n\ngit-subtree maintains a cache that maps commit ids in the \"original\nproject\" with their equivalents in the \"merged project.\"  If there's\nsomething magic about how commit ids work with signed commits, I could\nimagine that causing the \"no a valid object name\" problems.  Or,\ngit-subtree in --squash mode actually generates new commit objects\nusing some magic of its own.  If it were to accidentally copy a\nsignature into a commit that no longer matches the original, I imagine\nthat new object might get rejected.\n\nUnfortunately I don't have time to look into it.  The git-subtree code\nis pretty straightforward, though, so if Stephen has an hour or two to\nlook deeper it's probably possible to fix it up.  The tool is not\nactually as magical and difficult as it might seem at first glance :)\n\nSorry I can't help more.\n\nGood luck,\n\nAvery\n"},{"id":"337951","messageId":"CADfK3RXOqB7wKnXCWxgyDeov-Y7rVQiWFUa_hKZk=j9ReY9JDQ@mail.gmail.com","threadId":"47555","inReplyTo":"CAHqTa-0kdkDUjH1nw=4JPAivtyL84zfZ5t8Dj1UYXPrMd7Poqw@mail.gmail.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Stephen R Guglielmo","fromEmail":"srguglielmo@gmail.com","sentAt":"2018-01-31T12:33:57Z","receivedAt":"2018-01-31T12:34:05Z","isPatch":false,"sender":{"key":"srguglielmo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7794973?v=4"},"body":"On Tue, Jan 30, 2018 at 6:37 PM, Avery Pennarun <apenwarr@gmail.com> wrote:\n> On Tue, Jan 30, 2018 at 6:24 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Stefan Beller <sbeller@google.com> writes:\n>>> There has not been feedback for a while on this thread.\n>>> I think that is because subtrees are not in anyone's hot\n>>> interest area currently.\n>>>\n>>> This is definitely the right place to submit&discuss bugs.\n>>> Looking through \"git log --format=\"%ae %s\" -S subtree\",\n>>> it seems as if Avery (apenwarr@gmail.com) was mostly\n>>> interested in developing subtrees, though I think he has\n>>> moved on. Originally it was invented by Junio, who is\n>>> the active maintainer of the project in 68faf68938\n>>> (A new merge stragety 'subtree'., 2007-02-15)\n>>\n>> Thanks for trying to help, but I have *NOTHING* to do with the \"git\n>> subtree\" subcommand (and I personally have no interest in it).  What\n>> I did was a subtree merge strategy (i.e. \"git merge -s subtree\"),\n>> which is totally a different thing.\n>>\n>> David Greene offered to take it over in 2015, and then we saw some\n>> activity by David Aguilar in 2016, but otherwise the subcommand from\n>> contrib/ has pretty much been dormant these days.\n>\n> Strictly speaking, the 'git subtree' command does in fact use 'git\n> merge -s subtree' under the covers, so Junio is at least partly\n> responsible for giving me the idea :)\n>\n> I actually have never looked into how signed commits work and although\n> I still use git-subtree occasionally (it hasn't needed any\n> maintenance, for my simple use cases), I have never used it with\n> signed commits.\n>\n> git-subtree maintains a cache that maps commit ids in the \"original\n> project\" with their equivalents in the \"merged project.\"  If there's\n> something magic about how commit ids work with signed commits, I could\n> imagine that causing the \"no a valid object name\" problems.  Or,\n> git-subtree in --squash mode actually generates new commit objects\n> using some magic of its own.  If it were to accidentally copy a\n> signature into a commit that no longer matches the original, I imagine\n> that new object might get rejected.\n>\n> Unfortunately I don't have time to look into it.  The git-subtree code\n> is pretty straightforward, though, so if Stephen has an hour or two to\n> look deeper it's probably possible to fix it up.  The tool is not\n> actually as magical and difficult as it might seem at first glance :)\n>\n> Sorry I can't help more.\n>\n> Good luck,\n>\n> Avery\n\nThanks all for the discussion/replies.\n\nWe use subtrees extensively in our environment right now. The \"sub\"\nrepos (90+) are located on GitHub, while the \"main/parent\" repo is\nprovided by a vendor on website hosting infrastructure.\n\nI will take a look at:\ngit/Documentation/CodingGuidelines\ngit/Documentation/SubmittingPatches\ngit/contrib/subtree/\n\nShould I follow up in this thread with a patch (it might be a while)?\n\nThanks!\nSteve\n"},{"id":"338134","messageId":"xmqqpo5narmz.fsf@gitster-ct.c.googlers.com","threadId":"47555","inReplyTo":"CADfK3RXOqB7wKnXCWxgyDeov-Y7rVQiWFUa_hKZk=j9ReY9JDQ@mail.gmail.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-02-02T23:39:00Z","receivedAt":"2018-02-02T23:39:07Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stephen R Guglielmo <srguglielmo@gmail.com> writes:\n\n> On Tue, Jan 30, 2018 at 6:37 PM, Avery Pennarun <apenwarr@gmail.com> wrote:\n>>\n>> Sorry I can't help more.\n>>\n>> Good luck,\n>>\n>> Avery\n>\n> Thanks all for the discussion/replies.\n>\n> We use subtrees extensively in our environment right now. The \"sub\"\n> repos (90+) are located on GitHub, while the \"main/parent\" repo is\n> provided by a vendor on website hosting infrastructure.\n>\n> I will take a look at:\n> git/Documentation/CodingGuidelines\n> git/Documentation/SubmittingPatches\n> git/contrib/subtree/\n>\n> Should I follow up in this thread with a patch (it might be a while)?\n\nThese three are good place to start at.  You may find the output of\n\"git shortlog --no-merges --since=N.months contrib/subtree\" and \"git\nblame contrib/subtree\" also a good source of whom to ask for help.\nAs we said on this thread, this is a corner of the contrib/ section\nthat nobody seems to be actively working on, so if you really depend\non it working well, you might have to take the ownership of it ;-)\n\nThanks.\n\n\n"},{"id":"338218","messageId":"CADfK3RWAcb0m+m_U51JLA9tNyru_7XEsfy55i5EUsKh98jGFtA@mail.gmail.com","threadId":"47555","inReplyTo":"CADfK3RXOqB7wKnXCWxgyDeov-Y7rVQiWFUa_hKZk=j9ReY9JDQ@mail.gmail.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Stephen R Guglielmo","fromEmail":"srguglielmo@gmail.com","sentAt":"2018-02-05T14:30:18Z","receivedAt":"2018-02-05T14:30:26Z","isPatch":false,"sender":{"key":"srguglielmo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7794973?v=4"},"body":"On Wed, Jan 31, 2018 at 7:33 AM, Stephen R Guglielmo\n<srguglielmo@gmail.com> wrote:\n> On Tue, Jan 30, 2018 at 6:37 PM, Avery Pennarun <apenwarr@gmail.com> wrote:\n>> On Tue, Jan 30, 2018 at 6:24 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>> Stefan Beller <sbeller@google.com> writes:\n>>>> There has not been feedback for a while on this thread.\n>>>> I think that is because subtrees are not in anyone's hot\n>>>> interest area currently.\n>>>>\n>>>> This is definitely the right place to submit&discuss bugs.\n>>>> Looking through \"git log --format=\"%ae %s\" -S subtree\",\n>>>> it seems as if Avery (apenwarr@gmail.com) was mostly\n>>>> interested in developing subtrees, though I think he has\n>>>> moved on. Originally it was invented by Junio, who is\n>>>> the active maintainer of the project in 68faf68938\n>>>> (A new merge stragety 'subtree'., 2007-02-15)\n>>>\n>>> Thanks for trying to help, but I have *NOTHING* to do with the \"git\n>>> subtree\" subcommand (and I personally have no interest in it).  What\n>>> I did was a subtree merge strategy (i.e. \"git merge -s subtree\"),\n>>> which is totally a different thing.\n>>>\n>>> David Greene offered to take it over in 2015, and then we saw some\n>>> activity by David Aguilar in 2016, but otherwise the subcommand from\n>>> contrib/ has pretty much been dormant these days.\n>>\n>> Strictly speaking, the 'git subtree' command does in fact use 'git\n>> merge -s subtree' under the covers, so Junio is at least partly\n>> responsible for giving me the idea :)\n>>\n>> I actually have never looked into how signed commits work and although\n>> I still use git-subtree occasionally (it hasn't needed any\n>> maintenance, for my simple use cases), I have never used it with\n>> signed commits.\n>>\n>> git-subtree maintains a cache that maps commit ids in the \"original\n>> project\" with their equivalents in the \"merged project.\"  If there's\n>> something magic about how commit ids work with signed commits, I could\n>> imagine that causing the \"no a valid object name\" problems.  Or,\n>> git-subtree in --squash mode actually generates new commit objects\n>> using some magic of its own.  If it were to accidentally copy a\n>> signature into a commit that no longer matches the original, I imagine\n>> that new object might get rejected.\n>>\n>> Unfortunately I don't have time to look into it.  The git-subtree code\n>> is pretty straightforward, though, so if Stephen has an hour or two to\n>> look deeper it's probably possible to fix it up.  The tool is not\n>> actually as magical and difficult as it might seem at first glance :)\n>>\n>> Sorry I can't help more.\n>>\n>> Good luck,\n>>\n>> Avery\n>\n> Thanks all for the discussion/replies.\n>\n> We use subtrees extensively in our environment right now. The \"sub\"\n> repos (90+) are located on GitHub, while the \"main/parent\" repo is\n> provided by a vendor on website hosting infrastructure.\n>\n> I will take a look at:\n> git/Documentation/CodingGuidelines\n> git/Documentation/SubmittingPatches\n> git/contrib/subtree/\n>\n> Should I follow up in this thread with a patch (it might be a while)?\n>\n> Thanks!\n> Steve\n\nHi all,\n\nIt looks like I've found the cause of the issue. I have\nlog.showsignature=true in my gitconfig. The toptree_for_commit()\nfunction calls `git log` and passes the output to `git commit-tree` in\nnew_squash_commit(). Apparently commit-tree doesn't like GPG sigs.\n\nThe fix was simple: --no-show-signature. However, I believe this was\nadded in git v2.10.0, so it's not fully backwards compatible. I'm open\nto suggestions on a better fix if this is not acceptable.\n\nThanks!\n\n\nhttps://github.com/srguglielmo/git/commit/822c8a45d049f86ea5c59c0b434303964e4e6f3d\n\n\n\ndiff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh\nindex cc033af73..dec085a23 100755\n--- a/contrib/subtree/git-subtree.sh\n+++ b/contrib/subtree/git-subtree.sh\n@@ -475,7 +475,7 @@ squash_msg () {\n\n toptree_for_commit () {\n        commit=\"$1\"\n-       git log -1 --pretty=format:'%T' \"$commit\" -- || exit $?\n+       git log --no-show-signature -1 --pretty=format:'%T' \"$commit\"\n-- || exit $?\n }\n\n subtree_for_commit () {\n"},{"id":"338219","messageId":"CADfK3RV7qhh44kW-b+ageepmK3XYoV2917b1xmz7zP53wKYgAA@mail.gmail.com","threadId":"47555","inReplyTo":"CADfK3RWAcb0m+m_U51JLA9tNyru_7XEsfy55i5EUsKh98jGFtA@mail.gmail.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Stephen R Guglielmo","fromEmail":"srguglielmo@gmail.com","sentAt":"2018-02-05T14:40:25Z","receivedAt":"2018-02-05T14:40:37Z","isPatch":false,"sender":{"key":"srguglielmo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7794973?v=4"},"body":"On Mon, Feb 5, 2018 at 9:30 AM, Stephen R Guglielmo\n<srguglielmo@gmail.com> wrote:\n> On Wed, Jan 31, 2018 at 7:33 AM, Stephen R Guglielmo\n> <srguglielmo@gmail.com> wrote:\n>> On Tue, Jan 30, 2018 at 6:37 PM, Avery Pennarun <apenwarr@gmail.com> wrote:\n>>> On Tue, Jan 30, 2018 at 6:24 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>>> Stefan Beller <sbeller@google.com> writes:\n>>>>> There has not been feedback for a while on this thread.\n>>>>> I think that is because subtrees are not in anyone's hot\n>>>>> interest area currently.\n>>>>>\n>>>>> This is definitely the right place to submit&discuss bugs.\n>>>>> Looking through \"git log --format=\"%ae %s\" -S subtree\",\n>>>>> it seems as if Avery (apenwarr@gmail.com) was mostly\n>>>>> interested in developing subtrees, though I think he has\n>>>>> moved on. Originally it was invented by Junio, who is\n>>>>> the active maintainer of the project in 68faf68938\n>>>>> (A new merge stragety 'subtree'., 2007-02-15)\n>>>>\n>>>> Thanks for trying to help, but I have *NOTHING* to do with the \"git\n>>>> subtree\" subcommand (and I personally have no interest in it).  What\n>>>> I did was a subtree merge strategy (i.e. \"git merge -s subtree\"),\n>>>> which is totally a different thing.\n>>>>\n>>>> David Greene offered to take it over in 2015, and then we saw some\n>>>> activity by David Aguilar in 2016, but otherwise the subcommand from\n>>>> contrib/ has pretty much been dormant these days.\n>>>\n>>> Strictly speaking, the 'git subtree' command does in fact use 'git\n>>> merge -s subtree' under the covers, so Junio is at least partly\n>>> responsible for giving me the idea :)\n>>>\n>>> I actually have never looked into how signed commits work and although\n>>> I still use git-subtree occasionally (it hasn't needed any\n>>> maintenance, for my simple use cases), I have never used it with\n>>> signed commits.\n>>>\n>>> git-subtree maintains a cache that maps commit ids in the \"original\n>>> project\" with their equivalents in the \"merged project.\"  If there's\n>>> something magic about how commit ids work with signed commits, I could\n>>> imagine that causing the \"no a valid object name\" problems.  Or,\n>>> git-subtree in --squash mode actually generates new commit objects\n>>> using some magic of its own.  If it were to accidentally copy a\n>>> signature into a commit that no longer matches the original, I imagine\n>>> that new object might get rejected.\n>>>\n>>> Unfortunately I don't have time to look into it.  The git-subtree code\n>>> is pretty straightforward, though, so if Stephen has an hour or two to\n>>> look deeper it's probably possible to fix it up.  The tool is not\n>>> actually as magical and difficult as it might seem at first glance :)\n>>>\n>>> Sorry I can't help more.\n>>>\n>>> Good luck,\n>>>\n>>> Avery\n>>\n>> Thanks all for the discussion/replies.\n>>\n>> We use subtrees extensively in our environment right now. The \"sub\"\n>> repos (90+) are located on GitHub, while the \"main/parent\" repo is\n>> provided by a vendor on website hosting infrastructure.\n>>\n>> I will take a look at:\n>> git/Documentation/CodingGuidelines\n>> git/Documentation/SubmittingPatches\n>> git/contrib/subtree/\n>>\n>> Should I follow up in this thread with a patch (it might be a while)?\n>>\n>> Thanks!\n>> Steve\n>\n> Hi all,\n>\n> It looks like I've found the cause of the issue. I have\n> log.showsignature=true in my gitconfig. The toptree_for_commit()\n> function calls `git log` and passes the output to `git commit-tree` in\n> new_squash_commit(). Apparently commit-tree doesn't like GPG sigs.\n>\n> The fix was simple: --no-show-signature. However, I believe this was\n> added in git v2.10.0, so it's not fully backwards compatible. I'm open\n> to suggestions on a better fix if this is not acceptable.\n>\n> Thanks!\n>\n>\n> https://github.com/srguglielmo/git/commit/822c8a45d049f86ea5c59c0b434303964e4e6f3d\n>\n>\n>\n> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh\n> index cc033af73..dec085a23 100755\n> --- a/contrib/subtree/git-subtree.sh\n> +++ b/contrib/subtree/git-subtree.sh\n> @@ -475,7 +475,7 @@ squash_msg () {\n>\n>  toptree_for_commit () {\n>         commit=\"$1\"\n> -       git log -1 --pretty=format:'%T' \"$commit\" -- || exit $?\n> +       git log --no-show-signature -1 --pretty=format:'%T' \"$commit\"\n> -- || exit $?\n>  }\n>\n>  subtree_for_commit () {\n\nHey again,\n\nActually, to follow up on this, I added --no-show-signature to several\nother locations. The above patch fixes the fatal, however the GPG sig\ninfo is still included in the commit merge message for `subtree pull`.\nThis fixes that as well.\n\nhttps://github.com/srguglielmo/git/commit/ebd2f628ddb960931aac5087c45a54b953976e99\n\n\ndiff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh\nindex cc033af73..8126132dc 100755\n--- a/contrib/subtree/git-subtree.sh\n+++ b/contrib/subtree/git-subtree.sh\n@@ -297,7 +297,7 @@ find_latest_squash () {\n        main=\n        sub=\n        git log --grep=\"^git-subtree-dir: $dir/*\\$\" \\\n-               --pretty=format:'START %H%n%s%n%n%b%nEND%n' HEAD |\n+               --no-show-signature --pretty=format:'START\n%H%n%s%n%n%b%nEND%n' HEAD |\n        while read a b junk\n        do\n                debug \"$a $b $junk\"\n@@ -341,7 +341,7 @@ find_existing_splits () {\n        main=\n        sub=\n        git log --grep=\"^git-subtree-dir: $dir/*\\$\" \\\n-               --pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs |\n+               --no-show-signature --pretty=format:'START\n%H%n%s%n%n%b%nEND%n' $revs |\n        while read a b junk\n        do\n                case \"$a\" in\n@@ -382,7 +382,7 @@ copy_commit () {\n        # We're going to set some environment vars here, so\n        # do it in a subshell to get rid of them safely later\n        debug copy_commit \"{$1}\" \"{$2}\" \"{$3}\"\n-       git log -1 --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' \"$1\" |\n+       git log --no-show-signature -1\n--pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' \"$1\" |\n        (\n                read GIT_AUTHOR_NAME\n                read GIT_AUTHOR_EMAIL\n@@ -462,8 +462,8 @@ squash_msg () {\n                oldsub_short=$(git rev-parse --short \"$oldsub\")\n                echo \"Squashed '$dir/' changes from\n$oldsub_short..$newsub_short\"\n                echo\n-               git log --pretty=tformat:'%h %s' \"$oldsub..$newsub\"\n-               git log --pretty=tformat:'REVERT: %h %s' \"$newsub..$oldsub\"\n+               git log --no-show-signature --pretty=tformat:'%h %s'\n\"$oldsub..$newsub\"\n+               git log --no-show-signature --pretty=tformat:'REVERT:\n%h %s' \"$newsub..$oldsub\"\n        else\n                echo \"Squashed '$dir/' content from commit $newsub_short\"\n        fi\n"},{"id":"338227","messageId":"xmqqh8qvb7h4.fsf@gitster-ct.c.googlers.com","threadId":"47555","inReplyTo":"CADfK3RWAcb0m+m_U51JLA9tNyru_7XEsfy55i5EUsKh98jGFtA@mail.gmail.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-02-05T18:45:59Z","receivedAt":"2018-02-05T18:46:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stephen R Guglielmo <srguglielmo@gmail.com> writes:\n\n> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh\n> index cc033af73..dec085a23 100755\n> --- a/contrib/subtree/git-subtree.sh\n> +++ b/contrib/subtree/git-subtree.sh\n> @@ -475,7 +475,7 @@ squash_msg () {\n>\n>  toptree_for_commit () {\n>         commit=\"$1\"\n> -       git log -1 --pretty=format:'%T' \"$commit\" -- || exit $?\n> +       git log --no-show-signature -1 --pretty=format:'%T' \"$commit\"\n> -- || exit $?\n>  }\n\nGiven that all references to this shell function seem to do\n\n\tsometree=$(toptree_for_commit $something)\n\nand then $sometree is used as if it were a tree object name, I can\nunderstand why the lack of --no-show-signature in the original\nbreaks it when the user has show-signature configured.\n\nIt probably makes more sense to replace the \"git log\" with something\nmore appropirate for the job, like\n\n\tgit rev-parse --verify \"$commit^{tree}\"\n\nthough.\n"},{"id":"338701","messageId":"CADfK3RV1qo_jP=WD6ZF2U9bH2Xf+GJWbC9T4a3YK+C08O0O50Q@mail.gmail.com","threadId":"47555","inReplyTo":"xmqqh8qvb7h4.fsf@gitster-ct.c.googlers.com","subject":"Re: Bug Report: Subtrees and GPG Signed Commits","fromName":"Stephen R Guglielmo","fromEmail":"srguglielmo@gmail.com","sentAt":"2018-02-08T13:53:16Z","receivedAt":"2018-02-08T13:53:24Z","isPatch":false,"sender":{"key":"srguglielmo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7794973?v=4"},"body":"On Mon, Feb 5, 2018 at 1:45 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Given that all references to this shell function seem to do\n>\n>         sometree=$(toptree_for_commit $something)\n>\n> and then $sometree is used as if it were a tree object name, I can\n> understand why the lack of --no-show-signature in the original\n> breaks it when the user has show-signature configured.\n>\n> It probably makes more sense to replace the \"git log\" with something\n> more appropirate for the job, like\n>\n>         git rev-parse --verify \"$commit^{tree}\"\n>\n> though.\n\nJunio,\n\nThanks for the feedback. I read the documentation on `rev-parse` and I\nagree it makes more sense for this case. I've modified\n`toptree_for_commit()` to use `rev-parse` instead. However, there's a\nfew other calls to `log` that I'm not sure can be replaced. For those,\nI've kept `--no-show-signature`, making this require at least v2.10.0.\n\nBelow is the full diff against v2.16.1. Or, for the GitHub-savvy among us:\n\nhttps://github.com/srguglielmo/git/compare/8279ed033f703d4115bee620dccd32a9ec94d9aa...srguglielmo:4b92b4494da057ed52c2ff8c329457a1c294d135\n\nThanks,\nSteve\n\ndiff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh\nindex dec085a23..9594ca4b5 100755\n--- a/contrib/subtree/git-subtree.sh\n+++ b/contrib/subtree/git-subtree.sh\n@@ -297,7 +297,7 @@ find_latest_squash () {\n     main=\n     sub=\n     git log --grep=\"^git-subtree-dir: $dir/*\\$\" \\\n-        --pretty=format:'START %H%n%s%n%n%b%nEND%n' HEAD |\n+        --no-show-signature --pretty=format:'START %H%n%s%n%n%b%nEND%n' HEAD |\n     while read a b junk\n     do\n         debug \"$a $b $junk\"\n@@ -341,7 +341,7 @@ find_existing_splits () {\n     main=\n     sub=\n     git log --grep=\"^git-subtree-dir: $dir/*\\$\" \\\n-        --pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs |\n+        --no-show-signature --pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs |\n     while read a b junk\n     do\n         case \"$a\" in\n@@ -382,7 +382,7 @@ copy_commit () {\n     # We're going to set some environment vars here, so\n     # do it in a subshell to get rid of them safely later\n     debug copy_commit \"{$1}\" \"{$2}\" \"{$3}\"\n-    git log -1 --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' \"$1\" |\n+    git log --no-show-signature -1\n--pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' \"$1\" |\n     (\n         read GIT_AUTHOR_NAME\n         read GIT_AUTHOR_EMAIL\n@@ -462,8 +462,8 @@ squash_msg () {\n         oldsub_short=$(git rev-parse --short \"$oldsub\")\n         echo \"Squashed '$dir/' changes from $oldsub_short..$newsub_short\"\n         echo\n-        git log --pretty=tformat:'%h %s' \"$oldsub..$newsub\"\n-        git log --pretty=tformat:'REVERT: %h %s' \"$newsub..$oldsub\"\n+        git log --no-show-signature --pretty=tformat:'%h %s' \"$oldsub..$newsub\"\n+        git log --no-show-signature --pretty=tformat:'REVERT: %h %s'\n\"$newsub..$oldsub\"\n     else\n         echo \"Squashed '$dir/' content from commit $newsub_short\"\n     fi\n@@ -475,7 +475,7 @@ squash_msg () {\n\n toptree_for_commit () {\n     commit=\"$1\"\n-    git log -1 --pretty=format:'%T' \"$commit\" -- || exit $?\n+    git rev-parse --verify \"$commit^{tree}\" || exit $?\n }\n\n subtree_for_commit () {\n"}]}