diff options
| author | Taylor Blau <me@ttaylorr.com> | 2025-10-15 18:28:26 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-16 10:08:54 -0700 |
| commit | 7036d131ae514f1bc854670a9d26b31064fcd88d (patch) | |
| tree | 72fa1ce48ae2808751f1f2a0a1415dc9b76363a2 /builtin/repack.c | |
| parent | 184f0abeb802f44c0e23abe3c8a3fc7448c78b99 (diff) | |
| download | git-7036d131ae514f1bc854670a9d26b31064fcd88d.tar.gz | |
builtin/repack.c: provide pack locations to `generated_pack_install()`
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 <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/repack.c')
| -rw-r--r-- | builtin/repack.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/repack.c b/builtin/repack.c index bed902adde..966db27613 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++) { @@ -1468,7 +1469,8 @@ int cmd_repack(int argc, * Ok we have prepared all new packfiles. */ for_each_string_list_item(item, &names) - generated_pack_install(item->util, item->string); + generated_pack_install(item->util, item->string, packdir, + packtmp); /* End of pack replacement. */ if (delete_redundant && pack_everything & ALL_INTO_ONE) |
