X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/1a63cfcc3d83919e790e7e279eb35fc75adb0e3c..cd79c16844b4006d4fd6f4b82d2f6e7e19b20c8e:/ui-commit.c diff --git a/ui-commit.c b/ui-commit.c index 1d12bbb..8864fc6 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -153,8 +153,12 @@ void cgit_print_commit(const char *hex) unsigned char sha1[20]; char *query; char *filename; + 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; @@ -181,11 +185,11 @@ void cgit_print_commit(const char *hex) html("