diff options
author | Joey Hess <joey@kitenet.net> | 2011-05-15 02:02:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-05-15 02:02:46 -0400 |
commit | 56bc3e95cabb85e5f23e30b453f90438c33efbb8 (patch) | |
tree | c13ac69cfc2b5ba9582aa5c1ebd427bc0d337b16 /Command/Unannex.hs | |
parent | b400984ddf9aeb24c3d67e87cfeb29470618636c (diff) |
refactor some boilerplate
Diffstat (limited to 'Command/Unannex.hs')
-rw-r--r-- | Command/Unannex.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Command/Unannex.hs b/Command/Unannex.hs index 94db500c6..0a5381d56 100644 --- a/Command/Unannex.hs +++ b/Command/Unannex.hs @@ -43,16 +43,16 @@ start file = isAnnexed file $ \(key, backend) -> do Annex.changeState $ \s -> s { Annex.force = True } showStart "unannex" file - return $ Just $ perform file key backend - else return Nothing + next $ perform file key backend + else stop perform :: FilePath -> Key -> Backend Annex -> CommandPerform perform file key backend = do -- force backend to always remove ok <- Backend.removeKey backend key (Just 0) if ok - then return $ Just $ cleanup file key - else return Nothing + then next $ cleanup file key + else stop cleanup :: FilePath -> Key -> CommandCleanup cleanup file key = do |