summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-05-23 17:08:43 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-05-23 17:08:43 -0400
commit063d84ddd33f1aa0624cf5f363f2c58397b98562 (patch)
treec94f587d1338b5ab59bf44626c1d70915ec21134 /Remote
parentd5f672ddd59b43cb9b1bac8f836864165c8931f2 (diff)
plumb RemoteGitConfig through to setRemoteCredPair
Diffstat (limited to 'Remote')
-rw-r--r--Remote/External.hs3
-rw-r--r--Remote/Glacier.hs2
-rw-r--r--Remote/S3.hs4
-rw-r--r--Remote/WebDAV.hs2
4 files changed, 6 insertions, 5 deletions
diff --git a/Remote/External.hs b/Remote/External.hs
index 04834c78f..26858a7f0 100644
--- a/Remote/External.hs
+++ b/Remote/External.hs
@@ -241,7 +241,8 @@ handleRequest' lck external req mp responsehandler
send $ VALUE value
handleRemoteRequest (SETCREDS setting login password) = do
c <- liftIO $ atomically $ readTMVar $ externalConfig external
- c' <- setRemoteCredPair encryptionAlreadySetup c (credstorage setting) $
+ gc <- liftIO $ atomically $ readTMVar $ externalGitConfig external
+ c' <- setRemoteCredPair encryptionAlreadySetup c gc (credstorage setting) $
Just (login, password)
void $ liftIO $ atomically $ swapTMVar (externalConfig external) c'
handleRemoteRequest (GETCREDS setting) = do
diff --git a/Remote/Glacier.hs b/Remote/Glacier.hs
index 800b16875..234b750d4 100644
--- a/Remote/Glacier.hs
+++ b/Remote/Glacier.hs
@@ -85,7 +85,7 @@ glacierSetup mu mcreds c gc = do
glacierSetup' :: Bool -> UUID -> Maybe CredPair -> RemoteConfig -> RemoteGitConfig -> Annex (RemoteConfig, UUID)
glacierSetup' enabling u mcreds c gc = do
(c', encsetup) <- encryptionSetup c
- c'' <- setRemoteCredPair encsetup c' (AWS.creds u) mcreds
+ c'' <- setRemoteCredPair encsetup c' gc (AWS.creds u) mcreds
let fullconfig = c'' `M.union` defaults
unless enabling $
genVault fullconfig gc u
diff --git a/Remote/S3.hs b/Remote/S3.hs
index cf662c3d1..3ed46a2ad 100644
--- a/Remote/S3.hs
+++ b/Remote/S3.hs
@@ -124,7 +124,7 @@ s3Setup' new u mcreds c gc
defaulthost = do
(c', encsetup) <- encryptionSetup c
- c'' <- setRemoteCredPair encsetup c' (AWS.creds u) mcreds
+ c'' <- setRemoteCredPair encsetup c' gc (AWS.creds u) mcreds
let fullconfig = c'' `M.union` defaults
when new $
genBucket fullconfig gc u
@@ -132,7 +132,7 @@ s3Setup' new u mcreds c gc
archiveorg = do
showNote "Internet Archive mode"
- c' <- setRemoteCredPair noEncryptionUsed c (AWS.creds u) mcreds
+ c' <- setRemoteCredPair noEncryptionUsed c gc (AWS.creds u) mcreds
-- Ensure user enters a valid bucket name, since
-- this determines the name of the archive.org item.
let validbucket = replace " " "-" $
diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs
index 08b1a5496..413516e89 100644
--- a/Remote/WebDAV.hs
+++ b/Remote/WebDAV.hs
@@ -91,7 +91,7 @@ webdavSetup mu mcreds c gc = do
creds <- maybe (getCreds c' gc u) (return . Just) mcreds
testDav url creds
gitConfigSpecialRemote u c' "webdav" "true"
- c'' <- setRemoteCredPair encsetup c' (davCreds u) creds
+ c'' <- setRemoteCredPair encsetup c' gc (davCreds u) creds
return (c'', u)
-- Opens a http connection to the DAV server, which will be reused