diff options
| author | 2026-03-28 16:53:46 +0000 | |
|---|---|---|
| committer | 2026-03-28 16:59:00 +0000 | |
| commit | 94a57d1621bec7a3e3e564cbef1d5d9b0cbc1441 (patch) | |
| tree | 81aa2e20fbd948fc1f873a86d15d5d2e7b04450e /ref/store/reading.go | |
| parent | ref: Consider casting to [Detached] or [Symbolic]. (diff) | |
| signature | No signature | |
ref/store: Clarify contract
Diffstat (limited to 'ref/store/reading.go')
| -rw-r--r-- | ref/store/reading.go | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ref/store/reading.go b/ref/store/reading.go index 3444f07f..ff8ac6f7 100644 --- a/ref/store/reading.go +++ b/ref/store/reading.go @@ -3,13 +3,16 @@ package refstore import "codeberg.org/lindenii/furgit/ref" // ReadingStore reads Git references. +// +// Labels: MT-Safe. type ReadingStore interface { // Resolve resolves a reference name to either a symbolic or detached ref. // - // Implementations should return value forms (ref.Detached or ref.Symbolic), - // not pointer forms. Returned refs do not borrow the store. - // If the reference does not exist, implementations should return - // ErrReferenceNotFound. + // Implementations should return value forms ([ref.Detached] or [ref.Symbolic]), + // not pointer forms. If the reference does not exist, implementations should + // return [ErrReferenceNotFound]. + // + // Labels: Life-Parent. Resolve(name string) (ref.Ref, error) // ResolveToDetached resolves a reference name to a detached object ID. // @@ -19,16 +22,19 @@ type ReadingStore interface { // // ResolveToDetached resolves symbolic references only. It does not imply peeling // annotated tag objects. + // + // Labels: Life-Parent. ResolveToDetached(name string) (ref.Detached, error) // List returns references matching pattern. // // The exact pattern language is backend-defined. + // + // Labels: Life-Parent. List(pattern string) ([]ref.Ref, error) // Close releases resources associated with the store. // // Transactions and batches borrowing the store are invalid after Close. // - // Repeated calls to Close are undefined behavior unless the implementation - // explicitly documents otherwise. + // Labels: Close-UB. Close() error } |
