]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-patch.c
git: update to v2.46.0
[ps-cgit] / ui-patch.c
index 3819a8152ad2e7a4a7230683a08b80ba5f78d713..f9d2eebbda39a63e3d2b82bd2b6534e6d4403366 100644 (file)
@@ -6,6 +6,8 @@
  *   (see COPYING for full license text)
  */
 
  *   (see COPYING for full license text)
  */
 
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "cgit.h"
 #include "ui-patch.h"
 #include "html.h"
 #include "cgit.h"
 #include "ui-patch.h"
 #include "html.h"
@@ -57,7 +59,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev,
        } else if (commit->parents && commit->parents->item) {
                oidcpy(&old_rev_oid, &commit->parents->item->object.oid);
        } else {
        } else if (commit->parents && commit->parents->item) {
                oidcpy(&old_rev_oid, &commit->parents->item->object.oid);
        } else {
-               oidclr(&old_rev_oid);
+               oidclr(&old_rev_oid, the_repository->hash_algo);
        }
 
        if (is_null_oid(&old_rev_oid)) {
        }
 
        if (is_null_oid(&old_rev_oid)) {