diff options
Diffstat (limited to 'builtin-diff-tree.c')
-rw-r--r-- | builtin-diff-tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-diff-tree.c b/builtin-diff-tree.c index 1138c2da73..8ecefd4f0f 100644 --- a/builtin-diff-tree.c +++ b/builtin-diff-tree.c @@ -71,8 +71,9 @@ static int diff_tree_stdin(char *line) 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) |