diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-03-10 11:13:42 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-10 11:13:43 -0800 |
commit | aa6c22ec43fa9e2ac531360b5f274446e27d8be1 (patch) | |
tree | 7459843cf85a3b6182bcec2f30c7b6fd36b73165 /diff.c | |
parent | Merge branch 'jk/no-diff-emit-common' into maint (diff) | |
parent | diff: clarify textconv interface (diff) | |
download | tgif-aa6c22ec43fa9e2ac531360b5f274446e27d8be1.tar.xz |
Merge branch 'jk/more-comments-on-textconv' into maint
The memory ownership rule of fill_textconv() API, which was a bit
tricky, has been documented a bit better.
* jk/more-comments-on-textconv:
diff: clarify textconv interface
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -5085,7 +5085,7 @@ size_t fill_textconv(struct userdiff_driver *driver, { size_t size; - if (!driver || !driver->textconv) { + if (!driver) { if (!DIFF_FILE_VALID(df)) { *outbuf = ""; return 0; @@ -5096,6 +5096,9 @@ size_t fill_textconv(struct userdiff_driver *driver, return df->size; } + if (!driver->textconv) + die("BUG: fill_textconv called with non-textconv driver"); + if (driver->textconv_cache && df->sha1_valid) { *outbuf = notes_cache_get(driver->textconv_cache, df->sha1, &size); |