diff options
author | Joey Hess <joey@kitenet.net> | 2011-10-11 14:43:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-10-11 14:43:45 -0400 |
commit | b505ba83e8b62a9ed0ec2fb96448c5fc801184d9 (patch) | |
tree | 664eb4af9f274dfc13eb9abfab86421ebe38e881 /Remote | |
parent | 025ded4a2dfb58a6ec0cb47b9d625d593a4e1977 (diff) |
minor syntax changes
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Git.hs | 2 | ||||
-rw-r--r-- | Remote/Helper/Encryptable.hs | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index 704bdc04d..183fcd854 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -48,7 +48,7 @@ gen r u _ = do (False, "") -> tryGitConfigRead r _ -> return r - u' <- getUUID r' + u' <- getRepoUUID r' let defcst = if cheap then cheapRemoteCost else expensiveRemoteCost cst <- remoteCost r' defcst diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs index 004b70408..85d269a21 100644 --- a/Remote/Helper/Encryptable.hs +++ b/Remote/Helper/Encryptable.hs @@ -78,8 +78,6 @@ remoteCipher c = maybe expensive cached =<< Annex.getState Annex.cipher {- Gets encryption Cipher, and encrypted version of Key. -} cipherKey :: Maybe RemoteConfig -> Key -> Annex (Maybe (Cipher, Key)) cipherKey Nothing _ = return Nothing -cipherKey (Just c) k = remoteCipher c >>= maybe (return Nothing) encrypt +cipherKey (Just c) k = maybe Nothing encrypt <$> remoteCipher c where - encrypt ciphertext = do - k' <- liftIO $ encryptKey ciphertext k - return $ Just (ciphertext, k') + encrypt ciphertext = Just (ciphertext, encryptKey ciphertext k) |