diff options
author | Alban Gruin <alban.gruin@gmail.com> | 2019-01-29 16:01:47 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-29 21:09:24 +0100 |
commit | cbef27d61cd6ae4f1ecae054eb9df06e898148d8 (patch) | |
tree | 67d0455608129847b21198766a18724dec4b30c3 /rebase-interactive.c | |
parent | sequencer: remove the 'arg' field from todo_item (diff) | |
download | git-cbef27d61cd6ae4f1ecae054eb9df06e898148d8.tar.xz git-cbef27d61cd6ae4f1ecae054eb9df06e898148d8.zip |
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 'rebase-interactive.c')
-rw-r--r-- | rebase-interactive.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rebase-interactive.c b/rebase-interactive.c index 68aff1dac2..842fa07e7e 100644 --- a/rebase-interactive.c +++ b/rebase-interactive.c @@ -69,7 +69,7 @@ int edit_todo_list(struct repository *r, unsigned flags) strbuf_release(&buf); - transform_todos(r, flags | TODO_LIST_SHORTEN_IDS); + transform_todo_file(r, flags | TODO_LIST_SHORTEN_IDS); if (strbuf_read_file(&buf, todo_file, 0) < 0) return error_errno(_("could not read '%s'."), todo_file); @@ -85,7 +85,7 @@ int edit_todo_list(struct repository *r, unsigned flags) if (launch_sequence_editor(todo_file, NULL, NULL)) return -1; - transform_todos(r, flags & ~(TODO_LIST_SHORTEN_IDS)); + transform_todo_file(r, flags & ~(TODO_LIST_SHORTEN_IDS)); return 0; } |