diff options
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r-- | builtin-pack-objects.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index b4f3e7c2eb..54f304c115 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -1348,6 +1348,8 @@ static int try_delta(struct unpacked *trg, struct unpacked *src, sizediff = src_size < trg_size ? trg_size - src_size : 0; if (sizediff >= max_size) return 0; + if (trg_size < src_size / 32) + return 0; /* Load data if not already done */ if (!trg->data) { |