aboutsummaryrefslogtreecommitdiff
path: root/object/tree/serialize.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-05-17 14:45:40 +0000
committerGravatar Runxi Yu2026-05-17 14:45:40 +0000
commit676d0e6766e9af0574485dfac9a5d8ddf933ab03 (patch)
treef1e03fa276bee2cb13108cdfc010ebffd4f565e0 /object/tree/serialize.go
parentresearch: dynamic packfiles do not need abbreviated hashes (diff)
signatureNo signature
object: Serialize -> Bytes
Diffstat (limited to 'object/tree/serialize.go')
-rw-r--r--object/tree/serialize.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/object/tree/serialize.go b/object/tree/serialize.go
index 69deacda..922cd145 100644
--- a/object/tree/serialize.go
+++ b/object/tree/serialize.go
@@ -8,8 +8,8 @@ import (
objecttype "codeberg.org/lindenii/furgit/object/type"
)
-// SerializeWithoutHeader renders the raw tree body bytes.
-func (tree *Tree) SerializeWithoutHeader() ([]byte, error) {
+// BytesWithoutHeader renders the raw tree body bytes.
+func (tree *Tree) BytesWithoutHeader() ([]byte, error) {
var bodyLen int
for _, entry := range tree.Entries {
@@ -35,9 +35,9 @@ func (tree *Tree) SerializeWithoutHeader() ([]byte, error) {
return body, nil
}
-// SerializeWithHeader renders the raw object (header + body).
-func (tree *Tree) SerializeWithHeader() ([]byte, error) {
- body, err := tree.SerializeWithoutHeader()
+// BytesWithHeader renders the raw object (header + body).
+func (tree *Tree) BytesWithHeader() ([]byte, error) {
+ body, err := tree.BytesWithoutHeader()
if err != nil {
return nil, err
}