diff --git a/Git/Construct.hs b/Git/Construct.hs index fdc56a20a2..bfb16164ff 100644 --- a/Git/Construct.hs +++ b/Git/Construct.hs @@ -244,9 +244,11 @@ isRepoTop dir = do else isBareRepo where isRepo = gitSignature (".git" "config") - isBareRepo = (&&) - <$> doesDirectoryExist (dir "objects") - <*> gitSignature "config" + isBareRepo = do + e <- doesDirectoryExist (dir "objects") + if not e + then return e + else gitSignature "config" gitSignature file = doesFileExist (dir file) newFrom :: RepoLocation -> IO Repo