aboutsummaryrefslogtreecommitdiff
path: root/git-arr
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-01-13 10:57:13 +0100
committerAlberto Bertogli <albertito@blitiri.com.ar>2015-01-13 20:51:44 +0100
commit09c2f33f5a1f7137d50b3638e1a3f937e0701a6e (patch)
tree37aa3b557931b053616dabe086cf7fe84647ba86 /git-arr
parent58037e57c591b1c55594a0adb637d1880bfacaee (diff)
downloadgit-arr-fork-09c2f33f5a1f7137d50b3638e1a3f937e0701a6e.zip
blob: render binary blob summary information rather than raw content
Binary blobs are currently rendered as raw data directly into the HTML output, looking much like "line noise". This is rarely, if ever, meaningful, and consumes considerable storage space since the entire raw blob content is embedded in the generated HTML file. Address this issue by instead emitting summary information about the blob, such as its classification ("binary") and its size. Other information can be added as needed. As in Git itself, a blob is considered binary if a NUL is present in the first ~8KB. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Diffstat (limited to 'git-arr')
-rwxr-xr-xgit-arr1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-arr b/git-arr
index f559af4..d3f1151 100755
--- a/git-arr
+++ b/git-arr
@@ -187,6 +187,7 @@ def with_utils(f):
'markdown_blob': utils.markdown_blob,
'can_embed_image': utils.can_embed_image,
'embed_image_blob': utils.embed_image_blob,
+ 'is_binary': utils.is_binary,
'abort': bottle.abort,
'smstr': git.smstr,
}