4 const char *git_path_commit_editmsg(void);
5 const char *git_path_seq_dir(void);
7 #define APPEND_SIGNOFF_DEDUP (1u << 0)
12 REPLAY_INTERACTIVE_REBASE
15 enum commit_msg_cleanup_mode
{
16 COMMIT_MSG_CLEANUP_SPACE
,
17 COMMIT_MSG_CLEANUP_NONE
,
18 COMMIT_MSG_CLEANUP_SCISSORS
,
19 COMMIT_MSG_CLEANUP_ALL
23 enum replay_action action
;
31 int allow_rerere_auto
;
33 int allow_empty_message
;
34 int keep_redundant_commits
;
40 enum commit_msg_cleanup_mode default_msg_cleanup
;
45 size_t xopts_nr
, xopts_alloc
;
47 /* Used by fixup/squash */
48 struct strbuf current_fixups
;
49 int current_fixup_count
;
51 /* Only used by REPLAY_NONE */
52 struct rev_info
*revs
;
54 #define REPLAY_OPTS_INIT { .action = -1, .current_fixups = STRBUF_INIT }
56 /* Call this to setup defaults before parsing command line options */
57 void sequencer_init_config(struct replay_opts
*opts
);
58 int sequencer_pick_revisions(struct replay_opts
*opts
);
59 int sequencer_continue(struct replay_opts
*opts
);
60 int sequencer_rollback(struct replay_opts
*opts
);
61 int sequencer_remove_state(struct replay_opts
*opts
);
63 #define TODO_LIST_KEEP_EMPTY (1U << 0)
64 #define TODO_LIST_SHORTEN_IDS (1U << 1)
65 #define TODO_LIST_ABBREVIATE_CMDS (1U << 2)
66 int sequencer_make_script(FILE *out
, int argc
, const char **argv
,
69 int sequencer_add_exec_commands(const char *command
);
70 int transform_todos(unsigned flags
);
71 int check_todo_list(void);
72 int skip_unnecessary_picks(void);
73 int rearrange_squash(void);
75 extern const char sign_off_header
[];
77 void append_signoff(struct strbuf
*msgbuf
, int ignore_footer
, unsigned flag
);
78 void append_conflicts_hint(struct strbuf
*msgbuf
);
79 int message_is_empty(const struct strbuf
*sb
,
80 enum commit_msg_cleanup_mode cleanup_mode
);
81 int template_untouched(const struct strbuf
*sb
, const char *template_file
,
82 enum commit_msg_cleanup_mode cleanup_mode
);
83 int update_head_with_reflog(const struct commit
*old_head
,
84 const struct object_id
*new_head
,
85 const char *action
, const struct strbuf
*msg
,
87 void commit_post_rewrite(const struct commit
*current_head
,
88 const struct object_id
*new_head
);
90 #define SUMMARY_INITIAL_COMMIT (1 << 0)
91 #define SUMMARY_SHOW_AUTHOR_DATE (1 << 1)
92 void print_commit_summary(const char *prefix
, const struct object_id
*oid
,