diff options
Diffstat (limited to 'Git')
-rw-r--r-- | Git/CurrentRepo.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Git/CurrentRepo.hs b/Git/CurrentRepo.hs index 746904caf..a40b412f5 100644 --- a/Git/CurrentRepo.hs +++ b/Git/CurrentRepo.hs @@ -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 |