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:
6
midx.c
6
midx.c
@ -993,9 +993,13 @@ static int write_midx_bitmap(char *midx_name, unsigned char *midx_hash,
|
||||
struct pack_idx_entry **index;
|
||||
struct commit **commits = NULL;
|
||||
uint32_t i, commits_nr;
|
||||
uint16_t options = 0;
|
||||
char *bitmap_name = xstrfmt("%s-%s.bitmap", midx_name, hash_to_hex(midx_hash));
|
||||
int ret;
|
||||
|
||||
if (flags & MIDX_WRITE_BITMAP_HASH_CACHE)
|
||||
options |= BITMAP_OPT_HASH_CACHE;
|
||||
|
||||
prepare_midx_packing_data(&pdata, ctx);
|
||||
|
||||
commits = find_commits_for_midx_bitmap(&commits_nr, ctx);
|
||||
@ -1034,7 +1038,7 @@ static int write_midx_bitmap(char *midx_name, unsigned char *midx_hash,
|
||||
goto cleanup;
|
||||
|
||||
bitmap_writer_set_checksum(midx_hash);
|
||||
bitmap_writer_finish(index, pdata.nr_objects, bitmap_name, 0);
|
||||
bitmap_writer_finish(index, pdata.nr_objects, bitmap_name, options);
|
||||
|
||||
cleanup:
|
||||
free(index);
|
||||
|
Reference in New Issue
Block a user