]> git.ipfire.org Git - thirdparty/git.git/commit - fast-import.c
fast-import: do not call diff_delta() with empty buffer
authorMike Hommey <mh@glandium.org>
Sat, 30 Jun 2018 21:41:06 +0000 (06:41 +0900)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Jul 2018 16:46:12 +0000 (09:46 -0700)
commit9d14ecf39dc70cd2d2cf639d873b8e2c7f039d11
treef3375968de6fbe5a439f73214767da69bccc77f4
parente3331758f12da22f4103eec7efe1b5304a9be5e9
fast-import: do not call diff_delta() with empty buffer

We know diff_delta() returns NULL, saying "no good delta exists for
it", when fed an empty data.  Check the length of the data in the
caller to avoid such a call.

This incidentally reduces the number of attempted deltification we
see in the final statistics.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import.c