shithub: furgit

Download patch

ref: 83b49df1d765e77d024f706ce3f0a81dd0cb9045
parent: 0591334a91e75fb48a081f3130d9633ef0523c5c
author: Runxi Yu <me@runxiyu.org>
date: Fri Feb 20 21:28:12 EST 2026

refstore: Add documentation on declared Store methods

--- a/refstore/refstore.go
+++ b/refstore/refstore.go
@@ -12,8 +12,20 @@
 
 // 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
 }
--