shell

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitCheckoutBranch added in v0.12.0

func GitCheckoutBranch(projectPath, branchName, remote string) error

func GitCheckoutBranchLocal added in v0.14.0

func GitCheckoutBranchLocal(projectPath, branchName string) error

func GitCheckoutRef added in v0.12.0

func GitCheckoutRef(projectPath, reference string) error

func GitCloneProject

func GitCloneProject(repoUrl, defaultRemoteName, destPath string) error

GitCloneProject constructs a command-line string for cloning a git project, and delegates execution to the os/exec package.

func GitFetchRemote added in v0.8.0

func GitFetchRemote(projectPath, remote string) error

func GitInitSubmodules added in v0.23.0

func GitInitSubmodules(projectPath string) error

func GitSetTrackingRemoteBranch added in v0.14.0

func GitSetTrackingRemoteBranch(projectPath, branchName, remote string) error

func GitSetupSparseCheckout added in v0.22.0

func GitSetupSparseCheckout(projectPath string, sparseCheckoutDir string) error

func GitSparseCloneProject added in v0.22.0

func GitSparseCloneProject(repoUrl, defaultRemoteName, destPath string) error

Types

type GitRefType added in v0.21.1

type GitRefType int64
const (
	GitRefUnknown GitRefType = iota
	GitRefLocalBranch
	GitRefRemoteBranch
	GitRefTag
	GitRefHash
)

func GitResolveReference added in v0.21.1

func GitResolveReference(projectPath, remote, revision string) (GitRefType, error)

GitResolveReference 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL