git

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

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 = eris.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