aboutsummaryrefslogtreecommitdiff
path: root/object/header/encode.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-04-02 08:54:27 +0000
committerGravatar Runxi Yu2026-04-02 08:54:27 +0000
commit6d799b169180a1de8b78875e0288776a6ad0d4e2 (patch)
treebce84e2f6cf9e09ce184a16a0690f89ae9da1d2f /object/header/encode.go
parentinternal/intconv: Actually it's fine for these to be in one file probably (diff)
signatureNo signature
object/header: Add
Diffstat (limited to 'object/header/encode.go')
-rw-r--r--object/header/encode.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/object/header/encode.go b/object/header/encode.go
new file mode 100644
index 00000000..4cd8599c
--- /dev/null
+++ b/object/header/encode.go
@@ -0,0 +1,8 @@
+package header
+
+import "codeberg.org/lindenii/furgit/object/typ"
+
+// Encode returns a canonical loose-object header ("type size\x00").
+func Encode(ty typ.Type, size int64) ([]byte, bool) {
+ return Append(nil, ty, size)
+}