testrepo

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestAuthor = "modularise-tester"
	TestEmail  = "test@modularise.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoAction

type RepoAction func(*TestRepo)

func AddFile

func AddFile(file RepoFile) RepoAction

func AnnotatedTag

func AnnotatedTag(name string) RepoAction

func Commit

func Commit(message string) RepoAction

func LightTag

func LightTag(name string) RepoAction

type RepoFile

type RepoFile struct {
	Path    string
	Content []byte
	Mode    os.FileMode
}

type TestRepo

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

func CreateTestRepo

func CreateTestRepo(t *testing.T, actions []RepoAction) *TestRepo

func (*TestRepo) Apply

func (r *TestRepo) Apply(actions []RepoAction)

func (*TestRepo) Head

func (r *TestRepo) Head() *object.Commit

func (*TestRepo) Path

func (r *TestRepo) Path() string

func (*TestRepo) Repository

func (r *TestRepo) Repository() *git.Repository

func (*TestRepo) WriteToDisk

func (r *TestRepo) WriteToDisk(path string)

Jump to

Keyboard shortcuts

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