avoid chdir when already inside worktree

This commit is contained in:
Joey Hess 2012-05-19 10:37:28 -04:00
parent 0093a456e8
commit 9d98144776

View file

@ -35,7 +35,9 @@ get = do
case wt of
Nothing -> return r
Just d -> do
changeWorkingDirectory d
cwd <- getCurrentDirectory
unless (d `dirContains` cwd) $
changeWorkingDirectory d
return $ addworktree wt r
where
pathenv s = do