blob: 7a513c576bdccf8730828fdaa586ec9d0af4af6b [file] [log] [blame]
Ramkumar Ramachandra26ae3372011-08-04 16:09:11 +05301#ifndef SEQUENCER_H
2#define SEQUENCER_H
3
Johannes Schindelin8a2a0f52016-10-14 15:17:12 +02004const char *git_path_seq_dir(void);
Ramkumar Ramachandra26ae3372011-08-04 16:09:11 +05305
Brandon Caseybab4d102013-02-12 02:17:35 -08006#define APPEND_SIGNOFF_DEDUP (1u << 0)
7
Ramkumar Ramachandra043a4492012-01-11 23:45:57 +05308enum replay_action {
9 REPLAY_REVERT,
10 REPLAY_PICK
11};
12
Ramkumar Ramachandra043a4492012-01-11 23:45:57 +053013struct replay_opts {
14 enum replay_action action;
Ramkumar Ramachandra043a4492012-01-11 23:45:57 +053015
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 Hormandf478b72012-04-11 16:21:53 -040023 int allow_empty;
Chris Webb4bee9582012-08-02 11:38:51 +010024 int allow_empty_message;
Neil Hormanb27cfb02012-04-20 10:36:15 -040025 int keep_redundant_commits;
Ramkumar Ramachandra043a4492012-01-11 23:45:57 +053026
27 int mainline;
28
Johannes Schindelin03a4e262016-10-21 14:24:13 +020029 char *gpg_sign;
Nicolas Vigier32535532014-01-24 00:50:58 +000030
Ramkumar Ramachandra043a4492012-01-11 23:45:57 +053031 /* Merge strategy */
Johannes Schindelin03a4e262016-10-21 14:24:13 +020032 char *strategy;
33 char **xopts;
Ramkumar Ramachandra043a4492012-01-11 23:45:57 +053034 size_t xopts_nr, xopts_alloc;
35
36 /* Only used by REPLAY_NONE */
37 struct rev_info *revs;
38};
Johannes Schindelin28635842016-10-21 14:24:55 +020039#define REPLAY_OPTS_INIT { -1 }
Ramkumar Ramachandra043a4492012-01-11 23:45:57 +053040
Ramkumar Ramachandra043a4492012-01-11 23:45:57 +053041int sequencer_pick_revisions(struct replay_opts *opts);
Johannes Schindelin28635842016-10-21 14:24:55 +020042int sequencer_continue(struct replay_opts *opts);
43int sequencer_rollback(struct replay_opts *opts);
44int sequencer_remove_state(struct replay_opts *opts);
Ramkumar Ramachandra043a4492012-01-11 23:45:57 +053045
Miklos Vajna5ed75e22012-09-14 08:52:03 +020046extern const char sign_off_header[];
47
Brandon Caseybab4d102013-02-12 02:17:35 -080048void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag);
Junio C Hamano75c961b2014-10-24 11:34:59 -070049void append_conflicts_hint(struct strbuf *msgbuf);
Miklos Vajna5ed75e22012-09-14 08:52:03 +020050
Ramkumar Ramachandra26ae3372011-08-04 16:09:11 +053051#endif