plumb RemoteGitConfig through to decryptCipher

This commit is contained in:
Joey Hess 2016-05-23 17:27:15 -04:00
parent 22c174158c
commit b9ce477fa2
Failed to extract signature
16 changed files with 49 additions and 45 deletions

View file

@ -58,7 +58,7 @@ setRemoteCredPair encsetup c gc storage mcreds = case mcreds of
Just creds
| embedCreds c -> case credPairRemoteKey storage of
Nothing -> localcache creds
Just key -> storeconfig creds key =<< remoteCipher =<< localcache creds
Just key -> storeconfig creds key =<< flip remoteCipher gc =<< localcache creds
| otherwise -> localcache creds
where
localcache creds = do
@ -84,7 +84,7 @@ getRemoteCredPair c gc storage = maybe fromcache (return . Just) =<< fromenv
fromcache = maybe fromconfig (return . Just) =<< readCacheCredPair storage
fromconfig = case credPairRemoteKey storage of
Just key -> do
mcipher <- remoteCipher' c
mcipher <- remoteCipher' c gc
case (M.lookup key c, mcipher) of
(Nothing, _) -> return Nothing
(Just enccreds, Just (cipher, storablecipher)) ->