diff options
author | Joey Hess <joey@kitenet.net> | 2012-11-30 00:55:59 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-11-30 00:55:59 -0400 |
commit | 3026baf7ba4941029f3fb50888b3fd3290f720d1 (patch) | |
tree | df34479c82189dde4d65453ee08a8195fb1bca59 /Remote/Rsync.hs | |
parent | df31307f2ce1b037b68f16f9cb0187cf1e3a7b6d (diff) |
avoid unnecessary Maybe
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r-- | Remote/Rsync.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs index a3ad21f73..2ad5482ec 100644 --- a/Remote/Rsync.hs +++ b/Remote/Rsync.hs @@ -38,7 +38,7 @@ remote = RemoteType { setup = rsyncSetup } -gen :: Git.Repo -> UUID -> Maybe RemoteConfig -> Annex Remote +gen :: Git.Repo -> UUID -> RemoteConfig -> Annex Remote gen r u c = do o <- genRsyncOpts r c cst <- remoteCost r expensiveRemoteCost @@ -56,7 +56,7 @@ gen r u c = do , hasKey = checkPresent r o , hasKeyCheap = False , whereisKey = Nothing - , config = Nothing + , config = M.empty , repo = r , localpath = if rsyncUrlIsPath $ rsyncUrl o then Just $ rsyncUrl o @@ -65,12 +65,12 @@ gen r u c = do , remotetype = remote } -genRsyncOpts :: Git.Repo -> Maybe RemoteConfig -> Annex RsyncOpts +genRsyncOpts :: Git.Repo -> RemoteConfig -> Annex RsyncOpts genRsyncOpts r c = do url <- getRemoteConfig r "rsyncurl" (error "missing rsyncurl") opts <- map Param . filter safe . words <$> getRemoteConfig r "rsync-options" "" - let escape = maybe True (\m -> M.lookup "shellescape" m /= Just "no") c + let escape = M.lookup "shellescape" c /= Just "no" return $ RsyncOpts url opts escape where safe o |