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

git

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(logger *zap.SugaredLogger, spec FetchSpec) error

Fetch fetches the specified git repository at the revision into path, using the refspec to fetch if provided.

func ShowCommit added in v0.12.0

func ShowCommit(logger *zap.SugaredLogger, revision, path string) (string, error)

ShowCommit calls "git show ..." to get the commit SHA for the given revision

Types

type FetchSpec added in v0.10.0

type FetchSpec struct {
	URL                       string
	Revision                  string
	Refspec                   string
	Path                      string
	Depth                     uint
	Submodules                bool
	SSLVerify                 bool
	HTTPProxy                 string
	HTTPSProxy                string
	NOProxy                   string
	SparseCheckoutDirectories string
}

FetchSpec describes how to initialize and fetch from a Git repository.

Jump to

Keyboard shortcuts

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