diff --git a/pkg/blob/ref.go b/pkg/blob/ref.go index d0b488c26..55ba4f2c3 100644 --- a/pkg/blob/ref.go +++ b/pkg/blob/ref.go @@ -298,6 +298,12 @@ func RefFromHash(h hash.Hash) Ref { return Ref{meta.ctor(h.Sum(nil))} } +// RefFromString returns a blobref from the given string, for the currently +// recommended hash function +func RefFromString(s string) Ref { + return SHA1FromString(s) +} + // SHA1FromString returns a SHA-1 blobref of the provided string. func SHA1FromString(s string) Ref { s1 := sha1.New()