Ramkumar Ramachandra | 26ae337 | 2011-08-04 16:09:11 +0530 | [diff] [blame] | 1 | #ifndef SEQUENCER_H |
| 2 | #define SEQUENCER_H |
| 3 | |
Johannes Schindelin | 8a2a0f5 | 2016-10-14 15:17:12 +0200 | [diff] [blame] | 4 | const char *git_path_seq_dir(void); |
Ramkumar Ramachandra | 26ae337 | 2011-08-04 16:09:11 +0530 | [diff] [blame] | 5 | |
Brandon Casey | bab4d10 | 2013-02-12 02:17:35 -0800 | [diff] [blame] | 6 | #define APPEND_SIGNOFF_DEDUP (1u << 0) |
| 7 | |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 8 | enum replay_action { |
| 9 | REPLAY_REVERT, |
| 10 | REPLAY_PICK |
| 11 | }; |
| 12 | |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 13 | struct replay_opts { |
| 14 | enum replay_action action; |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 15 | |
| 16 | /* Boolean options */ |
| 17 | int edit; |
| 18 | int record_origin; |
| 19 | int no_commit; |
| 20 | int signoff; |
| 21 | int allow_ff; |
| 22 | int allow_rerere_auto; |
Neil Horman | df478b7 | 2012-04-11 16:21:53 -0400 | [diff] [blame] | 23 | int allow_empty; |
Chris Webb | 4bee958 | 2012-08-02 11:38:51 +0100 | [diff] [blame] | 24 | int allow_empty_message; |
Neil Horman | b27cfb0 | 2012-04-20 10:36:15 -0400 | [diff] [blame] | 25 | int keep_redundant_commits; |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 26 | |
| 27 | int mainline; |
| 28 | |
Johannes Schindelin | 03a4e26 | 2016-10-21 14:24:13 +0200 | [diff] [blame] | 29 | char *gpg_sign; |
Nicolas Vigier | 3253553 | 2014-01-24 00:50:58 +0000 | [diff] [blame] | 30 | |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 31 | /* Merge strategy */ |
Johannes Schindelin | 03a4e26 | 2016-10-21 14:24:13 +0200 | [diff] [blame] | 32 | char *strategy; |
| 33 | char **xopts; |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 34 | size_t xopts_nr, xopts_alloc; |
| 35 | |
| 36 | /* Only used by REPLAY_NONE */ |
| 37 | struct rev_info *revs; |
| 38 | }; |
Johannes Schindelin | 2863584 | 2016-10-21 14:24:55 +0200 | [diff] [blame] | 39 | #define REPLAY_OPTS_INIT { -1 } |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 40 | |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 41 | int sequencer_pick_revisions(struct replay_opts *opts); |
Johannes Schindelin | 2863584 | 2016-10-21 14:24:55 +0200 | [diff] [blame] | 42 | int sequencer_continue(struct replay_opts *opts); |
| 43 | int sequencer_rollback(struct replay_opts *opts); |
| 44 | int sequencer_remove_state(struct replay_opts *opts); |
Ramkumar Ramachandra | 043a449 | 2012-01-11 23:45:57 +0530 | [diff] [blame] | 45 | |
Miklos Vajna | 5ed75e2 | 2012-09-14 08:52:03 +0200 | [diff] [blame] | 46 | extern const char sign_off_header[]; |
| 47 | |
Brandon Casey | bab4d10 | 2013-02-12 02:17:35 -0800 | [diff] [blame] | 48 | void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag); |
Junio C Hamano | 75c961b | 2014-10-24 11:34:59 -0700 | [diff] [blame] | 49 | void append_conflicts_hint(struct strbuf *msgbuf); |
Miklos Vajna | 5ed75e2 | 2012-09-14 08:52:03 +0200 | [diff] [blame] | 50 | |
Ramkumar Ramachandra | 26ae337 | 2011-08-04 16:09:11 +0530 | [diff] [blame] | 51 | #endif |