// Split splits a remote into a parent and a leaf
//
// if it returns leaf as an empty string then remote is a directory
//
// if it returns parent as an empty string then that means the current directory
//
// The returned values have the property that parent + leaf == remote
// (except under Windows where \ will be translated into /)
Split splits a remote into a parent and a leaf

if it returns leaf as an empty string then remote is a directory

if it returns parent as an empty string then that means the current directory

The returned values have the property that parent + leaf == remote
(except under Windows where \ will be translated into /)
// Split splits a remote into a parent and a leaf // // if it returns leaf as an empty string then remote is a directory // // if it returns parent as an empty string then that means the current directory // // The returned values have the property that parent + leaf == remote // ( except under Windows where \ will be translated into / )
func Split(remote string) (parent string, leaf string) {
	remoteName, remotePath := Parse(remote)
	if remoteName != "" {
		remoteName += ":"
	}
	parent, leaf = path.Split(remotePath)
	return remoteName + parent, leaf
}
func Split ( remote string ) ( parent string , leaf string ) { remoteName , remotePath := Parse ( remote ) if remoteName != " " { remoteName += " " } parent , leaf = path . Split ( remotePath ) return remoteName + parent , leaf }
Split splits a remote into a parent and a leaf
Split splits a remote into a parent and a leaf
// Construct new remote name without last segment