diff --git a/builtin-diff-tree.c b/builtin-diff-tree.c
index 1138c2da733bfe2730bbcb95d2a281de12595bde..8ecefd4f0f99117534deb9ca7d4446ade5c00223 100644 (file)
--- a/builtin-diff-tree.c
+++ b/builtin-diff-tree.c
line[len-1] = 0;
if (get_sha1_hex(line, sha1))
return -1;
- obj = lookup_object(sha1);
- obj = obj ? obj : parse_object(sha1);
+ obj = lookup_unknown_object(sha1);
+ if (!obj || !obj->parsed)
+ obj = parse_object(sha1);
if (!obj)
return -1;
if (obj->type == OBJ_COMMIT)