summaryrefslogtreecommitdiff
path: root/midx.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-10-18 15:47:57 -0700
committerJunio C Hamano <gitster@pobox.com>2021-10-18 15:47:57 -0700
commit0b69bb0fb1ebe1a9ab7a3f4bfde5cad82eb892e3 (patch)
tree4c179a5d23b7ed34cd919394f8165f803712935a /midx.h
parent223a1bfb5821387981c700654e4edd2443c5a7fc (diff)
parente861b0963626dd2732f7efbf2a187a85b060d9cb (diff)
downloadgit-0b69bb0fb1ebe1a9ab7a3f4bfde5cad82eb892e3.tar.gz
Merge branch 'tb/repack-write-midx'
"git repack" has been taught to generate multi-pack reachability bitmaps. * tb/repack-write-midx: test-read-midx: fix leak of bitmap_index struct builtin/repack.c: pass `--refs-snapshot` when writing bitmaps builtin/repack.c: make largest pack preferred builtin/repack.c: support writing a MIDX while repacking builtin/repack.c: extract showing progress to a variable builtin/repack.c: rename variables that deal with non-kept packs builtin/repack.c: keep track of existing packs unconditionally midx: preliminary support for `--refs-snapshot` builtin/multi-pack-index.c: support `--stdin-packs` mode midx: expose `write_midx_file_only()` publicly
Diffstat (limited to 'midx.h')
-rw-r--r--midx.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/midx.h b/midx.h
index 541d9ac728..6e32297fa3 100644
--- a/midx.h
+++ b/midx.h
@@ -2,6 +2,7 @@
#define MIDX_H
#include "repository.h"
+#include "string-list.h"
struct object_id;
struct pack_entry;
@@ -62,7 +63,19 @@ int fill_midx_entry(struct repository *r, const struct object_id *oid, struct pa
int midx_contains_pack(struct multi_pack_index *m, const char *idx_or_pack_name);
int prepare_multi_pack_index_one(struct repository *r, const char *object_dir, int local);
-int write_midx_file(const char *object_dir, const char *preferred_pack_name, unsigned flags);
+/*
+ * Variant of write_midx_file which writes a MIDX containing only the packs
+ * specified in packs_to_include.
+ */
+int write_midx_file(const char *object_dir,
+ const char *preferred_pack_name,
+ const char *refs_snapshot,
+ unsigned flags);
+int write_midx_file_only(const char *object_dir,
+ struct string_list *packs_to_include,
+ const char *preferred_pack_name,
+ const char *refs_snapshot,
+ unsigned flags);
void clear_midx_file(struct repository *r);
int verify_midx_file(struct repository *r, const char *object_dir, unsigned flags);
int expire_midx_packs(struct repository *r, const char *object_dir, unsigned flags);