We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e97712 commit b69dff1Copy full SHA for b69dff1
git/git.go
@@ -10,13 +10,7 @@ import (
10
"strings"
11
)
12
13
-var cachedDir string
14
-
15
func Dir() (string, error) {
16
- if cachedDir != "" {
17
- return cachedDir, nil
18
- }
19
20
dirCmd := exec.Command("git", "rev-parse", "-q", "--git-dir")
21
dirCmd.Stderr = nil
22
output, err := dirCmd.Output()
@@ -33,7 +27,6 @@ func Dir() (string, error) {
33
27
gitDir = filepath.Clean(gitDir)
34
28
}
35
29
36
- cachedDir = gitDir
37
30
return gitDir, nil
38
31
39
32
0 commit comments