Documentation
¶
Overview ¶
Package git provides git operations helpers.
Index ¶
- func Checkout(repoPath, ref string) error
- func Clone(url, dest string) error
- func GetCurrentCommit(repoPath string) (string, error)
- func GetLatestTag(repoPath string) (string, error)
- func InstallSubdir(repoURL, branch, subDir, dest string) error
- func SparseClone(repoURL, branch, subDir, dest string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentCommit ¶ added in v0.2.0
GetCurrentCommit returns the current commit hash of the repository
func GetLatestTag ¶
GetLatestTag returns the latest tag for a repository in the given path
func InstallSubdir ¶
InstallSubdir installs a subdirectory from a repository Uses sparse checkout for efficiency, falls back to full clone if sparse fails
func SparseClone ¶ added in v0.2.0
SparseClone clones only a specific subdirectory using sparse checkout This is much faster than full clone for large repos when only a subdir is needed
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.