diff options
| author | 2026-02-21 11:33:40 +0800 | |
|---|---|---|
| committer | 2026-02-21 11:33:40 +0800 | |
| commit | 6cdf75c5a9e1f660aa2a86938be680c5db07ffd2 (patch) | |
| tree | f16f22cc51930e97eaeb73e1e436d8a4c331fabf /refstore/refstore.go | |
| parent | refstore/loose: Add loose refs implementation (diff) | |
| signature | No signature | |
refstore: Add ref shortening
Diffstat (limited to 'refstore/refstore.go')
| -rw-r--r-- | refstore/refstore.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/refstore/refstore.go b/refstore/refstore.go index a3c9f201..5653d4ca 100644 --- a/refstore/refstore.go +++ b/refstore/refstore.go @@ -29,6 +29,12 @@ type Store interface { // // The exact pattern language is backend-defined. List(pattern string) ([]ref.Ref, error) + // Shorten returns the shortest unambiguous shorthand for a full + // reference name within this store's visible namespace. + // + // If name does not exist in this store, implementations should return + // ErrReferenceNotFound. + Shorten(name string) (string, error) // Close releases resources associated with the store. Close() error } |
