aboutsummaryrefslogtreecommitdiffstats
path: root/repack.h
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2025-10-15 18:29:13 -0400
committerJunio C Hamano <gitster@pobox.com>2025-10-16 10:08:56 -0700
commit6d05eb135f67d2d45a0fbd110a32d28b1e28c95d (patch)
tree996b623a2d1ec2f2e6feec134800c8c8c087d1ed /repack.h
parentbuiltin/repack.c: inline packs within `write_midx_included_packs()` (diff)
downloadgit-6d05eb135f67d2d45a0fbd110a32d28b1e28c95d.tar.gz
git-6d05eb135f67d2d45a0fbd110a32d28b1e28c95d.zip
repack: 'write_midx_included_packs' API from the builtin
Now that we have sufficiently cleaned up the write_midx_included_packs() function, we can move it (along with the struct repack_write_midx_opts) out of the builtin, and into the repack.h header. Since this function (and the static ones that it depends on) are MIDX-specific details of the repacking process, move them to the repack-midx.c compilation unit instead of the general repack.c one. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r--repack.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/repack.h b/repack.h
index 6aa5b4e0f0..25a31ac0a0 100644
--- a/repack.h
+++ b/repack.h
@@ -101,6 +101,18 @@ void pack_geometry_release(struct pack_geometry *geometry);
struct tempfile;
+struct repack_write_midx_opts {
+ struct existing_packs *existing;
+ struct pack_geometry *geometry;
+ struct string_list *names;
+ const char *refs_snapshot;
+ const char *packdir;
+ int show_progress;
+ int write_bitmaps;
+ int midx_must_contain_cruft;
+};
+
void midx_snapshot_refs(struct repository *repo, struct tempfile *f);
+int write_midx_included_packs(struct repack_write_midx_opts *opts);
#endif /* REPACK_H */