src/server/pkg/cmdutil/cobra.go
func ParseCommit(arg string) (*pfs.Commit, error) {
	parts := strings.SplitN(arg, "@", 2)
	if parts[0] == "" {
		return nil, fmt.Errorf("invalid format \"%s\": repo cannot be empty", arg)
	}
	commit := &pfs.Commit{
		Repo: &pfs.Repo{
			Name: parts[0],
		},
		ID: "",
	}
	if len(parts) == 2 {
		commit.ID = parts[1]
	}
	return commit, nil
}
func ParseCommit(arg string) (*pfs.Commit, error) {
	parts := strings.SplitN(arg, "@", 2)
	if parts[0] == "" {
		return nil, fmt.Errorf("invalid format \"%s\": repo cannot be empty", arg)
	}
	commit := &pfs.Commit{
		Repo: &pfs.Repo{
			Name: parts[0],
		},
		ID: "",
	}
	if len(parts) == 2 {
		commit.ID = parts[1]
	}
	return commit, nil
}
func ParseCommit ( arg string ) ( * pfs . Commit , error ) { parts := strings . SplitN ( arg , " " , 2 ) if parts [ 0 ] == " " { return nil , fmt . Errorf ( " \" \" " , arg ) } commit := & pfs . Commit { Repo : & pfs . Repo { Name : parts [ 0 ] , } , ID : " " , } if len ( parts ) == 2 { commit . ID = parts [ 1 ] } return commit , nil }
// ParseCommit takes an argument of the form "repo[@branch-or-commit]" and
// returns the corresponding *pfs.Commit.
ParseCommit takes an argument of the form repo [