aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-28 13:44:58 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-28 13:44:58 -0800
commit359f34f6cc948a2ddd2c99239f24a78d560bafd0 (patch)
tree36e0d7e594aea3802751c94378cec98c35a6e22d /diff.c
parent58c58c8624d77ff4087ad93e515402db218684f6 (diff)
parent9ec09b0495f5e672223025f5e681371034da2538 (diff)
downloadgit-359f34f6cc948a2ddd2c99239f24a78d560bafd0.tar.gz
git-359f34f6cc948a2ddd2c99239f24a78d560bafd0.tar.xz
Merge branch 'ks/blame-worktree-textconv-cached' into maint
* ks/blame-worktree-textconv-cached: fill_textconv(): Don't get/put cache if sha1 is not valid t/t8006: Demonstrate blame is broken when cachetextconv is on
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 8256f313e..fa3b29d92 100644
--- a/diff.c
+++ b/diff.c
@@ -4388,7 +4388,7 @@ size_t fill_textconv(struct userdiff_driver *driver,
return df->size;
}
- if (driver->textconv_cache) {
+ if (driver->textconv_cache && df->sha1_valid) {
*outbuf = notes_cache_get(driver->textconv_cache, df->sha1,
&size);
if (*outbuf)
@@ -4399,7 +4399,7 @@ size_t fill_textconv(struct userdiff_driver *driver,
if (!*outbuf)
die("unable to read files to diff");
- if (driver->textconv_cache) {
+ if (driver->textconv_cache && df->sha1_valid) {
/* ignore errors, as we might be in a readonly repository */
notes_cache_put(driver->textconv_cache, df->sha1, *outbuf,
size);