4 #include "parse-options.h"
7 static const char * const builtin_rebase_helper_usage
[] = {
8 N_("git rebase--helper [<options>]"),
12 int cmd_rebase__helper(int argc
, const char **argv
, const char *prefix
)
14 struct replay_opts opts
= REPLAY_OPTS_INIT
;
18 struct option options
[] = {
19 OPT_BOOL(0, "ff", &opts
.allow_ff
, N_("allow fast-forward")),
20 OPT_CMDMODE(0, "continue", &command
, N_("continue rebase"),
22 OPT_CMDMODE(0, "abort", &command
, N_("abort rebase"),
27 git_config(git_default_config
, NULL
);
29 opts
.action
= REPLAY_INTERACTIVE_REBASE
;
33 argc
= parse_options(argc
, argv
, NULL
, options
,
34 builtin_rebase_helper_usage
, PARSE_OPT_KEEP_ARGV0
);
36 if (command
== CONTINUE
&& argc
== 1)
37 return !!sequencer_continue(&opts
);
38 if (command
== ABORT
&& argc
== 1)
39 return !!sequencer_remove_state(&opts
);
40 usage_with_options(builtin_rebase_helper_usage
, options
);