diff options
| author | 2026-02-21 00:42:00 +0800 | |
|---|---|---|
| committer | 2026-02-21 00:42:00 +0800 | |
| commit | a03e6e14a1e807136b05f28072f37dcf8c030f6b (patch) | |
| tree | c9e4069fbd959d05f684895a8bbd0ccbc311ea77 /objectheader/encode.go | |
| parent | testgit: Use objectid's SupportedAlgorithms (diff) | |
| signature | No signature | |
objectheader: Move out of internal
Diffstat (limited to 'objectheader/encode.go')
| -rw-r--r-- | objectheader/encode.go | 8 |
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) +} |
