Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Apps will gradually migrate to using MainBranch instead of // MasterBranch as more repositories use MainBranch (skbug.com/11842). MasterBranch = "master" MainBranch = "main" // DefaultRef is the fully-qualified ref name of the default branch for most // repositories. DefaultRef = RefsHeadsPrefix + MasterBranch // DefaultRemote is the name of the default remote repository. DefaultRemote = "origin" // DefaultRemoteBranch is the name of the default branch in the default // remote repository, for most repos. DefaultRemoteBranch = DefaultRemote + "/" + MasterBranch // RefsHeadsPrefix is the "refs/heads/" prefix used for branches. RefsHeadsPrefix = "refs/heads/" )
Variables ¶
This section is empty.
Functions ¶
func EnsureGitIsFromCIPD ¶
EnsureGitIsFromCIPD returns an error if the version of Git in PATH does not appear to be obtained via CIPD.
func FindGit ¶
FindGit returns the path to the Git executable and the major and minor version numbers, or any error which occurred.
func IsFromCIPD ¶
IsFromCIPD returns a bool indicating whether or not the given version of Git appears to be obtained via CIPD.
func MocksForFindGit ¶
MocksForFindGit returns a DelegateRun func which can be passed to exec.CommandCollector.SetDelegateRun so that FindGit will succeed when calls to exec are fully mocked out.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.