formatRefName returns the fully-qualified name for the given Git reference "ref".
(ref *git.Ref, remote string)
| 299 | // formatRefName returns the fully-qualified name for the given Git reference |
| 300 | // "ref". |
| 301 | func formatRefName(ref *git.Ref, remote string) string { |
| 302 | if ref.Type == git.RefTypeRemoteBranch { |
| 303 | return strings.Join([]string{ |
| 304 | "refs", "remotes", remote, ref.Name}, "/") |
| 305 | } |
| 306 | return ref.Refspec() |
| 307 | |
| 308 | } |
| 309 | |
| 310 | // currentRefToMigrate returns the fully-qualified name of the currently |
| 311 | // checked-out reference, or an error if the reference's type was not a local |
no test coverage detected