Skip to content

Commit 7036d13

Browse files
ttaylorrgitster
authored andcommitted
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>
1 parent 184f0ab commit 7036d13

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

builtin/repack.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ static int generated_pack_has_ext(const struct generated_pack *pack,
185185
}
186186

187187
static void generated_pack_install(struct generated_pack *pack,
188-
const char *name)
188+
const char *name,
189+
const char *packdir, const char *packtmp)
189190
{
190191
int ext;
191192
for (ext = 0; ext < ARRAY_SIZE(exts); ext++) {
@@ -1468,7 +1469,8 @@ int cmd_repack(int argc,
14681469
* Ok we have prepared all new packfiles.
14691470
*/
14701471
for_each_string_list_item(item, &names)
1471-
generated_pack_install(item->util, item->string);
1472+
generated_pack_install(item->util, item->string, packdir,
1473+
packtmp);
14721474
/* End of pack replacement. */
14731475

14741476
if (delete_redundant && pack_everything & ALL_INTO_ONE)

0 commit comments

Comments
 (0)