summaryrefslogtreecommitdiff
path: root/sequencer.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-02 02:04:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-02 02:04:53 (GMT)
commitb49ef560ed66449d24a3fdfe25972c390bb44951 (patch)
tree60534d673f60750d6cc4ef2a709ef7a847fc7cdf /sequencer.h
parent5ae50845d8a30d7db32e139ce04b712f9deb99cd (diff)
parent34b47315d9721a576b9536492cca0c11588113a2 (diff)
downloadgit-b49ef560ed66449d24a3fdfe25972c390bb44951.zip
git-b49ef560ed66449d24a3fdfe25972c390bb44951.tar.gz
git-b49ef560ed66449d24a3fdfe25972c390bb44951.tar.bz2
Merge branch 'ag/rebase-i-in-c'
Rewrite of the remaining "rebase -i" machinery in C. * ag/rebase-i-in-c: rebase -i: move rebase--helper modes to rebase--interactive rebase -i: remove git-rebase--interactive.sh rebase--interactive2: rewrite the submodes of interactive rebase in C rebase -i: implement the main part of interactive rebase as a builtin rebase -i: rewrite init_basic_state() in C rebase -i: rewrite write_basic_state() in C rebase -i: rewrite the rest of init_revisions_and_shortrevisions() in C rebase -i: implement the logic to initialize $revisions in C rebase -i: remove unused modes and functions rebase -i: rewrite complete_action() in C t3404: todo list with commented-out commands only aborts sequencer: change the way skip_unnecessary_picks() returns its result sequencer: refactor append_todo_help() to write its message to a buffer rebase -i: rewrite checkout_onto() in C rebase -i: rewrite setup_reflog_action() in C sequencer: add a new function to silence a command, except if it fails rebase -i: rewrite the edit-todo functionality in C editor: add a function to launch the sequence editor rebase -i: rewrite append_todo_help() in C sequencer: make three functions and an enum from sequencer.c public
Diffstat (limited to 'sequencer.h')
-rw-r--r--sequencer.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/sequencer.h b/sequencer.h
index c986bc8..660cff5 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -8,6 +8,7 @@ struct commit;
const char *git_path_commit_editmsg(void);
const char *git_path_seq_dir(void);
+const char *rebase_path_todo(void);
#define APPEND_SIGNOFF_DEDUP (1u << 0)
@@ -62,6 +63,15 @@ struct replay_opts {
};
#define REPLAY_OPTS_INIT { .action = -1, .current_fixups = STRBUF_INIT }
+enum missing_commit_check_level {
+ MISSING_COMMIT_CHECK_IGNORE = 0,
+ MISSING_COMMIT_CHECK_WARN,
+ MISSING_COMMIT_CHECK_ERROR
+};
+
+int write_message(const void *buf, size_t len, const char *filename,
+ int append_eol);
+
/* 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);
@@ -84,8 +94,12 @@ int sequencer_make_script(FILE *out, int argc, const char **argv,
int sequencer_add_exec_commands(const char *command);
int transform_todos(unsigned flags);
+enum missing_commit_check_level get_missing_commit_check_level(void);
int check_todo_list(void);
-int skip_unnecessary_picks(void);
+int complete_action(struct replay_opts *opts, unsigned flags,
+ const char *shortrevisions, const char *onto_name,
+ const char *onto, const char *orig_head, const char *cmd,
+ unsigned autosquash);
int rearrange_squash(void);
extern const char sign_off_header[];
@@ -110,8 +124,14 @@ int update_head_with_reflog(const struct commit *old_head,
void commit_post_rewrite(const struct commit *current_head,
const struct object_id *new_head);
+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,
unsigned int flags);
#endif
+
+void parse_strategy_opts(struct replay_opts *opts, char *raw_opts);
+int write_basic_state(struct replay_opts *opts, const char *head_name,
+ const char *onto, const char *orig_head);