-rw-r--r-- | ui-commit.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/ui-commit.c b/ui-commit.c index 41313b9..a11bc5f 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
@@ -14,3 +14,3 @@ | |||
14 | 14 | ||
15 | void cgit_print_commit(char *hex) | 15 | void cgit_print_commit(char *hex, const char *prefix) |
16 | { | 16 | { |
@@ -60,10 +60,10 @@ void cgit_print_commit(char *hex) | |||
60 | tmp = sha1_to_hex(commit->object.sha1); | 60 | tmp = sha1_to_hex(commit->object.sha1); |
61 | cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, 0); | 61 | cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix, 0); |
62 | html(" ("); | 62 | html(" ("); |
63 | cgit_patch_link("patch", NULL, NULL, NULL, tmp); | 63 | cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix); |
64 | html(") ("); | 64 | html(") ("); |
65 | if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff)) | 65 | if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff)) |
66 | cgit_commit_link("unidiff", NULL, NULL, ctx.qry.head, tmp, 1); | 66 | cgit_commit_link("unidiff", NULL, NULL, ctx.qry.head, tmp, prefix, 1); |
67 | else | 67 | else |
68 | cgit_commit_link("side-by-side diff", NULL, NULL, ctx.qry.head, tmp, 1); | 68 | cgit_commit_link("side-by-side diff", NULL, NULL, ctx.qry.head, tmp, prefix, 1); |
69 | html(")</td></tr>\n"); | 69 | html(")</td></tr>\n"); |
@@ -73,2 +73,6 @@ void cgit_print_commit(char *hex) | |||
73 | ctx.qry.head, tmp, NULL); | 73 | ctx.qry.head, tmp, NULL); |
74 | if (prefix) { | ||
75 | html(" /"); | ||
76 | cgit_tree_link(prefix, NULL, NULL, ctx.qry.head, tmp, prefix); | ||
77 | } | ||
74 | html("</td></tr>\n"); | 78 | html("</td></tr>\n"); |
@@ -89,6 +93,6 @@ void cgit_print_commit(char *hex) | |||
89 | } | 93 | } |
90 | cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, 0); | 94 | cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, prefix, 0); |
91 | html(" ("); | 95 | html(" ("); |
92 | cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex, | 96 | cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex, |
93 | sha1_to_hex(p->item->object.sha1), NULL, 0); | 97 | sha1_to_hex(p->item->object.sha1), prefix, 0); |
94 | html(")</td></tr>"); | 98 | html(")</td></tr>"); |
@@ -123,3 +127,3 @@ void cgit_print_commit(char *hex) | |||
123 | tmp = NULL; | 127 | tmp = NULL; |
124 | cgit_print_diff(ctx.qry.sha1, tmp, NULL); | 128 | cgit_print_diff(ctx.qry.sha1, tmp, prefix); |
125 | } | 129 | } |