MCPcopy
hub / github.com/git-lfs/git-lfs / formatRefName

Function formatRefName

commands/command_migrate.go:301–308  ·  view source on GitHub ↗

formatRefName returns the fully-qualified name for the given Git reference "ref".

(ref *git.Ref, remote string)

Source from the content-addressed store, hash-verified

299// formatRefName returns the fully-qualified name for the given Git reference
300// "ref".
301func 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

Callers 1

includeExcludeRefsFunction · 0.85

Calls 1

RefspecMethod · 0.80

Tested by

no test coverage detected