Merge branch 'tb/midx-write-propagate-namehash'
"git multi-pack-index write --bitmap" learns to propagate the hashcache from original bitmap to resulting bitmap. * tb/midx-write-propagate-namehash: t5326: test propagating hashcache values p5326: generate pack bitmaps before writing the MIDX bitmap p5326: don't set core.multiPackIndex unnecessarily p5326: create missing 'perf-tag' tag midx.c: respect 'pack.writeBitmapHashcache' when writing bitmaps pack-bitmap.c: propagate namehash values from existing bitmaps t/helper/test-bitmap.c: add 'dump-hashes' mode
This commit is contained in:
@ -60,6 +60,23 @@ static struct option *add_common_options(struct option *prev)
|
||||
return parse_options_concat(common_opts, prev);
|
||||
}
|
||||
|
||||
static int git_multi_pack_index_write_config(const char *var, const char *value,
|
||||
void *cb)
|
||||
{
|
||||
if (!strcmp(var, "pack.writebitmaphashcache")) {
|
||||
if (git_config_bool(var, value))
|
||||
opts.flags |= MIDX_WRITE_BITMAP_HASH_CACHE;
|
||||
else
|
||||
opts.flags &= ~MIDX_WRITE_BITMAP_HASH_CACHE;
|
||||
}
|
||||
|
||||
/*
|
||||
* We should never make a fall-back call to 'git_default_config', since
|
||||
* this was already called in 'cmd_multi_pack_index()'.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cmd_multi_pack_index_write(int argc, const char **argv)
|
||||
{
|
||||
struct option *options;
|
||||
@ -74,6 +91,10 @@ static int cmd_multi_pack_index_write(int argc, const char **argv)
|
||||
OPT_END(),
|
||||
};
|
||||
|
||||
opts.flags |= MIDX_WRITE_BITMAP_HASH_CACHE;
|
||||
|
||||
git_config(git_multi_pack_index_write_config, NULL);
|
||||
|
||||
options = add_common_options(builtin_multi_pack_index_write_options);
|
||||
|
||||
trace2_cmd_mode(argv[0]);
|
||||
|
Reference in New Issue
Block a user