Versions in this module Expand all Collapse all v2 v2.3.0 Jul 30, 2026 v2.2.9 Jul 29, 2026 Changes in this version + func ConvertToSSH(httpsURL string) (string, error) + func DefaultHTTPAuthUsername(host, explicit string) string + func GetSSHKeyPath() string + func IsHTTPSURL(url string) bool + func IsSSHURL(url string) bool + func LooksLikeHTTPRemote(repoURL string) bool + func SetSSHKeyPath(cmd *cobra.Command) + func ValidateSSHKey(keyPath string) error + type Availability struct + Available bool + Reason string + Version string + func CheckAvailability(ctx context.Context) Availability + type Client struct + func NewClient() *Client + func NewClientWithOptions(opts ...ClientOption) *Client + func (c *Client) Add(ctx context.Context, repoPath string, paths ...string) error + func (c *Client) Checkout(ctx context.Context, repoPath, ref string) error + func (c *Client) CheckoutNewBranch(ctx context.Context, repoPath, branch string) error + func (c *Client) CheckoutNewBranchForce(ctx context.Context, repoPath, branch string) error + func (c *Client) Clone(ctx context.Context, repoURL, destPath string) error + func (c *Client) Commit(ctx context.Context, repoPath, message string) error + func (c *Client) ExtraEnv() []string + func (c *Client) Fetch(ctx context.Context, repoPath string) error + func (c *Client) GetCurrentBranch(ctx context.Context, repoPath string) (string, error) + func (c *Client) GetCurrentBranchSymbolic(ctx context.Context, repoPath string) (string, error) + func (c *Client) GetDefaultBranch(ctx context.Context, repoPath string) (string, error) + func (c *Client) GetRemoteURL(ctx context.Context, repoPath string) (string, error) + func (c *Client) HasStagedChanges(ctx context.Context, repoPath string) (bool, error) + func (c *Client) IsEmpty(ctx context.Context, repoPath string) (bool, error) + func (c *Client) LsRemote(ctx context.Context, repoURL, ref string) (string, error) + func (c *Client) Pull(ctx context.Context, repoPath string) error + func (c *Client) PullRebase(ctx context.Context, repoPath string) error + func (c *Client) Push(ctx context.Context, repoPath string) error + func (c *Client) PushSetUpstream(ctx context.Context, repoPath, branch string) error + func (c *Client) RebaseAbort(ctx context.Context, repoPath string) error + func (c *Client) Reset(ctx context.Context, repoPath, mode, ref string) error + func (c *Client) RestoreExcept(ctx context.Context, repoPath, excludeDir string) error + func (c *Client) RevParse(ctx context.Context, repoPath, ref string) (string, error) + type ClientOption func(*Client) + func WithCommitActor(name, email string) ClientOption + func WithEnv(env ...string) ClientOption + func WithHTTPBasicAuth(scheme, host, username, password string) ClientOption + func WithHTTPSBasicAuth(host, username, password string) ClientOption + func WithSSHKey(path string) ClientOption + type RemoteAuthInfo struct + HTTP bool + Host string + SSH bool + Scheme string + func ParseRemoteAuthInfo(repoURL string) RemoteAuthInfo Other modules containing this package github.com/sleuth-io/sx