diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-20 23:24:48 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-20 23:24:48 -0400 |
commit | 9f6b7935ddb3d5dcbe0b4b784dc8acd7288ddba6 (patch) | |
tree | 8b87227689a603d09ad9fdfd010b2a3b648c1a2f /Remote | |
parent | 9d26192350b9c7b0402720f6f29c99c24748f364 (diff) |
go go gadget hlint
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Git.hs | 4 | ||||
-rw-r--r-- | Remote/S3real.hs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index 9789a0625..d50899c67 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -81,7 +81,7 @@ tryGitConfigRead :: Git.Repo -> Annex Git.Repo tryGitConfigRead r | not $ M.null $ Git.configMap r = return r -- already read | Git.repoIsSsh r = store $ onRemote r (pipedconfig, r) "configlist" [] - | Git.repoIsHttp r = store $ safely $ geturlconfig + | Git.repoIsHttp r = store $ safely geturlconfig | Git.repoIsUrl r = return r | otherwise = store $ safely $ do onLocal r ensureInitialized @@ -101,7 +101,7 @@ tryGitConfigRead r geturlconfig = do s <- Url.get (Git.repoLocation r ++ "/config") - withTempFile "git-annex.tmp" $ \tmpfile -> \h -> do + withTempFile "git-annex.tmp" $ \tmpfile h -> do hPutStr h s hClose h pOpen ReadFromPipe "git" ["config", "--list", "--file", tmpfile] $ diff --git a/Remote/S3real.hs b/Remote/S3real.hs index 77b6b6ca4..cafa4f15a 100644 --- a/Remote/S3real.hs +++ b/Remote/S3real.hs @@ -95,7 +95,7 @@ s3Setup u c = handlehost $ M.lookup "host" c defaulthost = do c' <- encryptionSetup c - let fullconfig = M.union c' defaults + let fullconfig = c' `M.union` defaults genBucket fullconfig use fullconfig @@ -209,7 +209,7 @@ s3Bool (Left e) = s3Warning e s3Action :: Remote Annex -> a -> ((AWSConnection, String) -> Annex a) -> Annex a s3Action r noconn action = do - when (config r == Nothing) $ + when (isNothing $ config r) $ error $ "Missing configuration for special remote " ++ name r let bucket = M.lookup "bucket" $ fromJust $ config r conn <- s3Connection $ fromJust $ config r |