t7505: style fixes
[git.git] / sequencer.h
blob3a5072c2ab9088c237b83d92deae3c801289e543
1 #ifndef SEQUENCER_H
2 #define SEQUENCER_H
4 const char *git_path_seq_dir(void);
6 #define APPEND_SIGNOFF_DEDUP (1u << 0)
8 enum replay_action {
9 REPLAY_REVERT,
10 REPLAY_PICK,
11 REPLAY_INTERACTIVE_REBASE
14 enum commit_msg_cleanup_mode {
15 COMMIT_MSG_CLEANUP_SPACE,
16 COMMIT_MSG_CLEANUP_NONE,
17 COMMIT_MSG_CLEANUP_SCISSORS,
18 COMMIT_MSG_CLEANUP_ALL
21 struct replay_opts {
22 enum replay_action action;
24 /* Boolean options */
25 int edit;
26 int record_origin;
27 int no_commit;
28 int signoff;
29 int allow_ff;
30 int allow_rerere_auto;
31 int allow_empty;
32 int allow_empty_message;
33 int keep_redundant_commits;
34 int verbose;
36 int mainline;
38 char *gpg_sign;
39 enum commit_msg_cleanup_mode default_msg_cleanup;
41 /* Merge strategy */
42 char *strategy;
43 char **xopts;
44 size_t xopts_nr, xopts_alloc;
46 /* Only used by REPLAY_NONE */
47 struct rev_info *revs;
49 #define REPLAY_OPTS_INIT { -1 }
51 /* Call this to setup defaults before parsing command line options */
52 void sequencer_init_config(struct replay_opts *opts);
53 int sequencer_pick_revisions(struct replay_opts *opts);
54 int sequencer_continue(struct replay_opts *opts);
55 int sequencer_rollback(struct replay_opts *opts);
56 int sequencer_remove_state(struct replay_opts *opts);
58 int sequencer_make_script(int keep_empty, FILE *out,
59 int argc, const char **argv);
61 int transform_todo_ids(int shorten_ids);
62 int check_todo_list(void);
63 int skip_unnecessary_picks(void);
64 int rearrange_squash(void);
66 extern const char sign_off_header[];
68 void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag);
69 void append_conflicts_hint(struct strbuf *msgbuf);
70 int message_is_empty(const struct strbuf *sb,
71 enum commit_msg_cleanup_mode cleanup_mode);
72 int template_untouched(const struct strbuf *sb, const char *template_file,
73 enum commit_msg_cleanup_mode cleanup_mode);
74 int update_head_with_reflog(const struct commit *old_head,
75 const struct object_id *new_head,
76 const char *action, const struct strbuf *msg,
77 struct strbuf *err);
78 void commit_post_rewrite(const struct commit *current_head,
79 const struct object_id *new_head);
81 #define SUMMARY_INITIAL_COMMIT (1 << 0)
82 #define SUMMARY_SHOW_AUTHOR_DATE (1 << 1)
83 void print_commit_summary(const char *prefix, const struct object_id *oid,
84 unsigned int flags);
85 #endif