{"thread":{"id":"58188","subject":"[PATCH v3] contrib/rerere-train: avoid useless gpg sign in training","startedAt":"2022-07-19T17:22:07Z","lastAt":"2022-07-19T18:23:58Z","messageCount":2,"participants":["Celeste Liu","Junio C Hamano"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"459388","messageId":"PH7PR14MB5594A27B9295E95ACA4D6A69CE8F9@PH7PR14MB5594.namprd14.prod.outlook.com","threadId":"58188","inReplyTo":null,"subject":"[PATCH v3] contrib/rerere-train: avoid useless gpg sign in training","fromName":"Celeste Liu","fromEmail":"coelacanthus@outlook.com","sentAt":"2022-07-19T17:21:44Z","receivedAt":"2022-07-19T17:22:07Z","isPatch":true,"sender":{"key":"coelacanthus@outlook.com","avatar":"https://avatars.githubusercontent.com/u/43064781?v=4"},"body":"Users may have configured \"git merge\" to always require GPG\nsigning the resulting commits. We are not running \"git merge\" to\nre-create merge commits, but merely to replay merge conflicts,\nand we will immediately discard the resulting commits; there\nis no point in signing them.\n\nOverride such configuration that forces useless signing from the\ncommand line with the \"--no-gpg-sign\" option.\n\nSigned-off-by: Celeste Liu <coelacanthus@outlook.com>\n---\nv2: add problem detail in commit message.\nv3: more detailed reason\n\n contrib/rerere-train.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/rerere-train.sh b/contrib/rerere-train.sh\nindex 26b724c8c6..bd01e430ef 100755\n--- a/contrib/rerere-train.sh\n+++ b/contrib/rerere-train.sh\n@@ -75,7 +75,7 @@ do\n \t\tcontinue\n \tfi\n \tgit checkout -q \"$parent1^0\"\n-\tif git merge $other_parents >/dev/null 2>&1\n+\tif git merge --no-gpg-sign $other_parents >/dev/null 2>&1\n \tthen\n \t\t# Cleanly merges\n \t\tcontinue\n-- \n2.37.1\n\n"},{"id":"459402","messageId":"xmqqcze1arm1.fsf@gitster.g","threadId":"58188","inReplyTo":"PH7PR14MB5594A27B9295E95ACA4D6A69CE8F9@PH7PR14MB5594.namprd14.prod.outlook.com","subject":"Re: [PATCH v3] contrib/rerere-train: avoid useless gpg sign in training","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-07-19T18:23:50Z","receivedAt":"2022-07-19T18:23:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Celeste Liu <coelacanthus@outlook.com> writes:\n\n> Users may have configured \"git merge\" to always require GPG\n> signing the resulting commits. We are not running \"git merge\" to\n> re-create merge commits, but merely to replay merge conflicts,\n> and we will immediately discard the resulting commits; there\n> is no point in signing them.\n>\n> Override such configuration that forces useless signing from the\n> command line with the \"--no-gpg-sign\" option.\n>\n> Signed-off-by: Celeste Liu <coelacanthus@outlook.com>\n> ---\n> v2: add problem detail in commit message.\n> v3: more detailed reason\n\nMakes sense.\n\nNot a suggestion to change anything, but another possibility may be\nto run the command with the --no-commit option, perhaps.  If we ever\ngained more features added a knob to enable it by default, we would\nneed to add --no-that-feature as well to refuse it, just like we are\ndoing so for GPG here, and telling the command that there is no need\nto make a commit could turn out to be an easier way to do so for all\nextra features that will be invented in the future.\n\nThanks.  Will queue.\n\n>\n>  contrib/rerere-train.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/contrib/rerere-train.sh b/contrib/rerere-train.sh\n> index 26b724c8c6..bd01e430ef 100755\n> --- a/contrib/rerere-train.sh\n> +++ b/contrib/rerere-train.sh\n> @@ -75,7 +75,7 @@ do\n>  \t\tcontinue\n>  \tfi\n>  \tgit checkout -q \"$parent1^0\"\n> -\tif git merge $other_parents >/dev/null 2>&1\n> +\tif git merge --no-gpg-sign $other_parents >/dev/null 2>&1\n>  \tthen\n>  \t\t# Cleanly merges\n>  \t\tcontinue\n"}]}