{"thread":{"id":"44552","subject":"[PATCH] contrib/subtree: added --no-show-signature to git log invocation","startedAt":"2016-11-27T21:31:30Z","lastAt":"2016-11-27T21:31:30Z","messageCount":1,"participants":["Kieran Colford"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"306467","messageId":"20161127212159.30233-1-kieran@kcolford.com","threadId":"44552","inReplyTo":null,"subject":"[PATCH] contrib/subtree: added --no-show-signature to git log invocation","fromName":"Kieran Colford","fromEmail":"kieran@kcolford.com","sentAt":"2016-11-27T21:21:59Z","receivedAt":"2016-11-27T21:31:30Z","isPatch":true,"sender":{"key":"kieran@kcolford.com","avatar":null},"body":"When having log.showSignature enabled by default (as is good practice\nwith signed commits), it still shows the signature when git-subtree\npasses custom format specifiers to git-log.  This causes an error when\ntrying to push a subtree when signed commits are involved.\n\nAdding this command line flag fixes the above bug.  The command line\nflag was added to all invocations of git-log so that it would behave\nas expected by the original developers.\n\nThe flag could be more judiciously applied, but that requires a deeper\nunderstanding of the code.  It may be more desirable to disable\n--show-signature when any custom format specifier is given, but that\nchange has far more wide reaching consequences, as well as a change to\nthe documentation.\n\nSigned-off-by: Kieran Colford <kieran@kcolford.com>\n---\n contrib/subtree/git-subtree.sh | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh\nindex dec085a..d9e89d1 100755\n--- a/contrib/subtree/git-subtree.sh\n+++ b/contrib/subtree/git-subtree.sh\n@@ -296,7 +296,7 @@ find_latest_squash () {\n \tsq=\n \tmain=\n \tsub=\n-\tgit log --grep=\"^git-subtree-dir: $dir/*\\$\" \\\n+\tgit log --no-show-signature --grep=\"^git-subtree-dir: $dir/*\\$\" \\\n \t\t--pretty=format:'START %H%n%s%n%n%b%nEND%n' HEAD |\n \twhile read a b junk\n \tdo\n@@ -340,7 +340,7 @@ find_existing_splits () {\n \trevs=\"$2\"\n \tmain=\n \tsub=\n-\tgit log --grep=\"^git-subtree-dir: $dir/*\\$\" \\\n+\tgit log --no-show-signature --grep=\"^git-subtree-dir: $dir/*\\$\" \\\n \t\t--pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs |\n \twhile read a b junk\n \tdo\n@@ -382,7 +382,7 @@ copy_commit () {\n \t# We're going to set some environment vars here, so\n \t# do it in a subshell to get rid of them safely later\n \tdebug copy_commit \"{$1}\" \"{$2}\" \"{$3}\"\n-\tgit log -1 --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' \"$1\" |\n+\tgit log --no-show-signature -1 --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' \"$1\" |\n \t(\n \t\tread GIT_AUTHOR_NAME\n \t\tread GIT_AUTHOR_EMAIL\n@@ -462,8 +462,8 @@ squash_msg () {\n \t\toldsub_short=$(git rev-parse --short \"$oldsub\")\n \t\techo \"Squashed '$dir/' changes from $oldsub_short..$newsub_short\"\n \t\techo\n-\t\tgit log --pretty=tformat:'%h %s' \"$oldsub..$newsub\"\n-\t\tgit log --pretty=tformat:'REVERT: %h %s' \"$newsub..$oldsub\"\n+\t\tgit log --no-show-signature --pretty=tformat:'%h %s' \"$oldsub..$newsub\"\n+\t\tgit log --no-show-signature --pretty=tformat:'REVERT: %h %s' \"$newsub..$oldsub\"\n \telse\n \t\techo \"Squashed '$dir/' content from commit $newsub_short\"\n \tfi\n@@ -475,7 +475,7 @@ squash_msg () {\n \n toptree_for_commit () {\n \tcommit=\"$1\"\n-\tgit log -1 --pretty=format:'%T' \"$commit\" -- || exit $?\n+\tgit log --no-show-signature -1 --pretty=format:'%T' \"$commit\" -- || exit $?\n }\n \n subtree_for_commit () {\n-- \n2.10.2\n\n"}]}