cost bugfixes

This commit is contained in:
Joey Hess 2011-03-30 15:15:46 -04:00
parent fdd455e913
commit 0c73c08c1c
6 changed files with 37 additions and 27 deletions

View file

@ -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,