Documentation
¶
Index ¶
- Variables
- func EnsureSSHAuthSock()
- type CLIClient
- func (c CLIClient) AddRemote(path, name, url string) error
- func (c CLIClient) Clone(ctx context.Context, url, path, remoteName string) error
- func (c CLIClient) CloneBare(ctx context.Context, url, path, remoteName string) error
- func (c CLIClient) CurrentBranch(repoPath string) (string, bool, error)
- func (c CLIClient) Fetch(ctx context.Context, repoPath, remoteName string) error
- func (c CLIClient) IsAncestor(repoPath, ancestorRef, descendantRef string) (bool, error)
- func (c CLIClient) IsContentMerged(repoPath, branchRef, baseRef string) (bool, error)
- func (c CLIClient) IsRepo(path string) (bool, error)
- func (c CLIClient) ReferenceExists(ctx context.Context, repoPath, ref string) (bool, error)
- func (c CLIClient) RemoteExists(repoPath, remoteName string) (bool, error)
- func (c CLIClient) RemoteNames(repoPath string) ([]string, error)
- func (c CLIClient) RemoteURLs(repoPath, remoteName string) ([]string, error)
- func (c CLIClient) Status(path string) (StatusSummary, error)
- func (c CLIClient) UpdateBranch(ctx context.Context, repoPath, branchName, targetRef string) error
- func (c CLIClient) WorktreeAdd(ctx context.Context, opts WorktreeAddOptions) error
- func (c CLIClient) WorktreeList(repoPath string) ([]string, error)
- func (c CLIClient) WorktreeRemove(opts WorktreeRemoveOptions) error
- type Client
- type StatusSummary
- type WorktreeAddOptions
- type WorktreeRemoveOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWorktreeNotFound = errors.New("worktree not found")
ErrWorktreeNotFound indicates a worktree entry was missing.
Functions ¶
func EnsureSSHAuthSock ¶ added in v0.3.0
func EnsureSSHAuthSock()
EnsureSSHAuthSock maps ssh IdentityAgent to SSH_AUTH_SOCK when available.
Types ¶
type CLIClient ¶ added in v0.3.0
type CLIClient struct {
// contains filtered or unexported fields
}
CLIClient implements Git operations via the git CLI.
func NewCLIClient ¶ added in v0.3.0
func NewCLIClient() CLIClient
NewCLIClient constructs a git CLI client.
func (CLIClient) CurrentBranch ¶ added in v0.3.0
func (CLIClient) IsAncestor ¶ added in v0.3.0
func (CLIClient) IsContentMerged ¶ added in v0.3.0
func (CLIClient) ReferenceExists ¶ added in v0.3.0
func (CLIClient) RemoteExists ¶ added in v0.3.0
func (CLIClient) RemoteNames ¶ added in v0.3.0
func (CLIClient) RemoteURLs ¶ added in v0.3.0
func (CLIClient) Status ¶ added in v0.3.0
func (c CLIClient) Status(path string) (StatusSummary, error)
func (CLIClient) UpdateBranch ¶ added in v0.3.0
UpdateBranch force-updates branchName to targetRef. Callers must ensure the update is safe.
func (CLIClient) WorktreeAdd ¶ added in v0.3.0
func (c CLIClient) WorktreeAdd(ctx context.Context, opts WorktreeAddOptions) error
func (CLIClient) WorktreeList ¶ added in v0.3.0
func (CLIClient) WorktreeRemove ¶ added in v0.3.0
func (c CLIClient) WorktreeRemove(opts WorktreeRemoveOptions) error
type Client ¶
type Client interface {
Clone(ctx context.Context, url, path, remoteName string) error
CloneBare(ctx context.Context, url, path, remoteName string) error
AddRemote(path, name, url string) error
RemoteNames(repoPath string) ([]string, error)
RemoteURLs(repoPath, remoteName string) ([]string, error)
ReferenceExists(ctx context.Context, repoPath, ref string) (bool, error)
Fetch(ctx context.Context, repoPath, remoteName string) error
// UpdateBranch force-updates branchName to targetRef. Callers must ensure the update is safe.
UpdateBranch(ctx context.Context, repoPath, branchName, targetRef string) error
Status(path string) (StatusSummary, error)
IsRepo(path string) (bool, error)
IsAncestor(repoPath, ancestorRef, descendantRef string) (bool, error)
IsContentMerged(repoPath, branchRef, baseRef string) (bool, error)
CurrentBranch(repoPath string) (string, bool, error)
RemoteExists(repoPath, remoteName string) (bool, error)
WorktreeAdd(ctx context.Context, opts WorktreeAddOptions) error
WorktreeRemove(opts WorktreeRemoveOptions) error
WorktreeList(repoPath string) ([]string, error)
}
type StatusSummary ¶
type WorktreeAddOptions ¶
type WorktreeRemoveOptions ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.