rebase-interactive: rewrite edit_todo_list() to handle the initial edit

edit_todo_list() is changed to work on a todo_list, and to handle the
initial edition of the todo list (ie. making a backup of the todo
list).

It does not check for dropped commits yet, as todo_list_check() does not
take the commits that have already been processed by the rebase (ie. the
todo list is edited in the middle of a rebase session).

Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Alban Gruin
2019-03-05 20:18:03 +01:00
committed by Junio C Hamano
parent af1fc3adc5
commit a930eb03a8
5 changed files with 55 additions and 26 deletions

View File

@ -55,8 +55,7 @@ static GIT_PATH_FUNC(rebase_path, "rebase-merge")
* file and written to the tail of 'done'.
*/
GIT_PATH_FUNC(rebase_path_todo, "rebase-merge/git-rebase-todo")
static GIT_PATH_FUNC(rebase_path_todo_backup,
"rebase-merge/git-rebase-todo.backup")
GIT_PATH_FUNC(rebase_path_todo_backup, "rebase-merge/git-rebase-todo.backup")
/*
* The rebase command lines that have already been processed. A line