3 #include "parse-options.h"
6 static const char * const builtin_rebase_helper_usage
[] = {
7 N_("git rebase--helper [<options>]"),
11 int cmd_rebase__helper(int argc
, const char **argv
, const char *prefix
)
13 struct replay_opts opts
= REPLAY_OPTS_INIT
;
17 struct option options
[] = {
18 OPT_BOOL(0, "ff", &opts
.allow_ff
, N_("allow fast-forward")),
19 OPT_CMDMODE(0, "continue", &command
, N_("continue rebase"),
21 OPT_CMDMODE(0, "abort", &command
, N_("abort rebase"),
26 git_config(git_default_config
, NULL
);
28 opts
.action
= REPLAY_INTERACTIVE_REBASE
;
32 argc
= parse_options(argc
, argv
, NULL
, options
,
33 builtin_rebase_helper_usage
, PARSE_OPT_KEEP_ARGV0
);
35 if (command
== CONTINUE
&& argc
== 1)
36 return !!sequencer_continue(&opts
);
37 if (command
== ABORT
&& argc
== 1)
38 return !!sequencer_remove_state(&opts
);
39 usage_with_options(builtin_rebase_helper_usage
, options
);