aboutsummaryrefslogtreecommitdiff
path: root/object/header/append.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-04-02 06:23:30 +0000
committerGravatar Runxi Yu2026-04-02 06:28:39 +0000
commita041d523de389b65b98a5373a8034041db2a8d83 (patch)
tree7b423dc735f463be616045f2c3c2095a7737aca7 /object/header/append.go
parentresearch: Add dynamic pack resources (diff)
signatureNo signature
*: Remove
Diffstat (limited to 'object/header/append.go')
-rw-r--r--object/header/append.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/object/header/append.go b/object/header/append.go
deleted file mode 100644
index 6d824740..00000000
--- a/object/header/append.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package objectheader
-
-import (
- "strconv"
-
- objecttype "codeberg.org/lindenii/furgit/object/type"
-)
-
-// Append appends a canonical loose-object header ("type size\\x00") to dst.
-func Append(dst []byte, ty objecttype.Type, size int64) ([]byte, bool) {
- if size < 0 {
- return nil, false
- }
-
- tyName, ok := ty.Name()
- if !ok {
- return nil, false
- }
-
- sizeStr := strconv.FormatInt(size, 10)
- out := make([]byte, 0, len(dst)+len(tyName)+len(sizeStr)+2)
- out = append(out, dst...)
- out = append(out, tyName...)
- out = append(out, ' ')
- out = append(out, sizeStr...)
- out = append(out, 0)
-
- return out, true
-}