diff options
author | Joey Hess <joey@kitenet.net> | 2011-04-08 21:37:59 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-04-08 21:37:59 -0400 |
commit | 1bfd3922c06e6a6982a6ec78ea21432652e471d9 (patch) | |
tree | b183ca66b94389d653056c14160b71485643694a /Remote/Bup.hs | |
parent | c253d07a82f1ffac4aa256c09a6fd7dcbc780923 (diff) |
set cost for local bup repos to cheap
Diffstat (limited to 'Remote/Bup.hs')
-rw-r--r-- | Remote/Bup.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Remote/Bup.hs b/Remote/Bup.hs index 5fbe9a8b5..6a7609aad 100644 --- a/Remote/Bup.hs +++ b/Remote/Bup.hs @@ -37,8 +37,10 @@ remote = RemoteType { gen :: Git.Repo -> UUID -> Maybe (M.Map String String) -> Annex (Remote Annex) gen r u c = do - cst <- remoteCost r expensiveRemoteCost bupremote <- getConfig r "bupremote" (error "missing bupremote") + let local = ':' `notElem` bupremote + cst <- remoteCost r (if local then cheapRemoteCost else expensiveRemoteCost) + return $ this cst bupremote where this cst bupremote = Remote { |