Skip to content

Commit b69dff1

Browse files
committed
Remove caching
I removed this because it was making tests fail!
1 parent 9e97712 commit b69dff1

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

git/git.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ import (
1010
"strings"
1111
)
1212

13-
var cachedDir string
14-
1513
func Dir() (string, error) {
16-
if cachedDir != "" {
17-
return cachedDir, nil
18-
}
19-
2014
dirCmd := exec.Command("git", "rev-parse", "-q", "--git-dir")
2115
dirCmd.Stderr = nil
2216
output, err := dirCmd.Output()
@@ -33,7 +27,6 @@ func Dir() (string, error) {
3327
gitDir = filepath.Clean(gitDir)
3428
}
3529

36-
cachedDir = gitDir
3730
return gitDir, nil
3831
}
3932

0 commit comments

Comments
 (0)