Documentation ¶
Overview ¶
Package localgit creates a local git repo that can be used for testing code that uses a git.Client.
Index ¶
- type LocalGit
- func (lg *LocalGit) AddCommit(org, repo string, files map[string][]byte) error
- func (lg *LocalGit) Checkout(org, repo, commitlike string) error
- func (lg *LocalGit) CheckoutNewBranch(org, repo, branch string) error
- func (lg *LocalGit) Clean() error
- func (lg *LocalGit) MakeFakeRepo(org, repo string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalGit ¶
type LocalGit struct { // Dir is the path to the base temp dir. Repos are at Dir/org/repo. Dir string // Git is the location of the git binary. Git string }
LocalGit stores the repos in a temp dir. Create with New and delete with Clean.
func (*LocalGit) CheckoutNewBranch ¶
CheckoutNewBranch does git checkout -b.
func (*LocalGit) MakeFakeRepo ¶
MakeFakeRepo creates the given repo and makes an initial commit.
Click to show internal directories.
Click to hide internal directories.