1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-02 22:25:47 +02:00

Clean before convertion?

This commit is contained in:
Cristian Betivu 2023-08-16 21:13:28 +03:00
parent a2b2336173
commit ee308a4994

View File

@ -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