aboutsummaryrefslogtreecommitdiff
path: root/sequencer.h
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-10-21 14:24:55 +0200
committerJunio C Hamano <gitster@pobox.com>2016-10-21 09:32:34 -0700
commit2863584f5cf98c5f768e24f4841e3df14cbea59a (patch)
tree2b27392cd29da9c377e95510e065944bfc71c215 /sequencer.h
parente635d5ceb7bb4e51d2121b74262ea8fffd5cda4e (diff)
downloadgit-2863584f5cf98c5f768e24f4841e3df14cbea59a.tar.gz
git-2863584f5cf98c5f768e24f4841e3df14cbea59a.tar.xz
sequencer: get rid of the subcommand field
The subcommands are used exactly once, at the very beginning of sequencer_pick_revisions(), to determine what to do. This is an unnecessary level of indirection: we can simply call the correct function to begin with. So let's do that. While at it, ensure that the subcommands return an error code so that they do not have to die() all over the place (bad practice for library functions...). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.h')
-rw-r--r--sequencer.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/sequencer.h b/sequencer.h
index 845366976..7a513c576 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -10,16 +10,8 @@ enum replay_action {
REPLAY_PICK
};
-enum replay_subcommand {
- REPLAY_NONE,
- REPLAY_REMOVE_STATE,
- REPLAY_CONTINUE,
- REPLAY_ROLLBACK
-};
-
struct replay_opts {
enum replay_action action;
- enum replay_subcommand subcommand;
/* Boolean options */
int edit;
@@ -44,9 +36,12 @@ struct replay_opts {
/* Only used by REPLAY_NONE */
struct rev_info *revs;
};
-#define REPLAY_OPTS_INIT { -1, -1 }
+#define REPLAY_OPTS_INIT { -1 }
int sequencer_pick_revisions(struct replay_opts *opts);
+int sequencer_continue(struct replay_opts *opts);
+int sequencer_rollback(struct replay_opts *opts);
+int sequencer_remove_state(struct replay_opts *opts);
extern const char sign_off_header[];