From: Alban Gruin Date: Tue, 29 Jan 2019 15:01:49 +0000 (+0100) Subject: sequencer: refactor check_todo_list() to work on a todo_list X-Git-Tag: v2.22.0-rc0~74^2~12 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6ca89c6f399b86983c7e93a3c5b918cad8292b47?hp=6ca89c6f399b86983c7e93a3c5b918cad8292b47 sequencer: refactor check_todo_list() to work on a todo_list This refactors check_todo_list() to work on a todo_list to avoid redundant reads and writes to the disk. The function is renamed todo_list_check(). The parsing of the two todo lists is left to the caller. As rebase -p still need to check the todo list from the disk, a new function is introduced, check_todo_list_from_file(). It reads the file from the disk, parses it, pass the todo_list to todo_list_check(), and writes it back to the disk. As get_missing_commit_check_level() and the enum missing_commit_check_level are no longer needed inside of sequencer.c, they are moved to rebase-interactive.c, and made static again. Signed-off-by: Alban Gruin Signed-off-by: Junio C Hamano ---