aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commit.c2
-rw-r--r--tree.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index c0dd689ea..c6fdfd491 100644
--- a/commit.c
+++ b/commit.c
@@ -15,7 +15,7 @@ struct commit *lookup_commit(unsigned char *sha1)
ret->object.type = commit_type;
return ret;
}
- if (obj->parsed && obj->type != commit_type) {
+ if (obj->type != commit_type) {
error("Object %s is a %s, not a commit",
sha1_to_hex(sha1), obj->type);
return NULL;
diff --git a/tree.c b/tree.c
index 23476da7d..3537c1155 100644
--- a/tree.c
+++ b/tree.c
@@ -80,7 +80,7 @@ struct tree *lookup_tree(unsigned char *sha1)
ret->object.type = tree_type;
return ret;
}
- if (obj->parsed && obj->type != tree_type) {
+ if (obj->type != tree_type) {
error("Object %s is a %s, not a tree",
sha1_to_hex(sha1), obj->type);
return NULL;