treewide: rename tree to maybe_tree
[gitweb.git] / sha1_name.c
index e7c18ffc26daf1962f90da9ff5c16cc608149d9d..6ca2a2de37e2ad75d6a7dd4d64cd967734bad157 100644 (file)
@@ -896,7 +896,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 = &(((struct commit *) o)->maybe_tree->object);
                else {
                        if (name)
                                error("%.*s: expected %s type, but the object "