From: Junio C Hamano Date: Mon, 13 May 2019 14:50:32 +0000 (+0900) Subject: Merge branch 'ew/repack-with-bitmaps-by-default' X-Git-Tag: v2.22.0-rc0~11 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/2bfb182bc544214b3a15058b52b3a00c9811e3c2?ds=inline;hp=-c Merge branch 'ew/repack-with-bitmaps-by-default' The connectivity bitmaps are created by default in bare repositories now; also the pathname hash-cache is created by default to avoid making crappy deltas when repacking. * ew/repack-with-bitmaps-by-default: pack-objects: default to writing bitmap hash-cache t5310: correctly remove bitmaps for jgit test repack: enable bitmaps by default on bare repos --- 2bfb182bc544214b3a15058b52b3a00c9811e3c2 diff --combined builtin/pack-objects.c index d7743f110b,5264bf055a..9f424aabab --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@@ -97,7 -97,7 +97,7 @@@ static off_t reuse_packfile_offset static int use_bitmap_index_default = 1; static int use_bitmap_index = -1; static int write_bitmap_index; - static uint16_t write_bitmap_options; + static uint16_t write_bitmap_options = BITMAP_OPT_HASH_CACHE; static int exclude_promisor_objects; @@@ -964,8 -964,6 +964,8 @@@ static void write_pack_file(void if (written != nr_result) die(_("wrote %"PRIu32" objects while expecting %"PRIu32), written, nr_result); + trace2_data_intmax("pack-objects", the_repository, + "write_pack_file/wrote", nr_result); } static int no_try_delta(const char *path) @@@ -1489,7 -1487,6 +1489,7 @@@ static int can_reuse_delta(const unsign struct object_entry **base_out) { struct object_entry *base; + struct object_id base_oid; if (!base_sha1) return 0; @@@ -1511,9 -1508,10 +1511,9 @@@ * even if it was buried too deep in history to make it into the * packing list. */ - if (thin && bitmap_has_sha1_in_uninteresting(bitmap_git, base_sha1)) { + oidread(&base_oid, base_sha1); + if (thin && bitmap_has_oid_in_uninteresting(bitmap_git, &base_oid)) { if (use_delta_islands) { - struct object_id base_oid; - hashcpy(base_oid.hash, base_sha1); if (!in_same_island(&delta->idx.oid, &base_oid)) return 0; }