diff options
author | Alban Gruin <alban.gruin@gmail.com> | 2019-01-29 16:01:48 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-29 12:09:24 -0800 |
commit | 616d7740cfbe65533af8ff1dabcf4e56f6baad5a (patch) | |
tree | f77ddc77782231113d0b828c7a36a0556553f204 /linear-assignment.c | |
parent | sequencer: refactor transform_todos() to work on a todo_list (diff) | |
download | tgif-616d7740cfbe65533af8ff1dabcf4e56f6baad5a.tar.xz |
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 'linear-assignment.c')
0 files changed, 0 insertions, 0 deletions