Help us shape the future of Go! Take the 2026 Go Developer Survey

testgit

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package testgit isolates Git commands used by test fixtures.

relationships:

references: [env]

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertIsolated

func AssertIsolated(t *testing.T, fixture func())

AssertIsolated runs a fixture with inherited Git paths aimed at a populated sentinel repository. It checks every repository file, including config, HEAD, refs and index, even when the fixture aborts the test.

func Env

func Env() []string

Env preserves the process environment except for Git overrides, then supplies a fixed identity and disables host Git configuration for fixture commands. Callers can append deliberate fixture settings after this baseline.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL