Merge branch 'bw/server-options'
[gitweb.git] / sha1-name.c
index 5b93bf8da36939376b506f96624f568875397969..bd99fd822bd4c6948eb401ae305192bdaa8ce36e 100644 (file)
@@ -864,7 +864,7 @@ struct object *peel_to_type(const char *name, int namelen,
                if (o->type == OBJ_TAG)
                        o = ((struct tag*) o)->tagged;
                else if (o->type == OBJ_COMMIT)
-                       o = &(((struct commit *) o)->tree->object);
+                       o = &(get_commit_tree(((struct commit *)o))->object);
                else {
                        if (name)
                                error("%.*s: expected %s type, but the object "