author | Kirill Smelkov <kirr@landau.phys.spbu.ru> | |
Sat, 18 Dec 2010 14:54:12 +0000 (17:54 +0300) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 20 Dec 2010 02:41:32 +0000 (18:41 -0800) | ||
commit | 9ec09b0495f5e672223025f5e681371034da2538 | |
tree | fa3031a4d139c21da6e416e2280f47d97018bd11 | tree | snapshot |
parent | b1b14ec3f14edfc5f76643aaaac6548fc94fb47e | commit | diff |
fill_textconv(): Don't get/put cache if sha1 is not valid
When blaming files in the working tree, the filespec is marked with
!sha1_valid, as we have not given the contents an object name yet. The
function to cache textconv results (keyed on the object name), however,
didn't check this condition, and ended up on storing the cached result
under a random object name.
Cc: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Cc: Clément Poulain <clement.poulain@ensimag.imag.fr>
Cc: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Cc: Jeff King <peff@peff.net>
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When blaming files in the working tree, the filespec is marked with
!sha1_valid, as we have not given the contents an object name yet. The
function to cache textconv results (keyed on the object name), however,
didn't check this condition, and ended up on storing the cached result
under a random object name.
Cc: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Cc: Clément Poulain <clement.poulain@ensimag.imag.fr>
Cc: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Cc: Jeff King <peff@peff.net>
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | diff | blob | history | |
t/t8006-blame-textconv.sh | diff | blob | history |