refs/files-backend: convert many internals to struct object_id
[gitweb.git] / builtin / diff.c
index d184aafab9e353279125f9f7f07b63c3780bcba1..895f92897829f35cae26ab3e7eb7cfb9ac7884e6 100644 (file)
@@ -381,7 +381,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
                                add_head_to_pending(&rev);
                                if (!rev.pending.nr) {
                                        struct tree *tree;
-                                       tree = lookup_tree(EMPTY_TREE_SHA1_BIN);
+                                       tree = lookup_tree(&empty_tree_oid);
                                        add_pending_object(&rev, &tree->object, "HEAD");
                                }
                                break;
@@ -408,7 +408,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
                } else if (obj->type == OBJ_BLOB) {
                        if (2 <= blobs)
                                die(_("more than two blobs given: '%s'"), name);
-                       hashcpy(blob[blobs].oid.hash, obj->oid.hash);
+                       oidcpy(&blob[blobs].oid, &obj->oid);
                        blob[blobs].name = name;
                        blob[blobs].mode = entry->mode;
                        blobs++;