X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diff.c;h=5422c438826254f36d1e00af0e8b882690661276;hb=e7d04ee147dcbe6af1fa1d2147466696e2be31bc;hp=0a438694351e555f66cbb3d24759d3a10a46ff20;hpb=643b6ef809cdbc47c698b688b0dfe218eca9b474;p=git.git diff --git a/diff.c b/diff.c index 0a4386943..5422c4388 100644 --- a/diff.c +++ b/diff.c @@ -4412,7 +4412,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) @@ -4423,7 +4423,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);