summaryrefslogtreecommitdiff
path: root/sequencer.h
diff options
context:
space:
mode:
authorAlban Gruin <alban.gruin@gmail.com>2019-01-29 15:01:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-29 20:09:24 (GMT)
commitcbef27d61cd6ae4f1ecae054eb9df06e898148d8 (patch)
tree67d0455608129847b21198766a18724dec4b30c3 /sequencer.h
parent6ad656db9b2d2426a0a884b431e8adc9877101bc (diff)
downloadgit-cbef27d61cd6ae4f1ecae054eb9df06e898148d8.zip
git-cbef27d61cd6ae4f1ecae054eb9df06e898148d8.tar.gz
git-cbef27d61cd6ae4f1ecae054eb9df06e898148d8.tar.bz2
sequencer: refactor transform_todos() to work on a todo_list
This refactors transform_todos() to work on a todo_list. The function is renamed todo_list_transform(). As rebase -p still need to check the todo list from the disk, a new function is introduced, transform_todo_file(). It is still used by complete_action() and edit_todo_list() for now, but they will be replaced in a future commit. todo_list_transform() is not a static function, because it will be used by edit_todo_list() from rebase-interactive.c in a future commit. Signed-off-by: Alban Gruin <alban.gruin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.h')
-rw-r--r--sequencer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sequencer.h b/sequencer.h
index 50d5524..2ddb20c 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -121,6 +121,8 @@ struct todo_list {
int todo_list_parse_insn_buffer(struct repository *r, char *buf,
struct todo_list *todo_list);
+void todo_list_transform(struct repository *r, struct todo_list *todo_list,
+ unsigned flags);
void todo_list_release(struct todo_list *todo_list);
const char *todo_item_get_arg(struct todo_list *todo_list,
struct todo_item *item);
@@ -148,7 +150,7 @@ int sequencer_make_script(struct repository *repo, FILE *out,
unsigned flags);
int sequencer_add_exec_commands(struct repository *r, const char *command);
-int transform_todos(struct repository *r, unsigned flags);
+int transform_todo_file(struct repository *r, unsigned flags);
enum missing_commit_check_level get_missing_commit_check_level(void);
int check_todo_list(struct repository *r);
int complete_action(struct repository *r, struct replay_opts *opts, unsigned flags,