Re: [PATCH v2 1/9] cherry-pick, revert: add the --gpg-sign option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 24, 2014, 21:00 UTC
- Message-ID
- <xmqqiot9qend.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1390524666-51274-2-git-send-email-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> +-S[<keyid>]:: > +--gpg-sign[=<keyid>]:: > + GPG-sign commits. > +
Does this accept --no-gpg-sign? If not, shouldn't it?
Show 20 quoted lines
> diff --git a/sequencer.c b/sequencer.c
> index 90cac7b..bde5f04 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -392,11 +392,18 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts,
> {
> struct argv_array array;
> int rc;
> + char *gpg_sign;
>
> argv_array_init(&array);
> argv_array_push(&array, "commit");
> argv_array_push(&array, "-n");
>
> + if (opts->gpg_sign) {
> + gpg_sign = xmalloc(3 + strlen(opts->gpg_sign));
> + sprintf(gpg_sign, "-S%s", opts->gpg_sign);
> + argv_array_push(&array, gpg_sign);
> + free(gpg_sign);
> + }Here you would need to invent a new way to propagate --no-gpg-sign to subsequent invocations, I think.