# [PATCH] contrib/rerere-train: avoid useless gpg sign in training

3 messages from 2022-07-19 to 2022-07-19. Participants: Celeste Liu, Junio C Hamano.
Thread: https://gitlist.dev/t/58185

## Celeste Liu, 2022-07-19 11:40

Subject: [PATCH] contrib/rerere-train: avoid useless gpg sign in training
Message-ID: <PH7PR14MB5594D28D5CF94BD30DB9D3C4CE8F9@PH7PR14MB5594.namprd14.prod.outlook.com>
URL: https://gitlist.dev/e/PH7PR14MB5594D28D5CF94BD30DB9D3C4CE8F9%40PH7PR14MB5594.namprd14.prod.outlook.com

```
Signed-off-by: Celeste Liu <coelacanthus@outlook.com>
---
 contrib/rerere-train.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/rerere-train.sh b/contrib/rerere-train.sh
index 26b724c8c6..bd01e430ef 100755
--- a/contrib/rerere-train.sh
+++ b/contrib/rerere-train.sh
@@ -75,7 +75,7 @@ do
 		continue
 	fi
 	git checkout -q "$parent1^0"
-	if git merge $other_parents >/dev/null 2>&1
+	if git merge --no-gpg-sign $other_parents >/dev/null 2>&1
 	then
 		# Cleanly merges
 		continue
-- 
2.37.1


```

## Junio C Hamano, 2022-07-19 16:26

Subject: Re: [PATCH] contrib/rerere-train: avoid useless gpg sign in training
Message-ID: <xmqq4jzdcbmt.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqq4jzdcbmt.fsf%40gitster.g
In-Reply-To: <PH7PR14MB5594D28D5CF94BD30DB9D3C4CE8F9@PH7PR14MB5594.namprd14.prod.outlook.com>

```
Celeste Liu <coelacanthus@outlook.com> writes:

> Signed-off-by: Celeste Liu <coelacanthus@outlook.com>
> ---

Above your sign-off line is a space to explain why this change is
needed.  Write something like 

    The user may have configured "git merge" to always require GPG
    signing the resulting commit.  As we run "git merge" not for the
    recreated merge commits, but merely to trigger merge conflicts,
    and we will discard the resulting commits, signing them is not
    necessary.

    Override such configuration that forces useless signing from the
    command line with the "--no-gpg-sign" optoin.

perhaps?

>  contrib/rerere-train.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/rerere-train.sh b/contrib/rerere-train.sh
> index 26b724c8c6..bd01e430ef 100755
> --- a/contrib/rerere-train.sh
> +++ b/contrib/rerere-train.sh
> @@ -75,7 +75,7 @@ do
>  		continue
>  	fi
>  	git checkout -q "$parent1^0"
> -	if git merge $other_parents >/dev/null 2>&1
> +	if git merge --no-gpg-sign $other_parents >/dev/null 2>&1
>  	then
>  		# Cleanly merges
>  		continue

```

## Celeste Liu, 2022-07-19 17:31

Subject: Re: [PATCH] contrib/rerere-train: avoid useless gpg sign in training
Message-ID: <PH7PR14MB5594F83B5CD207AC45D8A39ECE8F9@PH7PR14MB5594.namprd14.prod.outlook.com>
URL: https://gitlist.dev/e/PH7PR14MB5594F83B5CD207AC45D8A39ECE8F9%40PH7PR14MB5594.namprd14.prod.outlook.com
In-Reply-To: <xmqq4jzdcbmt.fsf@gitster.g>

```
at 09:26:02AM -0700, Junio C Hamano wrote:
> Celeste Liu <coelacanthus@outlook.com> writes:
> needed.  Write something like
>
>     The user may have configured "git merge" to always require GPG
>     signing the resulting commit.  As we run "git merge" not for the
>     recreated merge commits, but merely to trigger merge conflicts,
>     and we will discard the resulting commits, signing them is not
>     necessary.
>
>     Override such configuration that forces useless signing from the
>     command line with the "--no-gpg-sign" optoin.
>
> perhaps?
>

Ok, I will add in next verison.
(Sorry, forgot cc, resend)

```
