In a similar spirit as previous commits, this function needs to know the
temporary pack prefix, which it currently accesses through the static
"packtmp" variable within builtin/repack.c.
Pass it explicitly as a function parameter to facilitate moving this
function out of builtin/repack.c entirely.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
struct tempfile *tempfiles[ARRAY_SIZE(exts)];
};
-static struct generated_pack *generated_pack_populate(const char *name)
+static struct generated_pack *generated_pack_populate(const char *name,
+ const char *packtmp)
{
struct stat statbuf;
struct strbuf path = STRBUF_INIT;
line.buf);
write_promisor_file(promisor_name, NULL, 0);
- item->util = generated_pack_populate(item->string);
+ item->util = generated_pack_populate(item->string, packtmp);
free(promisor_name);
}
*/
if (local) {
item = string_list_append(names, line.buf);
- item->util = generated_pack_populate(line.buf);
+ item->util = generated_pack_populate(line.buf, packtmp);
}
}
fclose(out);