Documentation ¶
Overview ¶
Package gitutil implements an easy way to update a git repository to a local temporary directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFailedClone = errors.New("failed to clone git repository")
ErrFailedClone is returned when a git clone is unsuccessful.
View Source
var ErrFailedPull = errors.New("failed to pull git repository")
ErrFailedPull is returned when a git pull is unsuccessful.
View Source
var ErrFailedRevParse = errors.New("failed to rev-parse git repository")
ErrFailedRevParse is returned when a git rev-parse is unsuccessful.
Functions ¶
func CloneOrPull ¶
CloneOrPull performs a git pull if there is a git repository located at repoPath. Otherwise, it performs a git clone to that path.
If repoPath is left empty, a temporary directory is generated with the provided prefix and returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.