diff options
author | Joey Hess <joeyh@debian.org> | 2013-12-03 15:02:21 -0400 |
---|---|---|
committer | Joey Hess <joeyh@debian.org> | 2013-12-03 15:02:21 -0400 |
commit | b1ed0aee347a88507d1530f61006cd658b57e54c (patch) | |
tree | eb2a975663782f83e6b20d6d239447d7222de81b /Git/Config.hs | |
parent | 7e592e1d6ed5e0b25b37215da7558c6324688d6f (diff) | |
parent | a4f3e112954e1b785c84c339bcbd83597a89335e (diff) | |
download | git-repair-b1ed0aee347a88507d1530f61006cd658b57e54c.tar.gz |
Record git-repair (1.20131203) in archive suite sid
Diffstat (limited to 'Git/Config.hs')
-rw-r--r-- | Git/Config.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Git/Config.hs b/Git/Config.hs index 1919ece..b5c1be0 100644 --- a/Git/Config.hs +++ b/Git/Config.hs @@ -110,8 +110,13 @@ store s repo = do -} updateLocation :: Repo -> IO Repo updateLocation r@(Repo { location = LocalUnknown d }) - | isBare r = updateLocation' r $ Local d Nothing - | otherwise = updateLocation' r $ Local (d </> ".git") (Just d) + | isBare r = ifM (doesDirectoryExist dotgit) + ( updateLocation' r $ Local dotgit Nothing + , updateLocation' r $ Local d Nothing + ) + | otherwise = updateLocation' r $ Local dotgit (Just d) + where + dotgit = (d </> ".git") updateLocation r@(Repo { location = l@(Local {}) }) = updateLocation' r l updateLocation r = return r |