aboutsummaryrefslogtreecommitdiff
path: root/obj_blob.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_blob.go
parentREADME: Add example (diff)
signature
Include hashes in object structs
Diffstat (limited to 'obj_blob.go')
-rw-r--r--obj_blob.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/obj_blob.go b/obj_blob.go
index eda0ca5f..5ae0c40e 100644
--- a/obj_blob.go
+++ b/obj_blob.go
@@ -2,7 +2,7 @@ package furgit
// Blob represents the contents of a Git blob.
type Blob struct {
- objectBase
+ Hash Hash
Data []byte
}
@@ -15,8 +15,8 @@ func (*Blob) ObjType() ObjType {
func parseBlob(id Hash, body []byte) (*Blob, error) {
data := append([]byte(nil), body...)
return &Blob{
- objectBase: objectBase{Hash: id},
- Data: data,
+ Hash: id,
+ Data: data,
}, nil
}