diff options
Diffstat (limited to 'builtin/revert.c')
| -rw-r--r-- | builtin/revert.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/builtin/revert.c b/builtin/revert.c index ada51e46b9..f84c253f4c 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -116,8 +116,6 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts) N_("option for merge strategy"), option_parse_x), { OPTION_STRING, 'S', "gpg-sign", &opts->gpg_sign, N_("key-id"), N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" }, - OPT_BOOL(0, "reference", &opts->commit_use_reference, - N_("use the 'reference' format to refer to commits")), OPT_END() }; struct option *options = base_options; @@ -132,6 +130,13 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts) OPT_END(), }; options = parse_options_concat(options, cp_extra); + } else if (opts->action == REPLAY_REVERT) { + struct option cp_extra[] = { + OPT_BOOL(0, "reference", &opts->commit_use_reference, + N_("use the 'reference' format to refer to commits")), + OPT_END(), + }; + options = parse_options_concat(options, cp_extra); } argc = parse_options(argc, argv, NULL, options, usage_str, |
