summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Unidiff
Diffstat (limited to 'ui-shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index ece041c..60aa2e3 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -269,12 +269,18 @@ void cgit_diff_link(char *name, char *title, char *class, char *head,
269 } 269 }
270 html("'>"); 270 html("'>");
271 html_txt(name); 271 html_txt(name);
272 html("</a>"); 272 html("</a>");
273} 273}
274 274
275void cgit_patch_link(char *name, char *title, char *class, char *head,
276 char *rev)
277{
278 reporevlink("patch", name, title, class, head, rev, NULL);
279}
280
275void cgit_object_link(struct object *obj) 281void cgit_object_link(struct object *obj)
276{ 282{
277 char *page, *arg, *url; 283 char *page, *arg, *url;
278 284
279 if (obj->type == OBJ_COMMIT) { 285 if (obj->type == OBJ_COMMIT) {
280 cgit_commit_link(fmt("commit %s", sha1_to_hex(obj->sha1)), NULL, NULL, 286 cgit_commit_link(fmt("commit %s", sha1_to_hex(obj->sha1)), NULL, NULL,
@@ -487,12 +493,14 @@ void cgit_print_pageheader(char *title, int show_search)
487 cgit_tree_link("tree", NULL, "menu", cgit_query_head, 493 cgit_tree_link("tree", NULL, "menu", cgit_query_head,
488 cgit_query_sha1, NULL); 494 cgit_query_sha1, NULL);
489 cgit_commit_link("commit", NULL, "menu", cgit_query_head, 495 cgit_commit_link("commit", NULL, "menu", cgit_query_head,
490 cgit_query_sha1); 496 cgit_query_sha1);
491 cgit_diff_link("diff", NULL, "menu", cgit_query_head, 497 cgit_diff_link("diff", NULL, "menu", cgit_query_head,
492 cgit_query_sha1, cgit_query_sha2, NULL); 498 cgit_query_sha1, cgit_query_sha2, NULL);
499 cgit_patch_link("patch", NULL, "menu", cgit_query_head,
500 cgit_query_sha1);
493 501
494 for_each_ref(print_archive_ref, &header); 502 for_each_ref(print_archive_ref, &header);
495 503
496 if (cgit_repo->clone_url || cgit_clone_prefix) { 504 if (cgit_repo->clone_url || cgit_clone_prefix) {
497 html("<h1>clone</h1>\n"); 505 html("<h1>clone</h1>\n");
498 if (cgit_repo->clone_url) 506 if (cgit_repo->clone_url)