]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-diff.c
Add standard interface for file diff functions
[ps-cgit] / ui-diff.c
index 0bd9ade7b5c2bef7383e713c00a0f73350ce141a..0ad9faf7f13e40049e7d690a31724ad1eb94f807 100644 (file)
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -7,7 +7,6 @@
  */
 
 #include "cgit.h"
-#include "xdiff.h"
 
 char *diff_buffer;
 int diff_buffer_size;
@@ -82,13 +81,13 @@ int diff_cb(void *priv_, mmbuffer_t *mb, int nbuf)
 
 static int load_mmfile(mmfile_t *file, const unsigned char *sha1)
 {
-       char type[20];
+       enum object_type type;
 
        if (is_null_sha1(sha1)) {
                file->ptr = (char *)"";
                file->size = 0;
        } else {
-               file->ptr = read_sha1_file(sha1, type, &file->size);
+               file->ptr = read_sha1_file(sha1, &type, &file->size);
        }
        return 1;
 }
@@ -124,7 +123,6 @@ void cgit_print_diff(const char *old_hex, const char *new_hex)
        get_sha1(old_hex, sha1);
        get_sha1(new_hex, sha2);
 
-       html("<h2>diff</h2>\n");
        html("<table class='diff'><tr><td>");
        run_diff(sha1, sha2);
        html("</td></tr></table>");