diff options
| author | Taylor Blau <me@ttaylorr.com> | 2025-10-15 18:28:41 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-16 10:08:55 -0700 |
| commit | 2a15a739a231d3eac774e13b53003faa7377719c (patch) | |
| tree | 4f86137b32103fdc3bd4958a4eb83c8e6aec0b0c /builtin | |
| parent | e05c2d55668dcaa6a912372d93fb8f82d418d390 (diff) | |
| download | git-2a15a739a231d3eac774e13b53003faa7377719c.tar.gz | |
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>
Diffstat (limited to 'builtin')
| -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 42f05d2ebf..ac8c80d0a5 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -136,7 +136,8 @@ static int pack_geometry_cmp(const void *va, const void *vb) static void pack_geometry_init(struct pack_geometry *geometry, struct existing_packs *existing, - const struct pack_objects_args *args) + const struct pack_objects_args *args, + int pack_kept_objects) { struct packfile_store *packs = existing->repo->objects->packfiles; struct packed_git *p; @@ -1063,7 +1064,8 @@ int cmd_repack(int argc, if (geometry.split_factor) { if (pack_everything) die(_("options '%s' and '%s' cannot be used together"), "--geometric", "-A/-a"); - pack_geometry_init(&geometry, &existing, &po_args); + pack_geometry_init(&geometry, &existing, &po_args, + pack_kept_objects); pack_geometry_split(&geometry); } |
