pack-bitmap-write: learn pack.writeBitmapLookupTable and add tests
Teach Git to provide a way for users to enable/disable bitmap lookup table extension by providing a config option named 'writeBitmapLookupTable'. Default is false. Also add test to verify writting of lookup table. Mentored-by: Taylor Blau <me@ttaylorr.com> Co-Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Co-Authored-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Abhradeep Chakraborty <chakrabortyabhradeep79@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
93eb41e240
commit
76f14b777c
@ -87,6 +87,13 @@ static int git_multi_pack_index_write_config(const char *var, const char *value,
|
||||
opts.flags &= ~MIDX_WRITE_BITMAP_HASH_CACHE;
|
||||
}
|
||||
|
||||
if (!strcmp(var, "pack.writebitmaplookuptable")) {
|
||||
if (git_config_bool(var, value))
|
||||
opts.flags |= MIDX_WRITE_BITMAP_LOOKUP_TABLE;
|
||||
else
|
||||
opts.flags &= ~MIDX_WRITE_BITMAP_LOOKUP_TABLE;
|
||||
}
|
||||
|
||||
/*
|
||||
* We should never make a fall-back call to 'git_default_config', since
|
||||
* this was already called in 'cmd_multi_pack_index()'.
|
||||
|
Reference in New Issue
Block a user