diff options
author | Joey Hess <joey@kitenet.net> | 2011-03-28 01:32:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-03-28 01:32:47 -0400 |
commit | a7bd63eb0100fd282da9058acc28935bdfdf25df (patch) | |
tree | 769bca71df8dd06a4015e5be3f1e3a36d12f894b /Config.hs | |
parent | 026c76914e21c768a38e86461849213e33b70046 (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.hs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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. - |