Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Offer blame only where it works
The blame page answers 404 for a symlink, since git blames a regular file alone, and it refuses a binary file and one past max-blob-size, yet a tree listing offered blame for all of them, and so did a symlink's own page. Each row already knows its size, and git calls a file binary by its first 8000 bytes alone, which a stream reads without inflating the rest. With blame on, a listing of 2,000 delta-packed files went from about 11 to 15 ms.
Diffstat (limited to 'source')
-rw-r--r--source/ui-tree.c41
1 file changed, 37 insertions, 4 deletions