object: convert parse_object* to take struct object_id
[gitweb.git] / builtin / diff-tree.c
index e85a449df1305a4c29b398e35b42cc7fd8367830..5ea1c143171af792773bed34994edaf82f122c3b 100644 (file)
@@ -44,7 +44,7 @@ static int stdin_diff_trees(struct tree *tree1, const char *p)
        struct tree *tree2;
        if (!isspace(*p++) || parse_oid_hex(p, &oid, &p) || *p)
                return error("Need exactly two trees, separated by a space");
-       tree2 = lookup_tree(oid.hash);
+       tree2 = lookup_tree(&oid);
        if (!tree2 || parse_tree(tree2))
                return -1;
        printf("%s %s\n", oid_to_hex(&tree1->object.oid),
@@ -67,7 +67,7 @@ static int diff_tree_stdin(char *line)
        line[len-1] = 0;
        if (parse_oid_hex(line, &oid, &p))
                return -1;
-       obj = parse_object(oid.hash);
+       obj = parse_object(&oid);
        if (!obj)
                return -1;
        if (obj->type == OBJ_COMMIT)