summaryrefslogtreecommitdiff
path: root/rebase-interactive.c
diff options
context:
space:
mode:
authorAlban Gruin <alban.gruin@gmail.com>2019-01-29 15:01:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-29 20:09:24 (GMT)
commit616d7740cfbe65533af8ff1dabcf4e56f6baad5a (patch)
treef77ddc77782231113d0b828c7a36a0556553f204 /rebase-interactive.c
parentcbef27d61cd6ae4f1ecae054eb9df06e898148d8 (diff)
downloadgit-616d7740cfbe65533af8ff1dabcf4e56f6baad5a.zip
git-616d7740cfbe65533af8ff1dabcf4e56f6baad5a.tar.gz
git-616d7740cfbe65533af8ff1dabcf4e56f6baad5a.tar.bz2
sequencer: introduce todo_list_write_to_file()
This introduces a new function to recreate the text of a todo list from its commands and write it to a file. This will be useful as the next few commits will change the use of the buffer in struct todo_list so it will no longer be a mirror of the file on disk. This functionality already exists in todo_list_transform(), but this function was made to replace the buffer of a todo list, which is not what we want here. Thus, the part of todo_list_transform() that replaces the buffer is dropped, and the function is renamed todo_list_to_strbuf(). It is called by todo_list_write_to_file() to fill the buffer to write to the disk. todo_list_write_to_file() can also take care of appending the help text to the buffer before writing it to the disk, or to write only the first n items of the list. This feature will be used by skip_unnecessary_picks(), which has to write done commands in a file. Signed-off-by: Alban Gruin <alban.gruin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'rebase-interactive.c')
0 files changed, 0 insertions, 0 deletions