Versions in this module Expand all Collapse all v0 v0.0.2 Apr 12, 2026 Changes in this version + const RemoteGitUrlRegex + var ErrInvalidGitUrl = errors.New("invalid git remote repository url") + var ErrInvalidReference = errors.New("invalid remote reference") + type BranchName string + type CloneOps struct + Path string + Refs BranchName + Remote RemoteGitUrl + type CommandBuilder struct + func NewCommandBuilder() *CommandBuilder + func (cb *CommandBuilder) Arg(args ...string) *CommandBuilder + func (cb *CommandBuilder) ArgIf(cond bool, args ...string) *CommandBuilder + func (cb *CommandBuilder) Run() error + func (cb *CommandBuilder) RunWithExitCode() int + func (cb *CommandBuilder) RunWithOutput() (string, error) + func (cb *CommandBuilder) SetRepo(r Repo) *CommandBuilder + func (cb *CommandBuilder) String() string + type Git interface + Clone func(ops CloneOps) error + CreateLightweightTag func(repo Repo, tag string, branch BranchName) error + CurrentBranch func(repo Repo) (BranchName, error) + DiffersFromRemote func(repo Repo) (bool, error) + Fetch func(repo Repo) error + HasChanges func(repo Repo) (bool, error) + ListBranches func(repo Repo) ([]BranchName, error) + ListRemotes func(repo Repo) ([]Remote, error) + Pull func(repo Repo, rebase bool) error + PullBranch func(repo Repo, branch BranchName, rebase bool) error + PushTag func(repo Repo, tag Tag, remote Remote) error + Status func(repo Repo) (StatusRes, error) + Switch func(repo Repo, branch BranchName, force bool) error + type GitCLI struct + func NewGitCLI() (GitCLI, error) + func (gc GitCLI) Clone(ops CloneOps) error + func (gc GitCLI) CreateLightweightTag(repo Repo, tag string, branch BranchName) error + func (gc GitCLI) CurrentBranch(repo Repo) (BranchName, error) + func (gc GitCLI) DiffersFromRemote(repo Repo) (bool, error) + func (gc GitCLI) Fetch(repo Repo) error + func (gc GitCLI) HasChanges(repo Repo) (bool, error) + func (gc GitCLI) ListBranches(repo Repo) ([]BranchName, error) + func (gc GitCLI) ListRemotes(repo Repo) ([]Remote, error) + func (gc GitCLI) Pull(repo Repo, rebase bool) error + func (gc GitCLI) PullBranch(repo Repo, branch BranchName, rebase bool) error + func (gc GitCLI) PushTag(repo Repo, tag Tag, remote Remote) error + func (gc GitCLI) Status(repo Repo) (StatusRes, error) + func (gc GitCLI) Switch(repo Repo, br BranchName, force bool) error + type Remote string + type RemoteGitUrl string + func NewRemoteGitUrl(raw string) (RemoteGitUrl, error) + type Repo struct + Path string + Refs BranchName + Remote RemoteGitUrl + type StatusRes struct + Branch BranchName + Change bool + type Tag string