aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--refstore/refstore.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/refstore/refstore.go b/refstore/refstore.go
index 08f00f17..24e75115 100644
--- a/refstore/refstore.go
+++ b/refstore/refstore.go
@@ -12,8 +12,20 @@ var ErrReferenceNotFound = errors.New("refstore: reference not found")
// Store reads Git references.
type Store interface {
+ // Resolve resolves a reference name to either a symbolic or detached ref.
+ // If the reference does not exist, implementations should return
+ // ErrReferenceNotFound.
Resolve(name string) (ref.Ref, error)
+ // ResolveFully resolves a reference name to a detached object ID.
+ //
+ // Implementations may use backend-local lookup semantics for symbolic hops.
+ // Callers that need cross-backend symbolic resolution (for example in a
+ // chain of stores) should prefer repeatedly calling Resolve.
ResolveFully(name string) (ref.Detached, error)
+ // List returns references matching pattern.
+ //
+ // The exact pattern language is backend-defined.
List(pattern string) ([]ref.Ref, error)
+ // Close releases resources associated with the store.
Close() error
}