summaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-08-22 11:17:05 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-08-22 11:17:05 -0700
commit29d9e3e2c47dd4b5053b0a98c891878d398463e3 (patch)
tree84ddf805214c29fe3309ca4543b4dd249bfd4bd5 /builtin/pack-objects.c
parentGit 2.19-rc0 (diff)
parentpack-objects: fix performance issues on packing large deltas (diff)
downloadtgif-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/pack-objects.c')
-rw-r--r--builtin/pack-objects.c5
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);
}