Commit d33fc9efbb7551f46b0bbeb8ab8503614c2f15e6

Stefan Sperling 2018-01-23T17:50:42

treat tag objects as a plain type in open_packed_object()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/lib/pack.c b/lib/pack.c
index dde87f7..09db6b0 100644
--- a/lib/pack.c
+++ b/lib/pack.c
@@ -747,6 +747,7 @@ open_packed_object(struct got_object **obj, struct got_repository *repo,
 	case GOT_OBJ_TYPE_COMMIT:
 	case GOT_OBJ_TYPE_TREE:
 	case GOT_OBJ_TYPE_BLOB:
+	case GOT_OBJ_TYPE_TAG:
 		err = open_plain_object(obj, path_packfile, id, type,
 		    offset + tslen, size);
 		break;
@@ -757,7 +758,6 @@ open_packed_object(struct got_object **obj, struct got_repository *repo,
 		    packfile, id, offset, tslen, type, size);
 		break;
 
-	case GOT_OBJ_TYPE_TAG:
 	default:
 		err = got_error(GOT_ERR_NOT_IMPL);
 		goto done;