Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EnsurePrerequisites = ensurePrerequisitesUnwired FindGitHubSSHKey = findGitHubSSHKeyUnwired SetupSSHForGitHub = setupSSHForGitHubUnwired HandleExistingRepo = handleExistingRepo UpdateBareRepoWorktree = updateBareRepoWorktree FreshInstall = freshInstall CloneBareRepo = cloneBareRepo BackupConflicts = backupConflicts CheckoutWorktree = repo.CheckoutWorktree InitSubmodules = repo.InitSubmodules ConfigureBareRepo = repo.ConfigureBareRepo Stat = os.Stat EnsureSSH = ensureSSHIfRequired SelectPrompt = selectUnwired BareClone = repo.BareClone )
Test hooks and mockable dependencies
The workstation-setup hooks (EnsurePrerequisites, FindGitHubSSHKey, SetupSSHForGitHub) are wired by the command layer (cmd/setup wires EnsurePrerequisites, cmd/ssh wires the SSH hooks) to keep this package free of imports outside internal/. Their defaults fail loudly so an unwired composition surfaces immediately instead of silently skipping setup steps. Tests override them per-case.
View Source
var FetchRepo = func(ctx context.Context, repoPath, worktreePath string) error { return repo.FetchBareRepo(ctx, repoPath, worktreePath) }
View Source
var PullRebaseRepo = func(ctx context.Context, repoPath, worktreePath string) error { return repo.PullRebaseBareRepo(ctx, repoPath, worktreePath) }
pullRebaseRepo is a package-level variable used for testing.
View Source
var UpdateSubmodules = func(ctx context.Context, repoPath, worktreePath string) error { return repo.InitSubmodules(ctx, repoPath, worktreePath, nil) }
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.