fix object type check in got_open_object_as_tree()
diff --git a/lib/object.c b/lib/object.c
index 559dc54..f5552d9 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -1135,7 +1135,7 @@ got_object_open_as_tree(struct got_tree_object **tree,
err = got_object_open(&obj, repo, id);
if (err)
return err;
- if (got_object_get_type(obj) != GOT_OBJ_TYPE_COMMIT) {
+ if (got_object_get_type(obj) != GOT_OBJ_TYPE_TREE) {
err = got_error(GOT_ERR_OBJ_TYPE);
goto done;
}