gitmock

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package gitmock provides utilities for testing git repos w/ mock data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

Repo is a test repo.

func NewTestRepo

func NewTestRepo(tb testing.TB, r *git.Repository, dir string) (*Repo, error)

NewTestRepo creates a new test repo.

func (*Repo) AddRandomFiles

func (t *Repo) AddRandomFiles(fileCount int) (addedFiles []string)

AddRandomFiles adds random files to the git repo addedFiles are returned relative to the repo.

func (*Repo) Commit

func (t *Repo) Commit() (hash string)

Commit commits all changed files to the repo.

Jump to

Keyboard shortcuts

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