aboutsummaryrefslogtreecommitdiff
path: root/object/parse.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-06-11 06:52:04 +0000
committerGravatar Runxi Yu2026-06-11 06:52:04 +0000
commit27a695d781c2981328c2b7524c0fe8ade206cfe7 (patch)
tree04ce3d59fff8e8854f233e70cd8d1eb331bceb19 /object/parse.go
parentinternal/format/packfile/delta: Parse ofs-delta backward distance (diff)
object/typ: Remove Type prefix from object/typ.Type literals
Diffstat (limited to 'object/parse.go')
-rw-r--r--object/parse.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/object/parse.go b/object/parse.go
index 81996206..afcdfe28 100644
--- a/object/parse.go
+++ b/object/parse.go
@@ -41,15 +41,15 @@ func ParseWithHeader(raw []byte, objectFormat id.ObjectFormat) (Object, error) {
//nolint:ireturn
func ParseWithoutHeader(ty typ.Type, body []byte, objectFormat id.ObjectFormat) (Object, error) {
switch ty {
- case typ.TypeBlob:
+ case typ.Blob:
return blob.Parse(body) //nolint:wrapcheck
- case typ.TypeTree:
+ case typ.Tree:
return tree.Parse(body, objectFormat) //nolint:wrapcheck
- case typ.TypeCommit:
+ case typ.Commit:
return commit.Parse(body, objectFormat) //nolint:wrapcheck
- case typ.TypeTag:
+ case typ.Tag:
return tag.Parse(body, objectFormat) //nolint:wrapcheck
- case typ.TypeUnknown:
+ case typ.Unknown:
return nil, typ.ErrInvalidType
default:
return nil, typ.ErrInvalidType