From bd398609ce7f516bf6fae617656fff0509c5fc1c Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 15 Nov 2025 00:00:00 +0000 Subject: Include hashes in object structs --- obj_commit.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'obj_commit.go') diff --git a/obj_commit.go b/obj_commit.go index 100c6b35..38f24ffc 100644 --- a/obj_commit.go +++ b/obj_commit.go @@ -8,7 +8,7 @@ import ( // Commit mirrors the structure of a Git commit object. type Commit struct { - objectBase + Hash Hash Tree Hash Parents []Hash @@ -25,7 +25,7 @@ func (*Commit) ObjType() ObjType { func parseCommit(id Hash, body []byte) (*Commit, error) { c := new(Commit) - c.objectBase = objectBase{Hash: id} + c.Hash = id i := 0 for i < len(body) { rel := bytes.IndexByte(body[i:], '\n') -- cgit v1.3.1-10-gc9f91