summaryrefslogtreecommitdiff
path: root/builtin/multi-pack-index.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2021-08-31 20:52:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-01 20:56:43 (GMT)
commitc528e179662ce1353c51f65e1b5895d02988c78c (patch)
tree18b5f23d2aff4b4b8320d2701b9f7a617d7f7798 /builtin/multi-pack-index.c
parent0f533c728418fd3ef6ebcae5240e8df566cdaa72 (diff)
downloadgit-c528e179662ce1353c51f65e1b5895d02988c78c.zip
git-c528e179662ce1353c51f65e1b5895d02988c78c.tar.gz
git-c528e179662ce1353c51f65e1b5895d02988c78c.tar.bz2
pack-bitmap: write multi-pack bitmaps
Write multi-pack bitmaps in the format described by Documentation/technical/bitmap-format.txt, inferring their presence with the absence of '--bitmap'. To write a multi-pack bitmap, this patch attempts to reuse as much of the existing machinery from pack-objects as possible. Specifically, the MIDX code prepares a packing_data struct that pretends as if a single packfile has been generated containing all of the objects contained within the MIDX. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/multi-pack-index.c')
-rw-r--r--builtin/multi-pack-index.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c
index 8ff0dee..73c0113 100644
--- a/builtin/multi-pack-index.c
+++ b/builtin/multi-pack-index.c
@@ -68,6 +68,8 @@ static int cmd_multi_pack_index_write(int argc, const char **argv)
OPT_STRING(0, "preferred-pack", &opts.preferred_pack,
N_("preferred-pack"),
N_("pack for reuse when computing a multi-pack bitmap")),
+ OPT_BIT(0, "bitmap", &opts.flags, N_("write multi-pack bitmap"),
+ MIDX_WRITE_BITMAP | MIDX_WRITE_REV_INDEX),
OPT_END(),
};