sequencer: make sequencer_make_script() write its script to a strbuf

This makes sequencer_make_script() write its script to a strbuf (ie. the
buffer of a todo_list) instead of a FILE.  This reduce the amount of
read/write made by rebase interactive.

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:17:56 +01:00
committed by Junio C Hamano
parent f2a04904be
commit d358fc286d
3 changed files with 28 additions and 31 deletions

View File

@ -142,9 +142,8 @@ int sequencer_remove_state(struct replay_opts *opts);
#define TODO_LIST_REBASE_COUSINS (1U << 4)
#define TODO_LIST_APPEND_TODO_HELP (1U << 5)
int sequencer_make_script(struct repository *r, FILE *out, int argc,
const char **argv,
unsigned flags);
int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
const char **argv, unsigned flags);
int sequencer_add_exec_commands(struct repository *r,
struct string_list *commands);