diff options
Diffstat (limited to 'GitRepo.hs')
-rw-r--r-- | GitRepo.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/GitRepo.hs b/GitRepo.hs index ba0125121..92539eb82 100644 --- a/GitRepo.hs +++ b/GitRepo.hs @@ -163,12 +163,15 @@ repoIsSsh Repo { location = Url url } | otherwise = False repoIsSsh _ = False +configAvail ::Repo -> Bool +configAvail Repo { config = c } = c /= Map.empty + repoIsLocalBare :: Repo -> Bool -repoIsLocalBare r@(Repo { location = Dir _ }) = configBare r +repoIsLocalBare r@(Repo { location = Dir _ }) = configAvail r && configBare r repoIsLocalBare _ = False repoIsLocalFull :: Repo -> Bool -repoIsLocalFull r@(Repo { location = Dir _ }) = not $ configBare r +repoIsLocalFull r@(Repo { location = Dir _ }) = configAvail r && not (configBare r) repoIsLocalFull _ = False assertLocal :: Repo -> a -> a |