From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Sat, 30 Sep 2017 13:07:48 +0100 Subject: [PATCH 4/5] ui-blame: add blame UI In-Reply-To: <20170927224331.26494-5-whydoubt@gmail.com> References: <20170923033848.5922-1-whydoubt@gmail.com> <20170927224331.26494-1-whydoubt@gmail.com> <20170927224331.26494-5-whydoubt@gmail.com> Message-ID: <20170930120748.GA25019@john.keeping.me.uk> 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 Reviewed-by: John Keeping 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("
blob size (%ldKB) exceeds display size limit (%dKB).
", 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.");