40
};
41
42
enum replay_action { REVERT, CHERRY_PICK };
43
-enum replay_subcommand { REPLAY_NONE, REPLAY_RESET, REPLAY_CONTINUE };
43
+enum replay_subcommand { REPLAY_NONE, REPLAY_REMOVE_STATE, REPLAY_CONTINUE };
44
45
struct replay_opts {
46
enum replay_action action;
133
{
134
const char * const * usage_str = revert_or_cherry_pick_usage(opts);
135
const char *me = action_name(opts);
136
- int reset = 0;
136
+ int remove_state = 0;
137
int contin = 0;
138
struct option options[] = {
139
- OPT_BOOLEAN(0, "reset", &reset, "forget the current operation"),
140
- OPT_BOOLEAN(0, "continue", &contin, "continue the current operation"),
139
+ OPT_BOOLEAN(0, "quit", &remove_state, "end revert or cherry-pick sequence"),
140
+ OPT_BOOLEAN(0, "continue", &contin, "resume revert or cherry-pick sequence"),
141
OPT_BOOLEAN('n', "no-commit", &opts->no_commit, "don't automatically commit"),
142
OPT_BOOLEAN('e', "edit", &opts->edit, "edit the commit message"),
143
OPT_NOOP_NOARG('r', NULL),
147
OPT_STRING(0, "strategy", &opts->strategy, "strategy", "merge strategy"),
148
OPT_CALLBACK('X', "strategy-option", &opts, "option",
149
"option for merge strategy", option_parse_x),
150
+ { OPTION_BOOLEAN, 0, "reset", &remove_state, NULL,
151
+ "alias for --quit (deprecated)",
152
+ PARSE_OPT_HIDDEN | PARSE_OPT_NOARG },
153
OPT_END(),
154
OPT_END(),
155
OPT_END(),
171
172
/* Check for incompatible subcommands */
173
verify_opt_mutually_compatible(me,
171
- "--reset", reset,
174
+ "--quit", remove_state,
175
"--continue", contin,
176
NULL);
177
178
/* Set the subcommand */
176
- if (reset)
177
- opts->subcommand = REPLAY_RESET;
179
+ if (remove_state)
180
+ opts->subcommand = REPLAY_REMOVE_STATE;
181
else if (contin)
182
opts->subcommand = REPLAY_CONTINUE;
183
else
186
/* Check for incompatible command line arguments */
187
if (opts->subcommand != REPLAY_NONE) {
188
char *this_operation;
186
- if (opts->subcommand == REPLAY_RESET)
187
- this_operation = "--reset";
189
+ if (opts->subcommand == REPLAY_REMOVE_STATE)
190
+ this_operation = "--quit";
191
else
192
this_operation = "--continue";
193
968
* cherry-pick should be handled differently from an existing
969
* one that is being continued
970
*/
968
- if (opts->subcommand == REPLAY_RESET) {
971
+ if (opts->subcommand == REPLAY_REMOVE_STATE) {
972
remove_sequencer_state(1);
973
return 0;
974
} else if (opts->subcommand == REPLAY_CONTINUE) {
991
if (create_seq_dir() < 0) {
992
error(_("A cherry-pick or revert is in progress."));
993
advise(_("Use --continue to continue the operation"));
991
- advise(_("or --reset to forget about it"));
994
+ advise(_("or --quit to forget about it"));
995
return -1;
996
}
997
if (get_sha1("HEAD", sha1)) {