cost bugfixes
This commit is contained in:
parent
fdd455e913
commit
0c73c08c1c
6 changed files with 37 additions and 27 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue