sequencer.c: save and restore cleanup mode
[gitweb.git] / sequencer.h
index 53b86797188e8bef7371cd922bfafdc2464c1281..8295c8406f5c5f88c86afc6dad0708c9827868ab 100644 (file)
@@ -47,6 +47,7 @@ struct replay_opts {
 
        char *gpg_sign;
        enum commit_msg_cleanup_mode default_msg_cleanup;
+       int explicit_cleanup;
 
        /* Merge strategy */
        char *strategy;
@@ -107,8 +108,6 @@ int complete_action(struct repository *r, struct replay_opts *opts, unsigned fla
                    unsigned autosquash);
 int rearrange_squash(struct repository *r);
 
-extern const char sign_off_header[];
-
 /*
  * Append a signoff to the commit message in "msgbuf". The ignore_footer
  * parameter specifies the number of bytes at the end of msgbuf that should
@@ -118,6 +117,12 @@ extern const char sign_off_header[];
 void append_signoff(struct strbuf *msgbuf, size_t ignore_footer, unsigned flag);
 
 void append_conflicts_hint(struct index_state *istate, struct strbuf *msgbuf);
+enum commit_msg_cleanup_mode get_cleanup_mode(const char *cleanup_arg,
+       int use_editor);
+
+void cleanup_message(struct strbuf *msgbuf,
+       enum commit_msg_cleanup_mode cleanup_mode, int verbose);
+
 int message_is_empty(const struct strbuf *sb,
                     enum commit_msg_cleanup_mode cleanup_mode);
 int template_untouched(const struct strbuf *sb, const char *template_file,
@@ -126,7 +131,8 @@ int update_head_with_reflog(const struct commit *old_head,
                            const struct object_id *new_head,
                            const char *action, const struct strbuf *msg,
                            struct strbuf *err);
-void commit_post_rewrite(const struct commit *current_head,
+void commit_post_rewrite(struct repository *r,
+                        const struct commit *current_head,
                         const struct object_id *new_head);
 
 int prepare_branch_to_be_rebased(struct replay_opts *opts, const char *commit);