fix(git): align .Dir with .PWD

no trailing /
This commit is contained in:
Jan De Dobbeleer 2022-08-29 07:47:15 +02:00 committed by Jan De Dobbeleer
parent 199993b891
commit 4213be5190

View file

@ -160,7 +160,7 @@ func (g *Git) shouldDisplay() bool {
}
// convert the worktree file path to a windows one when in wsl 2 shared folder
g.Dir = strings.TrimSuffix(g.convertToWindowsPath(gitdir.Path), ".git")
g.Dir = strings.TrimSuffix(g.convertToWindowsPath(gitdir.Path), "/.git")
if !gitdir.IsDir {
return g.hasWorktree(gitdir)