// FullRemoteName returns "{{.Remote}}/{{.RemoteBranchName}}".
963524
func (branch *GitBranch) FullRemoteBranchName() string {
	return fmt.Sprintf("%v/%v", branch.Remote, branch.RemoteBranchName)
}
15439
func (v *CmdTeamRename) helpRenameWrongLevel() (err error) {
	if v.PrevName.Depth() != v.NewName.Depth() {
		return nil
	}
	if v.PrevName.Depth() < 3 {
		return nil
	}
	// Scan the parts of both names looking for the first difference.
	// Skip the root and the end. Because the root is not this case,
	// and the end is not a problem.
	// If it is in the middle then tell the user what to do.
	for i := 1; i < len(v.PrevName.Parts)-1; i++ {
		prevPart := v.PrevName.Parts[i]
		newPart := v.NewName.Parts[i]
		if !prevPart.Eq(newPart) {
			a1 := keybase1.TeamName{Parts: v.PrevName.Parts[:i+1]}
			a2 := keybase1.TeamName{Parts: v.NewName.Parts[:i+1]}
			return fmt.Errorf("You must first rename `%v` to `%v`", a1, a2)
		}
	}
	return nil
}
967303
func (s *GetBranchInput) SetBranchName(v string) *GetBranchInput {
	s.BranchName = &v
	return s
}
1338384
func (g *Git) AddRemote(ctx context.Context, remote, url string) error {
	return g.Cmd(ctx, "gitAddRemote", "remote", "add", remote, url)
}
1085141
func (fs *Goofys) GetFullName(id fuseops.InodeID) *string {
	fs.mu.Lock()
	inode := fs.inodes[id]
	fs.mu.Unlock()
	if inode == nil {
		return nil
	}
	return inode.FullName()

}
1242407
func (d *driver) getFullName(name string) string {
	if d.tag() != "" {
		return d.tag() + azureud.TagDelimiter + name
	}
	return name
}
444379
func (s *PutFileInput) SetBranchName(v string) *PutFileInput {
	s.BranchName = &v
	return s
}
429399
func (r *Repository) Remote(name string) (*Remote, error) {
	cfg, err := r.Storer.Config()
	if err != nil {
		return nil, err
	}

	c, ok := cfg.Remotes[name]
	if !ok {
		return nil, ErrRemoteNotFound
	}

	return newRemote(r.Storer, c), nil
}
1348635
func (c *Configuration) Remote() string {
	ref := c.CurrentRef()

	c.loading.Lock()
	defer c.loading.Unlock()

	if c.currentRemote == nil {
		if len(ref.Name) == 0 {
			c.currentRemote = &defaultRemote
			return defaultRemote
		}

		if remote, ok := c.Git.Get(fmt.Sprintf("branch.%s.remote", ref.Name)); ok {
			// try tracking remote
			c.currentRemote = &remote
		} else if remotes := c.Remotes(); len(remotes) == 1 {
			// use only remote if there is only 1
			c.currentRemote = &remotes[0]
		} else {
			// fall back to default :(
			c.currentRemote = &defaultRemote
		}
	}
	return *c.currentRemote
}
287346
func (r *Relation) AllRemoteUnits(appName string) ([]*RelationUnit, error) {
	// Verify that the unit belongs to a remote application.
	if _, err := r.st.RemoteApplication(appName); err != nil {
		return nil, errors.Trace(err)
	}

	relationScopes, closer := r.st.db().GetCollection(relationScopesC)
	defer closer()

	ep, err := r.Endpoint(appName)
	if err != nil {
		return nil, err
	}
	scope := r.globalScope()
	parts := []string{"^" + scope, string(ep.Role), appName + "/"}
	ruRegex := strings.Join(parts, "#")

	var docs []relationScopeDoc
	if err := relationScopes.Find(bson.D{{"key", bson.D{{"$regex", ruRegex}}}}).All(&docs); err != nil {
		return nil, errors.Trace(err)
	}
	result := make([]*RelationUnit, len(docs))
	for i, doc := range docs {
		result[i] = &RelationUnit{
			st:          r.st,
			relation:    r,
			unitName:    doc.unitName(),
			isPrincipal: true,
			isLocalUnit: false,
			endpoint:    ep,
			scope:       scope,
		}
	}
	return result, nil
}
948591
func (s *Branch) SetBranchName(v string) *Branch {
	s.BranchName = &v
	return s
}
438814
func (c Command) FullName() string {
	if c.commandNamePath == nil {
		return c.Name
	}
	return strings.Join(c.commandNamePath, " ")
}
347736
func (s *CreateTrustInput) SetRemoteDomainName(v string) *CreateTrustInput {
	s.RemoteDomainName = &v
	return s
}
1197163
func IsValidRemote(remote string) bool {
	return urlutil.IsGitURL(remote) || urlutil.IsURL(remote)
}
501136
func (c *Client) GetRemoteCluster(clusterName string) (services.RemoteCluster, error) {
	if clusterName == "" {
		return nil, trace.BadParameter("missing cluster name")
	}
	out, err := c.Get(c.Endpoint("remoteclusters", clusterName), url.Values{})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return services.UnmarshalRemoteCluster(out.Bytes(), services.SkipValidation())
}
480078
func (repo *Repository) GetRemoteBranchCommitID(name string) (string, error) {
	return repo.getRefCommitID(REMOTE_PREFIX + name)
}
457
func SplitFullName(fullName string) (string, string) {
	nameComponents := strings.Split(fullName, " ")
	firstName := nameComponents[0]
	lastName := ""
	if len(nameComponents) > 1 {
		lastName = strings.Join(nameComponents[1:], " ")
	}
	return firstName, lastName
}