aboutsummaryrefslogtreecommitdiff
path: root/object/parse_with_header.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-29 10:55:24 +0000
committerGravatar Runxi Yu2026-03-29 10:55:24 +0000
commit9da262c92189e4007834bf2023f0c032f2a1a0d9 (patch)
tree47eeae7b32fa1d24ab6cfdf942352ef7f566afc5 /object/parse_with_header.go
parentobject/id: Nosec G505 for sha1 (diff)
signatureNo signature
object{,/type}: Fix up API shape v0.1.142
Diffstat (limited to 'object/parse_with_header.go')
-rw-r--r--object/parse_with_header.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/object/parse_with_header.go b/object/parse_with_header.go
index b2ddfff4..9bcf5a4c 100644
--- a/object/parse_with_header.go
+++ b/object/parse_with_header.go
@@ -7,10 +7,10 @@ import (
objectid "codeberg.org/lindenii/furgit/object/id"
)
-// ParseObjectWithHeader parses a loose object in "type size\x00body" format.
+// ParseWithHeader parses a loose object in "type size\x00body" format.
//
//nolint:ireturn
-func ParseObjectWithHeader(raw []byte, algo objectid.Algorithm) (Object, error) {
+func ParseWithHeader(raw []byte, algo objectid.Algorithm) (Object, error) {
ty, size, headerLen, ok := objectheader.Parse(raw)
if !ok {
return nil, fmt.Errorf("object: malformed object header")
@@ -21,5 +21,5 @@ func ParseObjectWithHeader(raw []byte, algo objectid.Algorithm) (Object, error)
return nil, fmt.Errorf("object: size mismatch: header says %d bytes, body has %d", size, len(body))
}
- return ParseObjectWithoutHeader(ty, body, algo)
+ return ParseWithoutHeader(ty, body, algo)
}