diff options
-rw-r--r-- | fast-import.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fast-import.c b/fast-import.c index 7fc98620b2..74f08bd554 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1041,14 +1041,10 @@ static int store_object( return 1; } - if (last && last->data.buf && last->depth < max_depth) { + if (last && last->data.buf && last->depth < max_depth && dat->len > 20) { delta = diff_delta(last->data.buf, last->data.len, dat->buf, dat->len, - &deltalen, 0); - if (delta && deltalen >= dat->len) { - free(delta); - delta = NULL; - } + &deltalen, dat->len - 20); } else delta = NULL; |