summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Unidiff
Diffstat (limited to 'ui-shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ui-shared.c b/ui-shared.c
index d5c4c10..372b9e7 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -319,7 +319,8 @@ void cgit_log_link(const char *name, const char *title, const char *class,
319} 319}
320 320
321void cgit_commit_link(char *name, const char *title, const char *class, 321void cgit_commit_link(char *name, const char *title, const char *class,
322 const char *head, const char *rev, int toggle_ssdiff) 322 const char *head, const char *rev, const char *path,
323 int toggle_ssdiff)
323{ 324{
324 if (strlen(name) > ctx.cfg.max_msg_len && ctx.cfg.max_msg_len >= 15) { 325 if (strlen(name) > ctx.cfg.max_msg_len && ctx.cfg.max_msg_len >= 15) {
325 name[ctx.cfg.max_msg_len] = '\0'; 326 name[ctx.cfg.max_msg_len] = '\0';
@@ -330,7 +331,7 @@ void cgit_commit_link(char *name, const char *title, const char *class,
330 331
331 char *delim; 332 char *delim;
332 333
333 delim = repolink(title, class, "commit", head, NULL); 334 delim = repolink(title, class, "commit", head, path);
334 if (rev && strcmp(rev, ctx.qry.head)) { 335 if (rev && strcmp(rev, ctx.qry.head)) {
335 html(delim); 336 html(delim);
336 html("id="); 337 html("id=");
@@ -466,7 +467,7 @@ void cgit_object_link(struct object *obj)
466 shortrev[10] = '\0'; 467 shortrev[10] = '\0';
467 if (obj->type == OBJ_COMMIT) { 468 if (obj->type == OBJ_COMMIT) {
468 cgit_commit_link(fmt("commit %s...", shortrev), NULL, NULL, 469 cgit_commit_link(fmt("commit %s...", shortrev), NULL, NULL,
469 ctx.qry.head, fullrev, 0); 470 ctx.qry.head, fullrev, NULL, 0);
470 return; 471 return;
471 } else if (obj->type == OBJ_TREE) 472 } else if (obj->type == OBJ_TREE)
472 page = "tree"; 473 page = "tree";
@@ -793,7 +794,7 @@ void cgit_print_pageheader(struct cgit_context *ctx)
793 cgit_tree_link("tree", NULL, hc(ctx, "tree"), ctx->qry.head, 794 cgit_tree_link("tree", NULL, hc(ctx, "tree"), ctx->qry.head,
794 ctx->qry.sha1, NULL); 795 ctx->qry.sha1, NULL);
795 cgit_commit_link("commit", NULL, hc(ctx, "commit"), 796 cgit_commit_link("commit", NULL, hc(ctx, "commit"),
796 ctx->qry.head, ctx->qry.sha1, 0); 797 ctx->qry.head, ctx->qry.sha1, NULL, 0);
797 cgit_diff_link("diff", NULL, hc(ctx, "diff"), ctx->qry.head, 798 cgit_diff_link("diff", NULL, hc(ctx, "diff"), ctx->qry.head,
798 ctx->qry.sha1, ctx->qry.sha2, NULL, 0); 799 ctx->qry.sha1, ctx->qry.sha2, NULL, 0);
799 if (ctx->repo->max_stats) 800 if (ctx->repo->max_stats)