Documentation
¶
Overview ¶
Package testhelper creates real git repositories in t.TempDir() for use in integration tests of the git.Runner implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Repo ¶
type Repo struct {
Path string // absolute path to the repo root
// contains filtered or unexported fields
}
Repo is a real git repository created in a temp directory.
func Init ¶
Init creates a new bare-minimum git repository in t.TempDir(). The repo has one commit on "main" and origin/HEAD pointing to main.
func RepoAt ¶
RepoAt wraps an existing directory as a Repo for use in tests. Use this when you need a Repo handle for a path created by the Runner (e.g. a worktree added via WorktreeAdd).
func (*Repo) CreateBranch ¶
CreateBranch creates a new branch from HEAD without checking it out.
Click to show internal directories.
Click to hide internal directories.