simplified a bunch of Maybe handling

This commit is contained in:
Joey Hess 2011-05-15 02:49:43 -04:00
parent efa7f54405
commit cad0e1c8b7
19 changed files with 81 additions and 140 deletions

View file

@ -82,9 +82,8 @@ genRsyncOpts r = do
rsyncSetup :: UUID -> RemoteConfig -> Annex RemoteConfig
rsyncSetup u c = do
-- verify configuration is sane
let url = case M.lookup "rsyncurl" c of
Nothing -> error "Specify rsyncurl="
Just d -> d
let url = maybe (error "Specify rsyncurl=") id $
M.lookup "rsyncurl" c
c' <- encryptionSetup c
-- The rsyncurl is stored in git config, not only in this remote's