diff options
Diffstat (limited to 'ui-tree.c')
-rw-r--r-- | ui-tree.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,6 +1,6 @@ | |||
1 | /* ui-tree.c: functions for tree output | 1 | /* ui-tree.c: functions for tree output |
2 | * | 2 | * |
3 | * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> | 3 | * Copyright (C) 2006-2017 cgit Development Team <cgit@lists.zx2c4.com> |
4 | * | 4 | * |
5 | * Licensed under GNU General Public License v2 | 5 | * Licensed under GNU General Public License v2 |
6 | * (see COPYING for full license text) | 6 | * (see COPYING for full license text) |
@@ -110,6 +110,11 @@ static void print_object(const unsigned char *sha1, char *path, const char *base | |||
110 | htmlf("blob: %s (", sha1_to_hex(sha1)); | 110 | htmlf("blob: %s (", sha1_to_hex(sha1)); |
111 | cgit_plain_link("plain", NULL, NULL, ctx.qry.head, | 111 | cgit_plain_link("plain", NULL, NULL, ctx.qry.head, |
112 | rev, path); | 112 | rev, path); |
113 | if (ctx.cfg.enable_blame) { | ||
114 | html(") ("); | ||
115 | cgit_blame_link("blame", NULL, NULL, ctx.qry.head, | ||
116 | rev, path); | ||
117 | } | ||
113 | html(")\n"); | 118 | html(")\n"); |
114 | 119 | ||
115 | if (ctx.cfg.max_blob_size && size / 1024 > ctx.cfg.max_blob_size) { | 120 | if (ctx.cfg.max_blob_size && size / 1024 > ctx.cfg.max_blob_size) { |
@@ -244,6 +249,9 @@ static int ls_item(const unsigned char *sha1, struct strbuf *base, | |||
244 | if (!S_ISGITLINK(mode)) | 249 | if (!S_ISGITLINK(mode)) |
245 | cgit_plain_link("plain", NULL, "button", ctx.qry.head, | 250 | cgit_plain_link("plain", NULL, "button", ctx.qry.head, |
246 | walk_tree_ctx->curr_rev, fullpath.buf); | 251 | walk_tree_ctx->curr_rev, fullpath.buf); |
252 | if (!S_ISDIR(mode) && ctx.cfg.enable_blame) | ||
253 | cgit_blame_link("blame", NULL, "button", ctx.qry.head, | ||
254 | walk_tree_ctx->curr_rev, fullpath.buf); | ||
247 | html("</td></tr>\n"); | 255 | html("</td></tr>\n"); |
248 | free(name); | 256 | free(name); |
249 | strbuf_release(&fullpath); | 257 | strbuf_release(&fullpath); |