{"thread":{"id":"47860","subject":"[PATCH] subtree: hide GPG signatures in calls to log","startedAt":"2018-02-16T03:34:11Z","lastAt":"2018-02-22T18:52:49Z","messageCount":2,"participants":["Stephen R Guglielmo","Stefan Beller"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"339528","messageId":"CADfK3RXjK9ExcSLLxkbkDvb2o_U9+7Ykua5cHEXc9+uUU17z9g@mail.gmail.com","threadId":"47860","inReplyTo":null,"subject":"[PATCH] subtree: hide GPG signatures in calls to log","fromName":"Stephen R Guglielmo","fromEmail":"srguglielmo@gmail.com","sentAt":"2018-02-16T03:34:03Z","receivedAt":"2018-02-16T03:34:11Z","isPatch":true,"sender":{"key":"srguglielmo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7794973?v=4"},"body":"This fixes `add` and `pull` for GPG signed objects.\n\nSigned-off-by: Stephen R Guglielmo <srg@guglielmo.us>\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 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-- \n2.16.1\n"},{"id":"339940","messageId":"CAGZ79kbyVAcVOJ0waD6Fi+9eEs1-gGySLY+A6Rs2_xxXMJbhLQ@mail.gmail.com","threadId":"47860","inReplyTo":"CADfK3RVMxv8RPYS34jhLq=0TievNwwKH2fgn=knPjxraXN=wUw@mail.gmail.com","subject":"Re: [PATCH] subtree: hide GPG signatures in calls to log","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-02-22T18:52:40Z","receivedAt":"2018-02-22T18:52:49Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, Feb 22, 2018 at 5:37 AM, Stephen R Guglielmo\n<srguglielmo@gmail.com> wrote:\n> On Feb 15, 2018 10:34 PM, \"Stephen R Guglielmo\" <srguglielmo@gmail.com>\n> wrote:\n>\n> This fixes `add` and `pull` for GPG signed objects.\n>\n> Signed-off-by: Stephen R Guglielmo <srg@guglielmo.us>\n\nYay! Thanks for a patch!\nI had to go back to the discussion\nhttps://public-inbox.org/git/CADfK3RV1qo_jP=WD6ZF2U9bH2Xf+GJWbC9T4a3YK+C08O0O50Q@mail.gmail.com/\nto really understand what is happening here. Can you give a summary\nand explanation in the commit message?\n(What is the current bug, how is it triggered, and why this is the\nbest way to fix it? That would be essentially repeating\nhttps://public-inbox.org/git/CADfK3RWAcb0m+m_U51JLA9tNyru_7XEsfy55i5EUsKh98jGFtA@mail.gmail.com/)\n\nNow that I read the discussion, I think the code is fine.\n\nReviewed-by: Stefan Beller <sbeller@google.com>\n\n> ---\n>  contrib/subtree/git-subtree.sh | 12 ++++++------\n>  1 file changed, 6 insertions(+), 6 deletions(-)\n>\n> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh\n> index 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'\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'\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'\n> \"$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> --\n> 2.16.1\n>\n>\n>\n> Hi all, just following up on this as I haven't heard any feedback.\n>\n> Thanks,\n> Steve\n"}]}