]> git.ipfire.org Git - thirdparty/git.git/commit - midx.h
midx.c: respect 'pack.writeBitmapHashcache' when writing bitmaps
authorTaylor Blau <me@ttaylorr.com>
Tue, 14 Sep 2021 22:06:06 +0000 (18:06 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Sep 2021 23:34:18 +0000 (16:34 -0700)
commitcaca3c9f07f90645e32c284c88c379109abf59be
tree257c33a005692de96e61d8e6a2df0d09554b3eb7
parent8de300e1f7ebe7099ce6ce60f6c6fb494e6703b2
midx.c: respect 'pack.writeBitmapHashcache' when writing bitmaps

In the previous commit, the bitmap writing code learned to propagate
values from an existing hash-cache extension into the bitmap that it is
writing.

Now that that functionality exists, let's expose it by teaching the 'git
multi-pack-index' builtin to respect the `pack.writeBitmapHashCache`
option so that the hash-cache may be written at all.

Two minor points worth noting here:

  - The 'git multi-pack-index write' sub-command didn't previously read
    any configuration (instead this is handled in the base command). A
    separate handler is added here to respect this write-specific
    config option.

  - I briefly considered adding a 'bitmap_flags' field to the static
    options struct, but decided against it since it would require
    plumbing through a new parameter to the write_midx_file() function.

    Instead, a new MIDX-specific flag is added, which is translated to
    the corresponding bitmap one.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/pack.txt
builtin/multi-pack-index.c
midx.c
midx.h