mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-13 09:06:27 -04:00
Clean before convertion?
This commit is contained in:
parent
a2b2336173
commit
ee308a4994
|
|
@ -158,6 +158,7 @@ func linkedWorktreeGitDirPath(fs afero.Fs, worktreePath string) (string, error)
|
|||
|
||||
gitDir := strings.TrimPrefix(gitDirLine[0], "gitdir: ")
|
||||
|
||||
gitDir = filepath.Clean(gitDir)
|
||||
// For windows support
|
||||
gitDir = filepath.ToSlash(gitDir)
|
||||
|
||||
|
|
@ -208,7 +209,7 @@ func getCurrentRepoGitDirPath(
|
|||
}
|
||||
|
||||
// confirm whether the next directory up is the worktrees directory
|
||||
parent := path.Dir(path.Clean(worktreeGitPath))
|
||||
parent := path.Dir(worktreeGitPath)
|
||||
if path.Base(parent) == "worktrees" {
|
||||
gitDirPath := path.Dir(parent)
|
||||
return gitDirPath, path.Dir(gitDirPath), nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue