Documentation
¶
Overview ¶
Package gittest provides hardened git-command helpers for tests that need to set up real git repositories or worktrees in t.TempDir().
All commands run with system and global git config disabled (GIT_CONFIG_NOSYSTEM=1, GIT_CONFIG_GLOBAL=/dev/null) and with deterministic author/committer identity, so tests behave the same way on every host.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddWorktree ¶
AddWorktree creates a linked git worktree at worktreeDir, branching from HEAD of mainDir to a new branch named branch. Registers a t.Cleanup that runs `git worktree remove --force` so t.TempDir() teardown can succeed without lock-file flakes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.