Versions in this module Expand all Collapse all v0 v0.14.2 Jun 24, 2026 Changes in this version + var ErrBranchExists = errors.New("branch already exists") + var ErrRepositoryNotExists = errors.New("repository does not exist") + func CurrentBackendName() string + func ParseURL(rawURL string) (u *url.URL, err error) + func RegisterBackend(backend Backend) error + func RegisteredBackends() []string + func UseBackend(name string) error + type AuthMethod struct + KeyFile string + KeyPassphrase string + Password string + Scheme string + Username string + func GetAuthForURL(remoteURL *url.URL, authToken, keyFile string, passwordCallback pwCallback) (*AuthMethod, error) + type Backend interface + Clone func(path, remoteURL string, auth *AuthMethod, opts CloneOptions) (RepositoryBackend, error) + Name func() string + Open func(path string) (RepositoryBackend, error) + type Branch struct + Merge ReferenceName + Name string + Remote string + func (b *Branch) Validate() error + type CloneOptions struct + Depth int + Insecure bool + type Config struct + Branches map[string]*Branch + Remotes map[string]*RemoteConfig + type Hash string + func (h Hash) String() string + type Reference struct + func (r *Reference) Hash() Hash + func (r *Reference) Name() ReferenceName + type ReferenceName string + func NewBranchReferenceName(name string) ReferenceName + func NewRemoteReferenceName(remote, name string) ReferenceName + func (r ReferenceName) IsBranch() bool + func (r ReferenceName) IsRemote() bool + func (r ReferenceName) IsTag() bool + func (r ReferenceName) Short() string + func (r ReferenceName) String() string + type Remote struct + func (r *Remote) Config() *RemoteConfig + type RemoteConfig struct + Name string + URLs []string + type RepositoryBackend interface + AddRemote func(name, remoteURL string) error + Checkout func(ref ReferenceName) error + Config func() (*Config, error) + CreateTrackingBranch func(localBranchName, remoteBranchName, remoteName string) error + DeleteLocalBranch func(branchName string) error + DeleteRemoteBranch func(remoteName, remoteBranch string, auth *AuthMethod) error + Fetch func(remoteName string, refspecs []string, auth *AuthMethod) error + Head func() (*Reference, error) + ListReferences func(prefixes ...string) ([]*Reference, error) + PushToAgitFlowPR func(remoteName, head, base, topic string, pushOptions map[string]string, ...) error + SetBranchUpstream func(branchName, remoteName, remoteBranch string) error + WorkTree func() string + type TeaRepo struct + func Clone(path, remoteURL string, auth *AuthMethod, depth int, insecure bool) (*TeaRepo, error) + func RepoForWorkdir() (*TeaRepo, error) + func RepoFromPath(path string) (*TeaRepo, error) + func (r TeaRepo) AddRemote(name, remoteURL string) error + func (r TeaRepo) Config() (*Config, error) + func (r TeaRepo) Fetch(remoteName string, refspecs []string, auth *AuthMethod) error + func (r TeaRepo) GetOrCreateRemote(remoteURL, newRemoteName string) (*Remote, error) + func (r TeaRepo) GetRemote(remoteURL string) (*Remote, error) + func (r TeaRepo) Head() (*Reference, error) + func (r TeaRepo) PushToCreatAgitFlowPR(remoteName, head, base, topic, title, description string, auth *AuthMethod) error + func (r TeaRepo) Remote(remoteName string) (*Remote, error) + func (r TeaRepo) RemoteURL(remoteName string) (*url.URL, error) + func (r TeaRepo) Remotes() ([]*Remote, error) + func (r TeaRepo) SetBranchUpstream(branchName, remoteName, remoteBranch string) error + func (r TeaRepo) TeaCheckout(ref ReferenceName) error + func (r TeaRepo) TeaCreateBranch(localBranchName, remoteBranchName, remoteName string) error + func (r TeaRepo) TeaDeleteLocalBranch(branch *Branch) error + func (r TeaRepo) TeaDeleteRemoteBranch(remoteName, remoteBranch string, auth *AuthMethod) error + func (r TeaRepo) TeaFindBranchByName(branchName, repoURL string) (b *Branch, err error) + func (r TeaRepo) TeaFindBranchBySha(sha, repoURL string) (b *Branch, err error) + func (r TeaRepo) TeaFindBranchRemote(branchName, hash string) (*Remote, error) + func (r TeaRepo) TeaGetCurrentBranchNameAndSHA() (string, string, error) + func (r TeaRepo) TeaRemoteURL(name string) (auth *url.URL, err error) + func (r TeaRepo) WorkTree() string + type URLParser struct + func (p *URLParser) Parse(rawURL string) (u *url.URL, err error)