Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Pin the listing's blame link for a late NUL
The listing judges binary by the first 8000 bytes, as git does, while the blame page and the file view look for a NUL anywhere, since one past that window would end a Lua filter's output early. The listing keeps the cheap sniff, because the whole-blob check would inflate every blob it names, so a file whose NUL lies past the window gets a blame link that ends on "Blob is binary". The test pins that trade, so a change to either side has to face it.
-rw-r--r--source/ui-tree.c4
-rwxr-xr-xtests/t0104-tree.sh23
2 files changed, 27 insertions, 0 deletions