mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
Clean before convertion?
This commit is contained in:
parent
a2b2336173
commit
ee308a4994
1 changed files with 2 additions and 1 deletions
|
@ -158,6 +158,7 @@ func linkedWorktreeGitDirPath(fs afero.Fs, worktreePath string) (string, error)
|
||||||
|
|
||||||
gitDir := strings.TrimPrefix(gitDirLine[0], "gitdir: ")
|
gitDir := strings.TrimPrefix(gitDirLine[0], "gitdir: ")
|
||||||
|
|
||||||
|
gitDir = filepath.Clean(gitDir)
|
||||||
// For windows support
|
// For windows support
|
||||||
gitDir = filepath.ToSlash(gitDir)
|
gitDir = filepath.ToSlash(gitDir)
|
||||||
|
|
||||||
|
@ -208,7 +209,7 @@ func getCurrentRepoGitDirPath(
|
||||||
}
|
}
|
||||||
|
|
||||||
// confirm whether the next directory up is the worktrees directory
|
// 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" {
|
if path.Base(parent) == "worktrees" {
|
||||||
gitDirPath := path.Dir(parent)
|
gitDirPath := path.Dir(parent)
|
||||||
return gitDirPath, path.Dir(gitDirPath), nil
|
return gitDirPath, path.Dir(gitDirPath), nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue