summaryrefslogtreecommitdiff
path: root/sequencer.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-11-10 06:48:56 +0100
committerJunio C Hamano <gitster@pobox.com>2018-11-12 14:50:05 +0900
commitf11c95805495fcb588f767ffab193f2aed328eab (patch)
tree067ad17a503c501836dfb4cf51efcb621b58015d /sequencer.h
parent6c6d5d0776b5eb60dc206691fc1fde755e94da20 (diff)
downloadgit-f11c95805495fcb588f767ffab193f2aed328eab.tar.gz
sequencer.c: remove implicit dependency on the_index
Since we're going to pass 'struct repository *' around most of the time instead of 'struct index_state *' because most sequencer.c operations need more than just the index, the_repository is replaced as well in the functions that now take 'struct repository *'. the_repository is still present in this file, but total clean up will be done later. It's not the main focus of this patch. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.h')
-rw-r--r--sequencer.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/sequencer.h b/sequencer.h
index 660cff5050..ba86515ad6 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -5,6 +5,7 @@
#include "strbuf.h"
struct commit;
+struct repository;
const char *git_path_commit_editmsg(void);
const char *git_path_seq_dir(void);
@@ -74,8 +75,9 @@ int write_message(const void *buf, size_t len, const char *filename,
/* Call this to setup defaults before parsing command line options */
void sequencer_init_config(struct replay_opts *opts);
-int sequencer_pick_revisions(struct replay_opts *opts);
-int sequencer_continue(struct replay_opts *opts);
+int sequencer_pick_revisions(struct repository *repo,
+ struct replay_opts *opts);
+int sequencer_continue(struct repository *repo, struct replay_opts *opts);
int sequencer_rollback(struct replay_opts *opts);
int sequencer_remove_state(struct replay_opts *opts);
@@ -89,7 +91,8 @@ int sequencer_remove_state(struct replay_opts *opts);
* commits should be rebased onto the new base, this flag needs to be passed.
*/
#define TODO_LIST_REBASE_COUSINS (1U << 4)
-int sequencer_make_script(FILE *out, int argc, const char **argv,
+int sequencer_make_script(struct repository *repo, FILE *out,
+ int argc, const char **argv,
unsigned flags);
int sequencer_add_exec_commands(const char *command);
@@ -112,7 +115,7 @@ extern const char sign_off_header[];
*/
void append_signoff(struct strbuf *msgbuf, size_t ignore_footer, unsigned flag);
-void append_conflicts_hint(struct strbuf *msgbuf);
+void append_conflicts_hint(struct index_state *istate, struct strbuf *msgbuf);
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,
@@ -128,7 +131,9 @@ int prepare_branch_to_be_rebased(struct replay_opts *opts, const char *commit);
#define SUMMARY_INITIAL_COMMIT (1 << 0)
#define SUMMARY_SHOW_AUTHOR_DATE (1 << 1)
-void print_commit_summary(const char *prefix, const struct object_id *oid,
+void print_commit_summary(struct repository *repo,
+ const char *prefix,
+ const struct object_id *oid,
unsigned int flags);
#endif