diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-08-22 11:17:05 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-22 11:17:05 -0700 |
commit | 29d9e3e2c47dd4b5053b0a98c891878d398463e3 (patch) | |
tree | 84ddf805214c29fe3309ca4543b4dd249bfd4bd5 /builtin | |
parent | Git 2.19-rc0 (diff) | |
parent | pack-objects: fix performance issues on packing large deltas (diff) | |
download | tgif-29d9e3e2c47dd4b5053b0a98c891878d398463e3.tar.xz |
Merge branch 'nd/pack-deltify-regression-fix'
In a recent update in 2.18 era, "git pack-objects" started
producing a larger than necessary packfiles by missing
opportunities to use large deltas.
* nd/pack-deltify-regression-fix:
pack-objects: fix performance issues on packing large deltas
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/pack-objects.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 0d80dee2ba..d1144a8f7e 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -2041,10 +2041,6 @@ static int try_delta(struct unpacked *trg, struct unpacked *src, delta_buf = create_delta(src->index, trg->data, trg_size, &delta_size, max_size); if (!delta_buf) return 0; - if (delta_size >= (1U << OE_DELTA_SIZE_BITS)) { - free(delta_buf); - return 0; - } if (DELTA(trg_entry)) { /* Prefer only shallower same-sized deltas. */ @@ -2303,6 +2299,7 @@ static void init_threaded_search(void) pthread_mutex_init(&cache_mutex, NULL); pthread_mutex_init(&progress_mutex, NULL); pthread_cond_init(&progress_cond, NULL); + pthread_mutex_init(&to_pack.lock, NULL); old_try_to_free_routine = set_try_to_free_routine(try_to_free_from_threads); } |