]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-commit.c
Add cgit_commit_link() + support for id=sha1 to commit view
[cgit.git] / ui-commit.c
index 885f8707cee24b9c2a0c4e2e5f04dfa10e63f3d5..8864fc65a0d62281cfd2839d3b5bc672fe6ee9d4 100644 (file)
@@ -156,6 +156,9 @@ void cgit_print_commit(const char *hex)
        char *tmp;
        int i;
 
+       if (!hex)
+               hex = cgit_query_head;
+
        if (get_sha1(hex, sha1)) {
                cgit_print_error(fmt("Bad object id: %s", hex));
                return;