Documentation
¶
Overview ¶
Package gitfixture provides deterministic Git repository fixtures for tests.
Index ¶
Constants ¶
View Source
const ( // UserName is the canonical author name for test commits. UserName = "Test User" // UserEmail is the canonical author email for test commits. UserEmail = "test@example.com" )
Variables ¶
This section is empty.
Functions ¶
func ConfigureGoGitIdentity ¶
func ConfigureGoGitIdentity(t testing.TB, repo *git.Repository)
ConfigureGoGitIdentity writes the canonical test author identity to repo's local config through go-git. Tests must not depend on a developer's global Git configuration, which may be absent in CI or intentionally hidden by a sandbox.
func ConfigureNativeIdentity ¶
ConfigureNativeIdentity writes the same canonical identity through the Git CLI. Keeping native-git and go-git fixtures on one identity prevents tests from accidentally succeeding only because a developer has global Git credentials configured.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.