diff options
Diffstat (limited to 'repository/gogit.go')
-rw-r--r-- | repository/gogit.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/repository/gogit.go b/repository/gogit.go index 74fe3fc5..bdac259d 100644 --- a/repository/gogit.go +++ b/repository/gogit.go @@ -734,6 +734,11 @@ func (repo *GoGitRepo) GetLocalRemote() string { // EraseFromDisk delete this repository entirely from the disk func (repo *GoGitRepo) EraseFromDisk() error { + err := repo.Close() + if err != nil { + return err + } + path := filepath.Clean(strings.TrimSuffix(repo.path, string(filepath.Separator)+".git")) // fmt.Println("Cleaning repo:", path) |