aboutsummaryrefslogtreecommitdiff
path: root/obj_commit.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2025-11-15 00:00:00 +0000
committerGravatar Runxi Yu2025-11-15 00:00:00 +0000
commitbd398609ce7f516bf6fae617656fff0509c5fc1c (patch)
treee40c636584d2193f7d0716564b5357c30577660c /obj_commit.go
parentREADME: Add example (diff)
signature
Include hashes in object structs
Diffstat (limited to 'obj_commit.go')
-rw-r--r--obj_commit.go4
1 files changed, 2 insertions, 2 deletions
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')