Skip to content

Commit 2a15a73

Browse files
ttaylorrgitster
authored andcommitted
builtin/repack.c: pass 'pack_kept_objects' to pack_geometry_init()
Prepare to move pack_geometry-related APIs to their own compilation unit by passing in the static "pack_kept_objects" variable directly as a parameter to the 'pack_geometry_init()' function. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent e05c2d5 commit 2a15a73

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
@@ -136,7 +136,8 @@ static int pack_geometry_cmp(const void *va, const void *vb)
136136

137137
static void pack_geometry_init(struct pack_geometry *geometry,
138138
struct existing_packs *existing,
139-
const struct pack_objects_args *args)
139+
const struct pack_objects_args *args,
140+
int pack_kept_objects)
140141
{
141142
struct packfile_store *packs = existing->repo->objects->packfiles;
142143
struct packed_git *p;
@@ -1063,7 +1064,8 @@ int cmd_repack(int argc,
10631064
if (geometry.split_factor) {
10641065
if (pack_everything)
10651066
die(_("options '%s' and '%s' cannot be used together"), "--geometric", "-A/-a");
1066-
pack_geometry_init(&geometry, &existing, &po_args);
1067+
pack_geometry_init(&geometry, &existing, &po_args,
1068+
pack_kept_objects);
10671069
pack_geometry_split(&geometry);
10681070
}
10691071

0 commit comments

Comments
 (0)