[PATCH 4/5] ui-blame: add blame UI
John Keeping
john at keeping.me.uk
Sat Sep 30 14:07:48 CEST 2017
On Wed, Sep 27, 2017 at 05:43:30PM -0500, Jeff Smith wrote:
> Implement a page which provides the blame view of a specified file.
>
> This feature is controlled by a new config variable, "enable-blame",
> which is disabled by default.
>
> Signed-off-by: Jeff Smith <whydoubt at gmail.com>
Reviewed-by: John Keeping <john at keeping.me.uk>
Linux's checkpatch.pl has a few minor complaints if you're re-rolling,
but I don't think these need to block merging:
WARNING: line over 80 characters
#174: FILE: ui-blame.c:17:
+static char *emit_one_suspect_detail(struct blame_origin *suspect, const char *hex)
WARNING: line over 80 characters
#201: FILE: ui-blame.c:44:
+static void emit_blame_entry(struct blame_scoreboard *sb, struct blame_entry *ent)
WARNING: line over 80 characters
#213: FILE: ui-blame.c:56:
+ abbrev = find_unique_abbrev(suspect->commit->object.oid.hash, DEFAULT_ABBREV);
WARNING: line over 80 characters
#216: FILE: ui-blame.c:59:
+ cgit_commit_link(abbrev, detail, NULL, ctx.qry.head, hex, suspect->path);
WARNING: line over 80 characters
#243: FILE: ui-blame.c:86:
+static void print_object(const unsigned char *sha1, const char *path, const char *basename, const char *rev)
WARNING: line over 80 characters
#287: FILE: ui-blame.c:130:
+ htmlf("<div class='error'>blob size (%ldKB) exceeds display size limit (%dKB).</div>",
WARNING: void function return statements are not generally useful
#304: FILE: ui-blame.c:147:
+ return;
+}
WARNING: line over 80 characters
#307: FILE: ui-blame.c:150:
+ const char *pathname, unsigned mode, int stage, void *cbdata)
WARNING: line over 80 characters
#316: FILE: ui-blame.c:159:
+ print_object(sha1, buffer.buf, pathname, walk_tree_ctx->curr_rev);
WARNING: line over 80 characters
#322: FILE: ui-blame.c:165:
+ } else if (base->len < INT_MAX && (int)base->len > walk_tree_ctx->match_baselen) {
WARNING: line over 80 characters
#374: FILE: ui-blame.c:217:
+ read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
WARNING: line over 80 characters
#378: FILE: ui-blame.c:221:
+ cgit_print_error_page(404, "No blame for folders", "Blame is not available for folders.");
More information about the CGit
mailing list