aboutsummaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index e83056406..3f2235ecf 100644
--- a/commit.c
+++ b/commit.c
@@ -37,6 +37,8 @@ struct commit *lookup_commit(unsigned char *sha1)
ret->object.type = commit_type;
return ret;
}
+ if (!obj->type)
+ obj->type = commit_type;
return check_commit(obj, sha1);
}