diff options
| author | 2026-03-22 17:33:27 +0000 | |
|---|---|---|
| committer | 2026-03-22 17:33:27 +0000 | |
| commit | d314d1f7e933ca83081eec289aa0cb6e75a7eeac (patch) | |
| tree | acd567019d1253d23bcebf6fe8ab9df54d24d3d0 /objectstore/objectstore.go | |
| parent | objectstore{,/loose}: Document contracts more clearly (diff) | |
| signature | No signature | |
objectstore{,/packed}: Document lifetime and integrity behavior
Diffstat (limited to 'objectstore/objectstore.go')
| -rw-r--r-- | objectstore/objectstore.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/objectstore/objectstore.go b/objectstore/objectstore.go index f152a7f0..c3de12a5 100644 --- a/objectstore/objectstore.go +++ b/objectstore/objectstore.go @@ -19,6 +19,9 @@ import ( var ErrObjectNotFound = errors.New("objectstore: object not found") // Store reads Git objects by object ID. +// +// Unless an implementation explicitly documents otherwise, values returned by +// Store methods are only valid until the store is closed. type Store interface { // ReadBytesFull reads a full serialized object as "type size\0content". // @@ -39,6 +42,7 @@ type Store interface { // ReadReaderFull reads a full serialized object stream as "type size\0content". // // Caller must close the returned reader. + // The returned reader is only valid until the store is closed. // // Any read-time integrity verification performed while producing the stream // is implementation-defined. @@ -48,6 +52,7 @@ type Store interface { // and content stream. // // Caller must close the returned reader. + // The returned reader is only valid until the store is closed. // // Any read-time integrity verification performed while producing the stream // is implementation-defined. |
