aboutsummaryrefslogtreecommitdiff
path: root/objectheader/encode.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-10 14:20:30 +0800
committerGravatar Runxi Yu2026-03-10 14:20:30 +0800
commit8630ab3a2fb3e6a5518156bc43bd4f6a81f21198 (patch)
tree66120ed3c90bc01fba404824ddf0095c945aa2c8 /objectheader/encode.go
parentobject/header: Rename from objectheader (diff)
signatureNo signature
Revert "object/header: Rename from objectheader"
This reverts commit 85f1212724e037e6934203f04a3f6231ac609503.
Diffstat (limited to 'objectheader/encode.go')
-rw-r--r--objectheader/encode.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/objectheader/encode.go b/objectheader/encode.go
new file mode 100644
index 00000000..1cca968b
--- /dev/null
+++ b/objectheader/encode.go
@@ -0,0 +1,8 @@
+package objectheader
+
+import "codeberg.org/lindenii/furgit/objecttype"
+
+// Encode returns a canonical loose-object header ("type size\\x00").
+func Encode(ty objecttype.Type, size int64) ([]byte, bool) {
+ return Append(nil, ty, size)
+}