@@ -363,8 +363,7 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
oid_to_hex(&opts->restrict_revision->object.oid));
ret = sequencer_make_script(the_repository, &todo_list.buf,
- make_script_args.nr, make_script_args.v,
- flags);
+ &make_script_args, flags);
if (ret)
error(_("could not generate todo list"));
@@ -5355,8 +5355,8 @@ static int make_script_with_merges(struct pretty_print_context *pp,
return 0;
}
-int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
- const char **argv, unsigned flags)
+int sequencer_make_script(struct repository *r, struct strbuf *out,
+ struct strvec *args, unsigned flags)
{
char *format = NULL;
struct pretty_print_context pp = {0};
@@ -5390,7 +5390,7 @@ int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
pp.fmt = revs.commit_format;
pp.output_encoding = get_log_output_encoding();
- if (setup_revisions(argc, argv, &revs, NULL) > 1)
+ if (setup_revisions(args->nr, args->v, &revs, NULL) > 1)
return error(_("make_script: unhandled options"));
if (prepare_revision_walk(&revs) < 0)
@@ -158,8 +158,8 @@ int sequencer_remove_state(struct replay_opts *opts);
#define TODO_LIST_REAPPLY_CHERRY_PICKS (1U << 7)
#define TODO_LIST_WARN_SKIPPED_CHERRY_PICKS (1U << 8)
-int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
- const char **argv, unsigned flags);
+int sequencer_make_script(struct repository *r, struct strbuf *out,
+ struct strvec *args, unsigned flags);
void todo_list_add_exec_commands(struct todo_list *todo_list,
struct string_list *commands);
As in the preceding commit, prepare for the "nr" member of "struct strvec" changing from an "int" to a "size_t". These are the same sorts of changes to pass a "struct strvec *" further down instead of passing args->nr and args->v. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- builtin/rebase.c | 3 +-- sequencer.c | 6 +++--- sequencer.h | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-)