Documentation
¶
Index ¶
- func CheckoutFetchHead(repoPath string) (string, error)
- func Clone(parentDir, cloneURL, targetPath string) error
- func EnsurePathIsRepo(repoPath, cloneURL string, force bool) error
- func FetchPRMergeRef(repoPath string, prNumber int) error
- func IsWorkingTreeDirty(repoPath string) (bool, string, error)
- func ResetAndClean(repoPath string) error
- func Run(repoPath string, args ...string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckoutFetchHead ¶
func EnsurePathIsRepo ¶
EnsurePathIsRepo ensures the given path contains a git repository. If the directory doesn't exist or is empty, it clones from cloneURL. It verifies a .git directory exists. If force is true, uncommitted changes are discarded with git reset + clean; otherwise an error is returned.
func FetchPRMergeRef ¶
func IsWorkingTreeDirty ¶
IsWorkingTreeDirty returns true if the repo has uncommitted changes, along with the porcelain output describing them.
func ResetAndClean ¶
ResetAndClean discards all uncommitted changes (tracked and untracked).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.