{"modulePath":"github.com/devfile/devworkspace-operator","version":"v1.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package shell\n\n## Functions\n\n```go\nfunc GitCheckoutBranch(projectPath, branchName, remote string) error\n```\n\n```go\nfunc GitCheckoutBranchLocal(projectPath, branchName string) error\n```\n\n```go\nfunc GitCheckoutRef(projectPath, reference string) error\n```\n\n```go\nfunc GitCloneProject(repoUrl, defaultRemoteName, destPath string) error\n```\nGitCloneProject constructs a command-line string for cloning a git project, and delegates execution to the os/exec package.\n\n```go\nfunc GitFetchRemote(projectPath, remote string) error\n```\n\n```go\nfunc GitInitSubmodules(projectPath string) error\n```\n\n```go\nfunc GitSetTrackingRemoteBranch(projectPath, branchName, remote string) error\n```\n\n```go\nfunc GitSetupSparseCheckout(projectPath string, sparseCheckoutDir string) error\n```\n\n```go\nfunc GitSparseCloneProject(repoUrl, defaultRemoteName, destPath string) error\n```\n\n## Types\n\n```go\ntype GitRefType int64\n```\n\n```go\nconst (\n\tGitRefUnknown GitRefType = iota\n\tGitRefLocalBranch\n\tGitRefRemoteBranch\n\tGitRefTag\n\tGitRefHash\n)\n```\n\n```go\nfunc GitResolveReference(projectPath, remote, revision string) (GitRefType, error)\n```\nGitResolveReference determines if the provided revision is a (local) branch, tag, or hash for use when preparing a cloned repository. This is done by using \\`git show-ref\\` for branches/tags and \\`git rev-parse\\` for checking whether a commit hash exists. If the reference type cannot be determined, GitRefUnknown is returned.\n\n","path":"github.com/devfile/devworkspace-operator/project-clone/internal/shell","name":"shell","synopsis":"","isRedistributable":true}
