mirror of
https://git.zx2c4.com/cgit
synced 2025-08-31 06:15:08 +00:00
Add cgit_commit_link() + support for id=sha1 to commit view
This adds a function to generate links to the commit page and extends said page to use id from querystring as primary revision specified (fallback to h). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
2
cgit.c
2
cgit.c
@@ -100,7 +100,7 @@ static void cgit_print_repo_page(struct cacheitem *item)
|
||||
cgit_print_tree(cgit_query_sha1, cgit_query_path);
|
||||
break;
|
||||
case CMD_COMMIT:
|
||||
cgit_print_commit(cgit_query_head);
|
||||
cgit_print_commit(cgit_query_sha1);
|
||||
break;
|
||||
case CMD_DIFF:
|
||||
cgit_print_diff(cgit_query_head, cgit_query_sha1, cgit_query_sha2,
|
||||
|
Reference in New Issue
Block a user