[PATCH 23/49] builtin/repack.c: provide pack locations to `generated_pack_install()`
From: Taylor Blau <hidden>
Date: 2025-09-28 22:08:42
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Taylor Blau <hidden>
Date: 2025-09-28 22:08:42
Subsystem:
the rest · Maintainer:
Linus Torvalds
Repeat what was done in the preceding commit for the `generated_pack_install()` function, which needs both "packdir" and "packtmp". (As an aside, it is somewhat unfortunate that the final three parameters to this function are all "const char *", making errors like passing "packdir" and "packtmp" in the wrong order easy. We could define a new structure here, but that may be too heavy-handed.) Signed-off-by: Taylor Blau <redacted> --- builtin/repack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin/repack.c b/builtin/repack.c
index 2141c43bd2..a4f0a19453 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c@@ -185,7 +185,8 @@ static int generated_pack_has_ext(const struct generated_pack *pack, } static void generated_pack_install(struct generated_pack *pack, - const char *name) + const char *name, + const char *packdir, const char *packtmp) { int ext; for (ext = 0; ext < ARRAY_SIZE(exts); ext++) {
@@ -1469,7 +1470,7 @@ int cmd_repack(int argc, */ for_each_string_list_item(item, &names) generated_pack_install((struct generated_pack *)item->util, - item->string); + item->string, packdir, packtmp); /* End of pack replacement. */ if (delete_redundant && pack_everything & ALL_INTO_ONE)
--
2.51.0.243.g16eca91f2c0