Skip to content

Commit

Permalink
traverse: fix GitWorkTree
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Aug 11, 2023
1 parent c89a442 commit 97651e0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/traverse/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ func GitWorkTree(tc Context) (string, error) {
return filepath.ToSlash(dir), nil
}

if _, ok := tc.LookupEnv("GIT_DIR"); ok {
wd, _ := tc.Abs("") // TODO provide better access to Context.Dir
return wd, nil
}

gitdir, err := GitDir(tc)
return filepath.Dir(gitdir), err
gitDir, err := GitDir(tc)
return filepath.Dir(gitDir), err
}

0 comments on commit 97651e0

Please sign in to comment.