factor out getRemoteGitConfig

This commit is contained in:
Joey Hess 2014-05-16 16:08:20 -04:00
parent dd6b32e9a2
commit c34b5e09f8
6 changed files with 22 additions and 21 deletions

View file

@ -87,10 +87,9 @@ list = do
- cached UUID value. -}
configRead :: Git.Repo -> Annex Git.Repo
configRead r = do
g <- fromRepo id
let c = extractRemoteGitConfig g (Git.repoDescribe r)
gc <- Annex.getRemoteGitConfig r
u <- getRepoUUID r
case (repoCheap r, remoteAnnexIgnore c, u) of
case (repoCheap r, remoteAnnexIgnore gc, u) of
(_, True, _) -> return r
(True, _, _) -> tryGitConfigRead r
(False, _, NoUUID) -> tryGitConfigRead r