From 6cdf75c5a9e1f660aa2a86938be680c5db07ffd2 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 21 Feb 2026 11:33:40 +0800 Subject: refstore: Add ref shortening --- refstore/refstore.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'refstore/refstore.go') 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 } -- cgit v1.3.1-10-gc9f91