testgit

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package testgit provides functions and types for working with Git repositories in the context of testing within the uncloak application.

Index

Constants

View Source
const (
	// MainBranchName represents the name of the main branch in the git
	// repository.
	MainBranchName = "main"

	// TestRepoDir represents the directory name of the test git repository.
	TestRepoDir = "test-repo-covered"
)

Variables

This section is empty.

Functions

func AddCommit

func AddCommit(t *testing.T, commitMsg string)

AddCommit adds and commits changes in the git repository with the given commit message.

func CreateBranch

func CreateBranch(t *testing.T, branchName string)

CreateBranch creates a new branch and checks it out in the git repository.

func GetTestRepoPath

func GetTestRepoPath(t *testing.T) string

GetTestRepoPath returns the absolute path to the test git repository TestRepoDir.

func Init

func Init(t *testing.T)

Init initializes a git repository in the current working directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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