From 397eb22166afa8cd273dbd0decdcb2ac7f2d34df Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 29 Jan 2026 22:05:30 +0100 Subject: obj, loose: Add Object.Serialize() interface --- obj.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'obj.go') diff --git a/obj.go b/obj.go index 41400985..f3ed8bfa 100644 --- a/obj.go +++ b/obj.go @@ -40,6 +40,9 @@ const ( type Object interface { // ObjectType returns the object's type. ObjectType() ObjectType + // Serialize renders the object into its raw byte representation, + // including the header (i.e., "type size\0"). + Serialize() ([]byte, error) } // StoredObject describes a Git object with a known hash, such as -- cgit v1.3.1-10-gc9f91