mingw: skip test in t1508 that fails due to path conversion
[gitweb.git] / builtin / merge-tree.c
index f9ab48597e58ed97fc208b58c17b8becb105e095..d4f0cbd45149eebe15f53ff8c34eefd9b3803d82 100644 (file)
@@ -60,7 +60,7 @@ static void *result(struct merge_list *entry, unsigned long *size)
        const char *path = entry->path;
 
        if (!entry->stage)
-               return read_sha1_file(entry->blob->object.sha1, &type, size);
+               return read_sha1_file(entry->blob->object.oid.hash, &type, size);
        base = NULL;
        if (entry->stage == 1) {
                base = entry->blob;
@@ -82,7 +82,7 @@ static void *origin(struct merge_list *entry, unsigned long *size)
        enum object_type type;
        while (entry) {
                if (entry->stage == 2)
-                       return read_sha1_file(entry->blob->object.sha1, &type, size);
+                       return read_sha1_file(entry->blob->object.oid.hash, &type, size);
                entry = entry->link;
        }
        return NULL;
@@ -118,7 +118,8 @@ static void show_diff(struct merge_list *entry)
        if (!dst.ptr)
                size = 0;
        dst.size = size;
-       xdi_diff(&src, &dst, &xpp, &xecfg, &ecb);
+       if (xdi_diff(&src, &dst, &xpp, &xecfg, &ecb))
+               die("unable to generate diff");
        free(src.ptr);
        free(dst.ptr);
 }
@@ -129,7 +130,7 @@ static void show_result_list(struct merge_list *entry)
        do {
                struct merge_list *link = entry->link;
                static const char *desc[4] = { "result", "base", "our", "their" };
-               printf("  %-6s %o %s %s\n", desc[entry->stage], entry->mode, sha1_to_hex(entry->blob->object.sha1), entry->path);
+               printf("  %-6s %o %s %s\n", desc[entry->stage], entry->mode, oid_to_hex(&entry->blob->object.oid), entry->path);
                entry = link;
        } while (entry);
 }