aboutsummaryrefslogtreecommitdiff
path: root/Remote/External.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-09-30 13:17:49 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-09-30 13:17:49 -0400
commit9bdcbd84e505a91b54c3a8193f877f7b2d721c63 (patch)
treee67b915762279be1e56bdcf62363f5d34adccfc1 /Remote/External.hs
parentf83e0a720f9bb0c5a46b996a4a7c705c3a0587b2 (diff)
remove unnecessary mvar
Diffstat (limited to 'Remote/External.hs')
-rw-r--r--Remote/External.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Remote/External.hs b/Remote/External.hs
index 13c46585b..b10977b6d 100644
--- a/Remote/External.hs
+++ b/Remote/External.hs
@@ -242,13 +242,13 @@ handleRequest' lck external req mp responsehandler
send $ VALUE value
handleRemoteRequest (SETCREDS setting login password) = do
c <- liftIO $ atomically $ readTMVar $ externalConfig external
- gc <- liftIO $ atomically $ readTMVar $ externalGitConfig external
+ let gc = externalGitConfig external
c' <- setRemoteCredPair encryptionAlreadySetup c gc (credstorage setting) $
Just (login, password)
void $ liftIO $ atomically $ swapTMVar (externalConfig external) c'
handleRemoteRequest (GETCREDS setting) = do
c <- liftIO $ atomically $ readTMVar $ externalConfig external
- gc <- liftIO $ atomically $ readTMVar $ externalGitConfig external
+ let gc = externalGitConfig external
creds <- fromMaybe ("", "") <$>
getRemoteCredPair c gc (credstorage setting)
send $ CREDS (fst creds) (snd creds)