diff-tree: don't print multiple headers for merges when silent.
[git.git] / commit.c
index e830564..3f2235e 100644 (file)
--- 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);
 }