diff options
Diffstat (limited to 'source/ui-blame.c')
| -rw-r--r-- | source/ui-blame.c | 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 3 insertions, 8 deletions
diff --git a/source/ui-blame.c b/source/ui-blame.c index 1132f43..418e3ae 100644 --- a/source/ui-blame.c +++ b/source/ui-blame.c @@ -173,13 +173,6 @@ static void print_object(const struct object_id *oid, const char *path, html("<div class='error'>blob is binary.</div>"); goto cleanup; } - if (ctx.cfg.max_blob_size && size / 1024 > ctx.cfg.max_blob_size) { - htmlf("<div class='error'>blob size (%ldKB)" - " exceeds display size limit (%dKB).</div>", - size / 1024, ctx.cfg.max_blob_size); - goto cleanup; - } - html("<table class='blame blob'>\n<tr>\n"); /* Commit hashes */ @@ -247,7 +240,9 @@ static int walk_tree(const struct object_id *oid, struct strbuf *base, { struct walk_tree_context *walk_tree_ctx = cbdata; - if (base->len == walk_tree_ctx->match_baselen) { + // match_baselen is -1 when no path was given, which no length equals. + if (walk_tree_ctx->match_baselen >= 0 && + base->len == (size_t)walk_tree_ctx->match_baselen) { if (S_ISREG(mode)) { struct strbuf buffer = STRBUF_INIT; strbuf_addbuf(&buffer, base); |
