diff options
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r-- | Remote/Git.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index 286a8c645..c1423bef7 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -42,8 +42,8 @@ list = do g <- Annex.gitRepo return $ Git.remotes g -gen :: Git.Repo -> UUID -> Cost -> Maybe (M.Map String String) -> Annex (Remote Annex) -gen r u cst _ = do +gen :: Git.Repo -> UUID -> Maybe (M.Map String String) -> Annex (Remote Annex) +gen r u _ = do {- It's assumed to be cheap to read the config of non-URL remotes, - so this is done each time git-annex is run. Conversely, - the config of an URL remote is only read when there is no @@ -54,6 +54,11 @@ gen r u cst _ = do (False, "") -> tryGitConfigRead r _ -> return r + let defcst = if not $ Git.repoIsUrl r + then cheapRemoteCost + else expensiveRemoteCost + cst <- remoteCost r' defcst + return $ Remote { uuid = u, cost = cst, |