avoid chdir when already inside worktree
This commit is contained in:
parent
0093a456e8
commit
9d98144776
1 changed files with 3 additions and 1 deletions
|
@ -35,6 +35,8 @@ get = do
|
||||||
case wt of
|
case wt of
|
||||||
Nothing -> return r
|
Nothing -> return r
|
||||||
Just d -> do
|
Just d -> do
|
||||||
|
cwd <- getCurrentDirectory
|
||||||
|
unless (d `dirContains` cwd) $
|
||||||
changeWorkingDirectory d
|
changeWorkingDirectory d
|
||||||
return $ addworktree wt r
|
return $ addworktree wt r
|
||||||
where
|
where
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue