git

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckoutFetchHead

func CheckoutFetchHead(repoPath string) (string, error)

func Clone

func Clone(parentDir, cloneURL, targetPath string) error

func EnsurePathIsRepo

func EnsurePathIsRepo(repoPath, cloneURL string, force bool) error

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 FetchPRMergeRef(repoPath string, prNumber int) error

func IsWorkingTreeDirty

func IsWorkingTreeDirty(repoPath string) (bool, string, error)

IsWorkingTreeDirty returns true if the repo has uncommitted changes, along with the porcelain output describing them.

func ResetAndClean

func ResetAndClean(repoPath string) error

ResetAndClean discards all uncommitted changes (tracked and untracked).

func Run

func Run(repoPath string, args ...string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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