Re: [PATCH 2/2] replay: add the -S option
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Sep 28, 2026, 07:41 UTC
- Message-ID
- <aroaNcYqNIXcnQ-L@pks.im>
- In-Reply-To
- <20260925205348.1210154-3-pmonette@google.com>
On Fri, Sep 25, 2026 at 04:53:48PM -0400, Patrick Monette wrote:
Show 20 quoted lines
> diff --git a/builtin/replay.c b/builtin/replay.c
> index d39626a37d..87c628e2ed 100644
> --- a/builtin/replay.c
> +++ b/builtin/replay.c
> @@ -113,6 +113,16 @@ int cmd_replay(int argc,
> PARSE_OPT_NONEG),
> OPT_BOOL(0, "linearize", &opts.linearize,
> N_("drop merge commits, replaying only non-merge commits")),
> + {
> + .type = OPTION_STRING,
> + .short_name = 'S',
> + .long_name = "gpg-sign",
> + .value = &opts.sign_commit,
> + .argh = N_("key-id"),
> + .help = N_("GPG-sign commits"),
> + .flags = PARSE_OPT_OPTARG,
> + .defval = (intptr_t) "",
> + },
> OPT_END()
> };Okay. We can't use `OPT_STRING()` or `OPT_STRING_F()` here because we want to set the default value.
I notice that we don't start to honor "commit.gpgSign". Is there a reason for this?
Patrick