X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/44947bfcdc0d6e8c7d673bea0538cbf2a182f289..42a7eb9c73457319a3fd5441ff26046fc9b31dad:/ui-commit.c diff --git a/ui-commit.c b/ui-commit.c index 885f870..8864fc6 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -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;