diff options
author | Cristian Betivu <cbe@languagewire.com> | 2023-08-16 21:13:28 +0300 |
---|---|---|
committer | Cristian Betivu <cbe@languagewire.com> | 2023-08-19 18:36:57 +0300 |
commit | ee308a49946633c0ba6d96e38aec99e0f88eac90 (patch) | |
tree | 138bce55714ff139cab550ce564186ef1abfece3 /pkg/commands | |
parent | a2b2336173f05a119338f850377668c4579169a1 (diff) |
Clean before convertion?
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git_commands/repo_paths.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/commands/git_commands/repo_paths.go b/pkg/commands/git_commands/repo_paths.go index 8bae26258..e80b19a1c 100644 --- a/pkg/commands/git_commands/repo_paths.go +++ b/pkg/commands/git_commands/repo_paths.go @@ -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 |