Diffstat (limited to 'ui-summary.c')
| -rw-r--r-- | ui-summary.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/ui-summary.c b/ui-summary.c index e7158cc..b99ea98 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -33,7 +33,7 @@ static int cgit_print_branch_cb(const char *refname, const unsigned char *sha1, html_txt(info->author); html("</td><td>"); url = cgit_pageurl(cgit_query_repo, "commit", - fmt("h=%s", sha1_to_hex(sha1))); + fmt("id=%s", sha1_to_hex(sha1))); html_link_open(url, NULL, NULL); html_ntxt(cgit_max_msg_len, info->subject); html_link_close(); @@ -52,21 +52,17 @@ static int cgit_print_branch_cb(const char *refname, const unsigned char *sha1, static void cgit_print_object_ref(struct object *obj) { - char *page, *arg, *url; + char *page, *url; - if (obj->type == OBJ_COMMIT) { + if (obj->type == OBJ_COMMIT) page = "commit"; - arg = "h"; - } else if (obj->type == OBJ_TREE) { + else if (obj->type == OBJ_TREE) page = "tree"; - arg = "id"; - } else { + else page = "view"; - arg = "id"; - } url = cgit_pageurl(cgit_query_repo, page, - fmt("%s=%s", arg, sha1_to_hex(obj->sha1))); + fmt("id=%s", sha1_to_hex(obj->sha1))); html_link_open(url, NULL, NULL); htmlf("%s %s", typename(obj->type), sha1_to_hex(obj->sha1)); |