author | Nicolas Pitre <nico@fluxnic.net> | |
Fri, 22 Oct 2010 04:02:27 +0000 (00:02 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 22 Oct 2010 05:23:34 +0000 (22:23 -0700) | ||
commit | c50c4316e1eed362bee387e4cbfbe1138957f75b | |
tree | e35756783e663a7e51bdf6599372df4284e08056 | tree | snapshot |
parent | e923eaeb901ff056421b9007adcbbce271caa7b6 | commit | diff |
diff: don't presume empty file when corresponding object is missing
The low-level diff code will happily produce totally bogus diff output
with a broken repository via format-patch and friends by treating missing
objects as empty files. Let's prevent that from happening any longer.
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The low-level diff code will happily produce totally bogus diff output
with a broken repository via format-patch and friends by treating missing
objects as empty files. Let's prevent that from happening any longer.
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | diff | blob | history |