summaryrefslogtreecommitdiff
path: root/Config.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-28 01:32:47 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-28 01:32:47 -0400
commita7bd63eb0100fd282da9058acc28935bdfdf25df (patch)
tree769bca71df8dd06a4015e5be3f1e3a36d12f894b /Config.hs
parent026c76914e21c768a38e86461849213e33b70046 (diff)
basic s3 remote start
But bucket name is not handled right; it needs to be globally unique.
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Config.hs b/Config.hs
index aae7d8291..c821364ce 100644
--- a/Config.hs
+++ b/Config.hs
@@ -31,11 +31,11 @@ setConfig k value = do
getConfig :: Git.Repo -> ConfigKey -> String -> Annex String
getConfig r key def = do
g <- Annex.gitRepo
- let def' = Git.configGet g global def
- return $ Git.configGet g local def'
- where
- local = "remote." ++ fromMaybe "" (Git.repoRemoteName r) ++ ".annex-" ++ key
- global = "annex." ++ key
+ let def' = Git.configGet g ("annex." ++ key) def
+ return $ Git.configGet g (remoteConfig r key) def'
+
+remoteConfig :: Git.Repo -> ConfigKey -> String
+remoteConfig r key = "remote." ++ fromMaybe "" (Git.repoRemoteName r) ++ ".annex-" ++ key
{- Calculates cost for a remote.
-