From: Lars Hjemli Date: Tue, 22 Jun 2010 14:15:48 +0000 (+0200) Subject: Merge branch 'jh/path-limit' X-Git-Tag: v0.9~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37a24e4e39737edaa5cdde501346a65eeb280e63;p=cgit Merge branch 'jh/path-limit' Conflicts: cgit.h ui-commit.c --- 37a24e4e39737edaa5cdde501346a65eeb280e63 diff --cc cgit.h index 8884f9e,f990b15..80c3902 --- a/cgit.h +++ b/cgit.h @@@ -146,7 -145,7 +146,8 @@@ struct cgit_query char *sort; int showmsg; int ssdiff; + int show_all; + char *vpath; }; struct cgit_config { diff --cc ui-commit.c index 41313b9,2d98ed9..a11bc5f --- a/ui-commit.c +++ b/ui-commit.c @@@ -12,13 -12,13 +12,13 @@@ #include "ui-diff.h" #include "ui-log.h" - void cgit_print_commit(char *hex) + void cgit_print_commit(char *hex, const char *prefix) { struct commit *commit, *parent; - struct commitinfo *info; + struct commitinfo *info, *parent_info; struct commit_list *p; unsigned char sha1[20]; - char *tmp; + char *tmp, *tmp2; int parents = 0; if (!hex) @@@ -82,15 -86,12 +86,15 @@@ } html("parent" ""); - cgit_commit_link(sha1_to_hex(p->item->object.sha1), NULL, NULL, - ctx.qry.head, - sha1_to_hex(p->item->object.sha1), prefix, 0); + tmp = tmp2 = sha1_to_hex(p->item->object.sha1); + if (ctx.repo->enable_subject_links) { + parent_info = cgit_parse_commit(parent); + tmp2 = parent_info->subject; + } - cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, 0); ++ cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, prefix, 0); html(" ("); cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex, - sha1_to_hex(p->item->object.sha1), NULL, 0); + sha1_to_hex(p->item->object.sha1), prefix, 0); html(")"); parents++; }