Documentation ¶
Index ¶
- func GetGitReferenceNameOrHashAndSubDirectory(url string, urlPath string) (plumbing.ReferenceName, plumbing.Hash, string, error)
- func GitCloneAndCheckoutCommit(url string, commit plumbing.Hash, path string) error
- func GitCloneOrPull(url string, referenceName plumbing.ReferenceName, path string, shallow bool) error
- func GitListBranchesAndTags(url string) ([]plumbing.ReferenceName, error)
- func ParseGitRepoURL(rawurl string) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGitReferenceNameOrHashAndSubDirectory ¶
func GetGitReferenceNameOrHashAndSubDirectory(url string, urlPath string) ( plumbing.ReferenceName, plumbing.Hash, string, error)
GetGitReferenceNameOrHashAndSubDirectory returns the reference name or hash, and sub directory path. The sub directory path always uses "/" as the separator.
func GitCloneAndCheckoutCommit ¶
GitCloneAndCheckoutCommit clones the Git repository and checkouts the specified commit.
func GitCloneOrPull ¶
func GitCloneOrPull(url string, referenceName plumbing.ReferenceName, path string, shallow bool) error
GitCloneOrPull clones or updates the specified referenceName (branch or tag) of a Git repository.
func GitListBranchesAndTags ¶
func GitListBranchesAndTags(url string) ([]plumbing.ReferenceName, error)
GitListBranchesAndTags fetches a remote Git repository's branch and tag references (including HEAD), sorted by the length of the short name descending.
func ParseGitRepoURL ¶
ParseGitRepoURL returns the URL to the Git repository and path from a raw URL. For example, an input of "https://github.com/pulumi/templates/templates/javascript" returns "https://github.com/pulumi/templates.git" and "templates/javascript".
Types ¶
This section is empty.