aboutsummaryrefslogtreecommitdiff
path: root/objectstore/loose/store.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-22 17:27:37 +0000
committerGravatar Runxi Yu2026-03-22 17:27:37 +0000
commit8f577284f47f699855dcb3ceda21aa9d8be77c2f (patch)
tree36f8d47a1584bd80e9e114d5c68ad5ec6c333b88 /objectstore/loose/store.go
parentinternal/testgit: why not make it more annoying to use ambient authority (diff)
signatureNo signature
objectstore{,/loose}: Document contracts more clearly
Diffstat (limited to 'objectstore/loose/store.go')
-rw-r--r--objectstore/loose/store.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/objectstore/loose/store.go b/objectstore/loose/store.go
index c3ae989c..11f17594 100644
--- a/objectstore/loose/store.go
+++ b/objectstore/loose/store.go
@@ -9,6 +9,10 @@ import (
// Store reads loose Git objects from an objects directory root.
//
+// Loose objects are zlib streams whose trailer uses Adler-32. Which reads
+// consume enough of the stream to reach and verify that trailer is documented
+// on the individual methods.
+//
// Store owns root and closes it in Close.
type Store struct {
// root is the objects directory capability used for all object file access.
@@ -32,6 +36,8 @@ func New(root *os.Root, algo objectid.Algorithm) (*Store, error) {
}
// Close releases resources associated with the backend.
+//
+// Repeated calls to Close are undefined behavior.
func (store *Store) Close() error {
return store.root.Close()
}