Documentation
¶
Overview ¶
Package worktree provides git worktree automation for isolated run environments.
Index ¶
- func Cleanup(ctx context.Context, repoPath string) error
- func GenerateBranchName(runID int) string
- func GenerateWorktreePath(repoPath string, runID int) string
- func GetRepoRoot(path string) (string, error)
- func IsGitRepo(path string) bool
- func IsGitWorktree(path string) bool
- type Worktree
- type WorktreeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBranchName ¶
GenerateBranchName creates a branch name for a run.
func GenerateWorktreePath ¶
GenerateWorktreePath creates a worktree path for a run.
func GetRepoRoot ¶
GetRepoRoot returns the root of the git repository.
func IsGitWorktree ¶
IsGitWorktree checks if a path is a git worktree.
Types ¶
type Worktree ¶
type Worktree struct {
// contains filtered or unexported fields
}
Worktree represents a git worktree.
func (*Worktree) WasCreated ¶
WasCreated returns true if this instance created the worktree.
type WorktreeInfo ¶
WorktreeInfo contains information about a worktree.
func ListWorktrees ¶
func ListWorktrees(repoPath string) ([]WorktreeInfo, error)
ListWorktrees lists all worktrees for a repository.
Click to show internal directories.
Click to hide internal directories.