]> git.ipfire.org Git - thirdparty/git.git/commitdiff
builtin/repack.c: pass 'packdir' to `pack_geometry_remove_redundant()`
authorTaylor Blau <me@ttaylorr.com>
Wed, 15 Oct 2025 22:28:44 +0000 (18:28 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Oct 2025 17:08:55 +0000 (10:08 -0700)
For similar reasons as the preceding commit, pass the "packdir" variable
directly to `pack_geometry_remove_redundant()` as a parameter to the
function.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/repack.c

index ac8c80d0a5ab666b6378785bea68c696dfd97775..f6d04b33a79c6c6e65547fe30d4cd1b7bde27711 100644 (file)
@@ -307,7 +307,8 @@ static struct packed_git *pack_geometry_preferred_pack(struct pack_geometry *geo
 
 static void pack_geometry_remove_redundant(struct pack_geometry *geometry,
                                           struct string_list *names,
-                                          struct existing_packs *existing)
+                                          struct existing_packs *existing,
+                                          const char *packdir)
 {
        const struct git_hash_algo *algop = existing->repo->hash_algo;
        struct strbuf buf = STRBUF_INIT;
@@ -1327,7 +1328,7 @@ int cmd_repack(int argc,
 
                if (geometry.split_factor)
                        pack_geometry_remove_redundant(&geometry, &names,
-                                                      &existing);
+                                                      &existing, packdir);
                if (show_progress)
                        opts |= PRUNE_PACKED_VERBOSE;
                prune_packed_objects(opts);