diff options
Diffstat (limited to 'plumbing/reference.go')
-rw-r--r-- | plumbing/reference.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plumbing/reference.go b/plumbing/reference.go index 2c30fe0..2f53d4e 100644 --- a/plumbing/reference.go +++ b/plumbing/reference.go @@ -15,10 +15,10 @@ const ( symrefPrefix = "ref: " ) -// refRevParseRules are a set of rules to parse references into short names. +// RefRevParseRules are a set of rules to parse references into short names. // These are the same rules as used by git in shorten_unambiguous_ref. // See: https://github.com/git/git/blob/e0aaa1b6532cfce93d87af9bc813fb2e7a7ce9d7/refs.c#L417 -var refRevParseRules = []string{ +var RefRevParseRules = []string{ "refs/%s", "refs/tags/%s", "refs/heads/%s", @@ -83,7 +83,7 @@ func (r ReferenceName) String() string { func (r ReferenceName) Short() string { s := string(r) res := s - for _, format := range refRevParseRules { + for _, format := range RefRevParseRules { _, err := fmt.Sscanf(s, format, &res) if err == nil { continue |