Help us shape the future of Go! Take the 2026 Go Developer Survey

git

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FailedCommandError = func(err error, args []string, output string) error {
		return errors.Wrapf(err, "%v failed: %s", args, output)
	}
	UnexpectedGitBranchOutputError = errors.New("unexpected 'git branch' output. " +
		"Current branch line should consist of 2 or more space-separated tokens")
)

Functions

func AppendTagPrefix

func AppendTagPrefix(version string) string

func PinDependencyVersion

func PinDependencyVersion(relativeRepoDir string, refName string) error

Types

type RefInfo

type RefInfo struct {
	Branch string
	Hash   string
	Tag    string
}

Contains different representations of a git ref. Hash and tag are always set, branch might be empty if the repo is in detached HEAD state.

func GetGitRefInfo

func GetGitRefInfo(relativeRepoDir string) (*RefInfo, error)

Jump to

Keyboard shortcuts

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