> @@ -76,10 +77,18 @@ static int graph_read(int argc, const char **argv) > > static int graph_write(int argc, const char **argv) > { > + const char **pack_indexes = NULL; > + int packs_nr = 0; > + const char **lines = NULL; > + int lines_nr = 0; > + int lines_alloc = 0; > + > static struct option builtin_commit_graph_write_options[] = { > OPT_STRING(0, "object-dir", &opts.obj_dir, > N_("dir"), > N_("The object directory to store the graph")), > + OPT_BOOL(0, "stdin-packs", &opts.stdin_packs, > + N_("scan packfiles listed by stdin for commits")), > OPT_END(), > }; > > @@ -90,7 +99,25 @@ static int graph_write(int argc, const char **argv) > if (!opts.obj_dir) > opts.obj_dir = get_object_directory(); > > - write_commit_graph(opts.obj_dir); > + if (opts.stdin_packs) { > + struct strbuf buf = STRBUF_INIT; > + lines_nr = 0; > + lines_alloc = 128; both lines_nr as well as lines_alloc are already initialized?