summary refs log tree commit diff
path: root/rebase-interactive.c
diff options
context:
space:
mode:
authorAlban Gruin <alban.gruin@gmail.com>2019-01-29 16:01:47 +0100
committerJunio C Hamano <gitster@pobox.com>2019-01-29 12:09:24 -0800
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 <alban.gruin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'rebase-interactive.c')
-rw-r--r--rebase-interactive.c4
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;
 }