X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/51a960a3ca6b0cade97db287a342996c3e1de48d..a215bf4620113fcefb8dd3442bf3501bd648c463:/shared.c diff --git a/shared.c b/shared.c index b6d2fa1..f20fb5c 100644 --- a/shared.c +++ b/shared.c @@ -59,7 +59,8 @@ int htmlfd = 0; int cgit_get_cmd_index(const char *cmd) { - static char *cmds[] = {"log", "commit", "diff", "tree", "view", "blob", "snapshot", NULL}; + static char *cmds[] = {"log", "commit", "diff", "tree", "blob", + "snapshot", NULL}; int i; for(i = 0; cmds[i]; i++) @@ -359,7 +360,7 @@ void cgit_diff_tree(const unsigned char *old_sha1, opt.format_callback_data = fn; diff_setup_done(&opt); - if (old_sha1) + if (old_sha1 && !is_null_sha1(old_sha1)) ret = diff_tree_sha1(old_sha1, new_sha1, "", &opt); else ret = diff_root_tree_sha1(new_sha1, "", &opt);