No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_tools
.gitignore
.travis.yml
LICENSE
Makefile
README.md
example_test.go
gitmock.go
gitmock_gen.go

README.md

gitmock

Build Status Coverage Status MIT License GoDoc

Description

Create mock git repository for testing.

Synopsis

gm, err := gitmock.New("")
if err != nil {
    log.Fatal(err)
}
defer os.RemoveAll(gm.RepoPath())
gm.Init() // shortcut of `gm.Do("init")
file := "hoge/fuga.txt"
gm.PutFile(file, "aaa\n")
gm.Add(file)
gm.Commit("-m", "initial commit")
out, stderr, err := gm.Status()

Author

Songmu