]> git.ipfire.org Git - thirdparty/git.git/commit - sequencer.c
sequencer: refactor skip_unnecessary_picks() to work on a todo_list
authorAlban Gruin <alban.gruin@gmail.com>
Tue, 5 Mar 2019 19:18:00 +0000 (20:18 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Mar 2019 00:17:57 +0000 (09:17 +0900)
commit6bfeb7f1b503cf3fa0fd5690c0c98a9813c7c875
tree1e6f691061f2479d377468cc900d2ca92391ad54
parent79d7e883bb69803daf4a6f44692cb8fc0eee5b24
sequencer: refactor skip_unnecessary_picks() to work on a todo_list

This refactors skip_unnecessary_picks() to work on a todo_list.  As this
function is only called by complete_action() (and thus is not used by
rebase -p), the file-handling logic is completely dropped here.

Instead of truncating the todo list’s buffer, the items are moved to
the beginning of the list, eliminating the need to reparse the list.
This also means its buffer cannot be directly written to the disk.

rewrite_file() is then removed, as it is now unused.

Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c