path: root/rebase-interactive.c
diff options
authorAlban Gruin <>2019-01-29 15:01:47 (GMT)
committerJunio C Hamano <>2019-01-29 20:09:24 (GMT)
commitcbef27d61cd6ae4f1ecae054eb9df06e898148d8 (patch)
tree67d0455608129847b21198766a18724dec4b30c3 /rebase-interactive.c
parent6ad656db9b2d2426a0a884b431e8adc9877101bc (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'rebase-interactive.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/rebase-interactive.c b/rebase-interactive.c
index 68aff1d..842fa07 100644
--- a/rebase-interactive.c
+++ b/rebase-interactive.c
@@ -69,7 +69,7 @@ int edit_todo_list(struct repository *r, unsigned flags)
- 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;