gittest

package
v0.0.1-beta3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitFile

func CommitFile(t *testing.T, repo *git.Repo, filename string, body []byte)

func NewTempRepo

func NewTempRepo(t *testing.T) *git.Repo

NewTempRepo initializes a new git repository with reasonable defaults.

func WithCheckoutBranch

func WithCheckoutBranch(t *testing.T, repo *git.Repo, branch string, f func())

WithCheckoutBranch runs the given function after checking out the specified branch. It returns to the original branch after the function returns.

Types

This section is empty.

Jump to

Keyboard shortcuts

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