Documentation
¶
Overview ¶
Package git provides Git operation wrappers for cloning and updating repositories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
Clone clones a git repository from url to dest with the specified depth. Output is streamed to os.Stdout and os.Stderr. Stdin is connected to os.Stdin to support interactive authentication (e.g., SSH passphrase, credentials).
func IsURL ¶
IsURL returns true if s looks like a git repository URL. It checks for:
- URLs containing "://" (e.g., https://, git://)
- URLs ending with ".git"
- SSH-style URLs starting with "git@"
func Pull ¶
Pull performs a fast-forward-only pull in the specified repository directory. Output is streamed to os.Stdout and os.Stderr. Stdin is connected to os.Stdin to support interactive authentication (e.g., SSH passphrase, credentials).
func ValidateRemote ¶
ValidateRemote checks if repoPath is a valid git repository by verifying the existence of a .git directory.
Types ¶
This section is empty.