added ifM and nuked 11 lines of code

no behavior changes
This commit is contained in:
Joey Hess 2012-03-14 17:43:34 -04:00
parent a4f72c9625
commit 60ab3d84e1
17 changed files with 151 additions and 162 deletions

View file

@ -131,13 +131,13 @@ fromOk src key
return $ u /= Remote.uuid src && any (== src) remotes
fromPerform :: Remote -> Bool -> Key -> CommandPerform
fromPerform src move key = moveLock move key $ do
ishere <- inAnnex key
if ishere
then handle move True
else do
ifM (inAnnex key)
( handle move True
, do
showAction $ "from " ++ Remote.name src
ok <- getViaTmp key $ Remote.retrieveKeyFile src key
handle move ok
)
where
handle _ False = stop -- failed
handle False True = next $ return True -- copy complete