aboutsummaryrefslogtreecommitdiff
path: root/objectstore
diff options
context:
space:
mode:
Diffstat (limited to 'objectstore')
-rw-r--r--objectstore/objectstore.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/objectstore/objectstore.go b/objectstore/objectstore.go
index 22ddffab..54760709 100644
--- a/objectstore/objectstore.go
+++ b/objectstore/objectstore.go
@@ -16,7 +16,10 @@ var ErrObjectNotFound = errors.New("objectstore: object not found")
// Store reads Git objects by object ID.
type Store interface {
// ReadBytesFull reads a full serialized object as "type size\\x00content".
- // If hashed with the same algorithm it MUST match the object ID.
+ //
+ // In a valid repository, hashing this payload with the same algorithm yields
+ // the requested object ID. Readers should treat this as a repository
+ // invariant and should not re-verify it on every read.
ReadBytesFull(id objectid.ObjectID) ([]byte, error)
// ReadBytesContent reads an object's type and content bytes.
ReadBytesContent(id objectid.ObjectID) (objecttype.Type, []byte, error)