1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-28 21:07:52 +01:00

Merge branch 'mh/fast-import-no-diff-delta-empty'

"git fast-import" has been updated to avoid attempting to create
delta against a zero-byte-long string, which is pointless.

* mh/fast-import-no-diff-delta-empty:
  fast-import: do not call diff_delta() with empty buffer
This commit is contained in:
Junio C Hamano 2018-07-24 14:50:46 -07:00
commit fa6758e9af

View file

@ -1076,7 +1076,7 @@ static int store_object(
return 1; return 1;
} }
if (last && last->data.buf && last->depth < max_depth if (last && last->data.len && last->data.buf && last->depth < max_depth
&& dat->len > the_hash_algo->rawsz) { && dat->len > the_hash_algo->rawsz) {
delta_count_attempts_by_type[type]++; delta_count_attempts_by_type[type]++;