Ramkumar Ramachandra | 26ae337 | 2011-08-04 16:09:11 +0530 | [diff] [blame] | 1 | #ifndef SEQUENCER_H |
| 2 | #define SEQUENCER_H |
| 3 | |
| 4 | #define SEQ_DIR "sequencer" |
Ramkumar Ramachandra | 26ae337 | 2011-08-04 16:09:11 +0530 | [diff] [blame] | 5 | #define SEQ_HEAD_FILE "sequencer/head" |
| 6 | #define SEQ_TODO_FILE "sequencer/todo" |
| 7 | #define SEQ_OPTS_FILE "sequencer/opts" |
| 8 | |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 9 | enum replay_action { |
| 10 | REPLAY_REVERT, |
| 11 | REPLAY_PICK |
| 12 | }; |
| 13 | |
| 14 | enum replay_subcommand { |
| 15 | REPLAY_NONE, |
| 16 | REPLAY_REMOVE_STATE, |
| 17 | REPLAY_CONTINUE, |
| 18 | REPLAY_ROLLBACK |
| 19 | }; |
| 20 | |
| 21 | struct replay_opts { |
| 22 | enum replay_action action; |
| 23 | enum replay_subcommand subcommand; |
| 24 | |
| 25 | /* Boolean options */ |
| 26 | int edit; |
| 27 | int record_origin; |
| 28 | int no_commit; |
| 29 | int signoff; |
| 30 | int allow_ff; |
| 31 | int allow_rerere_auto; |
Neil Horman | df478b7 | 2012-04-11 16:21:53 -0400 | [diff] [blame] | 32 | int allow_empty; |
Neil Horman | b27cfb0 | 2012-04-20 10:36:15 -0400 | [diff] [blame] | 33 | int keep_redundant_commits; |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 34 | |
| 35 | int mainline; |
| 36 | |
| 37 | /* Merge strategy */ |
| 38 | const char *strategy; |
| 39 | const char **xopts; |
| 40 | size_t xopts_nr, xopts_alloc; |
| 41 | |
| 42 | /* Only used by REPLAY_NONE */ |
| 43 | struct rev_info *revs; |
| 44 | }; |
| 45 | |
Jonathan Nieder | d596118 | 2011-12-10 07:06:12 -0600 | [diff] [blame] | 46 | /* Removes SEQ_DIR. */ |
| 47 | extern void remove_sequencer_state(void); |
Ramkumar Ramachandra | 26ae337 | 2011-08-04 16:09:11 +0530 | [diff] [blame] | 48 | |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 49 | int sequencer_pick_revisions(struct replay_opts *opts); |
| 50 | |
Ramkumar Ramachandra | 26ae337 | 2011-08-04 16:09:11 +0530 | [diff] [blame] | 51 | #endif |