aboutsummaryrefslogtreecommitdiff
path: root/object/tag_parse.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-02-20 22:16:08 +0800
committerGravatar Runxi Yu2026-02-20 22:16:08 +0800
commit977114819521563458c40a8d1aa35c72b23d5395 (patch)
tree5803d68f23976a114c1e7f97d813268643c52bab /object/tag_parse.go
parentobjecttype: Factor out object types (diff)
signatureNo signature
object: Use objecttype instead of doing object types ourself
Diffstat (limited to 'object/tag_parse.go')
-rw-r--r--object/tag_parse.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/object/tag_parse.go b/object/tag_parse.go
index 565b9f89..b9b3cac8 100644
--- a/object/tag_parse.go
+++ b/object/tag_parse.go
@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
+ "codeberg.org/lindenii/furgit/objecttype"
"codeberg.org/lindenii/furgit/oid"
)
@@ -43,8 +44,8 @@ func ParseTag(body []byte, algo oid.Algorithm) (*Tag, error) {
t.Target = id
haveTarget = true
case "type":
- ty, err := ParseTypeName(string(value))
- if err != nil {
+ ty, ok := objecttype.ParseName(string(value))
+ if !ok {
return nil, errors.New("object: tag: unknown target type")
}
t.TargetType = ty