Documentation
¶
Overview ¶
Package gittest provides test utilities for the git package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryGitManager ¶
type InMemoryGitManager struct {
*git.GitManager
// contains filtered or unexported fields
}
InMemoryGitManager wraps *git.GitManager with test-only accessors. The underlying repository uses in-memory storage (memfs).
func NewInMemoryGitManager ¶
func NewInMemoryGitManager(t *testing.T, repoRoot string) *InMemoryGitManager
NewInMemoryGitManager creates a GitManager backed by in-memory storage. The repoRoot is a logical path (not a real filesystem path) used for path construction in tests.
The repository is seeded with an initial commit so HEAD exists.
func (*InMemoryGitManager) Repository ¶
func (m *InMemoryGitManager) Repository() *gogit.Repository
Repository returns the underlying go-git Repository for test assertions.
Click to show internal directories.
Click to hide internal directories.