t3512/t3513: remove KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1
[git/git.git] / sequencer.h
CommitLineData
26ae337b
RR
1#ifndef SEQUENCER_H
2#define SEQUENCER_H
3
8a2a0f53 4const char *git_path_seq_dir(void);
26ae337b 5
bab4d109
BC
6#define APPEND_SIGNOFF_DEDUP (1u << 0)
7
043a4492
RR
8enum replay_action {
9 REPLAY_REVERT,
84583957
JS
10 REPLAY_PICK,
11 REPLAY_INTERACTIVE_REBASE
043a4492
RR
12};
13
043a4492
RR
14struct replay_opts {
15 enum replay_action action;
043a4492
RR
16
17 /* Boolean options */
18 int edit;
19 int record_origin;
20 int no_commit;
21 int signoff;
22 int allow_ff;
23 int allow_rerere_auto;
df478b74 24 int allow_empty;
4bee9584 25 int allow_empty_message;
b27cfb0d 26 int keep_redundant_commits;
556907f1 27 int verbose;
043a4492
RR
28
29 int mainline;
30
03a4e260 31 char *gpg_sign;
3253553e 32
043a4492 33 /* Merge strategy */
03a4e260
JS
34 char *strategy;
35 char **xopts;
043a4492
RR
36 size_t xopts_nr, xopts_alloc;
37
38 /* Only used by REPLAY_NONE */
39 struct rev_info *revs;
40};
2863584f 41#define REPLAY_OPTS_INIT { -1 }
043a4492 42
043a4492 43int sequencer_pick_revisions(struct replay_opts *opts);
2863584f
JS
44int sequencer_continue(struct replay_opts *opts);
45int sequencer_rollback(struct replay_opts *opts);
46int sequencer_remove_state(struct replay_opts *opts);
043a4492 47
62db5247
JS
48int sequencer_make_script(int keep_empty, FILE *out,
49 int argc, const char **argv);
50
3546c8d9 51int transform_todo_ids(int shorten_ids);
94399949 52int check_todo_list(void);
cdac2b01 53int skip_unnecessary_picks(void);
c44a4c65 54int rearrange_squash(void);
3546c8d9 55
5ed75e2a
MV
56extern const char sign_off_header[];
57
bab4d109 58void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag);
75c961b7 59void append_conflicts_hint(struct strbuf *msgbuf);
b36c5908 60int git_sequencer_config(const char *k, const char *v, void *cb);
5ed75e2a 61
d0aaa46f
PW
62enum commit_msg_cleanup_mode {
63 COMMIT_MSG_CLEANUP_SPACE,
64 COMMIT_MSG_CLEANUP_NONE,
65 COMMIT_MSG_CLEANUP_SCISSORS,
66 COMMIT_MSG_CLEANUP_ALL
67};
68
69int message_is_empty(const struct strbuf *sb,
70 enum commit_msg_cleanup_mode cleanup_mode);
71int template_untouched(const struct strbuf *sb, const char *template_file,
72 enum commit_msg_cleanup_mode cleanup_mode);
0505d604
PW
73int update_head_with_reflog(const struct commit *old_head,
74 const struct object_id *new_head,
75 const char *action, const struct strbuf *msg,
76 struct strbuf *err);
a87a6f3c
PW
77void commit_post_rewrite(const struct commit *current_head,
78 const struct object_id *new_head);
e47c6caf
PW
79
80#define SUMMARY_INITIAL_COMMIT (1 << 0)
81#define SUMMARY_SHOW_AUTHOR_DATE (1 << 1)
82void print_commit_summary(const char *prefix, const struct object_id *oid,
83 unsigned int flags);
26ae337b 84#endif