]> gitweb.ps.run Git - ps-cgit/blobdiff - shared.c
Add cgit_diff_link()
[ps-cgit] / shared.c
index c7cd8a5487cb1c3ee9c9936efd551e071b587e47..f20fb5cc423f5ab184a730a2f5e2c1bb5b4b066a 100644 (file)
--- a/shared.c
+++ b/shared.c
@@ -360,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);