diff options
| author | Carlos Martín Nieto <[email protected]> | 2015-06-05 02:02:37 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2015-06-08 04:07:49 +0200 |
| commit | 85fde1fcfbc3fd6000b8fa1a4041b4c314a92b2f (patch) | |
| tree | 80b29ec86120ba092fcd05c05e28e6a65d1f2b13 /git_test.go | |
| parent | 1011b03e4139580679bb93183a781edd11c22a97 (diff) | |
| parent | 53c158fbd7e5f4dac787f5c3a7107fcb4116f676 (diff) | |
Merge remote-tracking branch 'origin/master' into next
Diffstat (limited to 'git_test.go')
| -rw-r--r-- | git_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/git_test.go b/git_test.go index b9cf0a9..58caf71 100644 --- a/git_test.go +++ b/git_test.go @@ -2,11 +2,24 @@ package git import ( "io/ioutil" + "os" "path" "testing" "time" ) +func cleanupTestRepo(t *testing.T, r *Repository) { + var err error + if r.IsBare() { + err = os.RemoveAll(r.Path()) + } else { + err = os.RemoveAll(r.Workdir()) + } + checkFatal(t, err) + + r.Free() +} + func createTestRepo(t *testing.T) *Repository { // figure out where we can create the test repo path, err := ioutil.TempDir("", "git2go") |
