go go gadget hlint

This commit is contained in:
Joey Hess 2011-09-20 23:24:48 -04:00
parent 9d26192350
commit 9f6b7935dd
21 changed files with 35 additions and 37 deletions

View file

@ -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] $

View file

@ -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