refactor some boilerplate

This commit is contained in:
Joey Hess 2011-05-15 02:02:46 -04:00
parent b400984ddf
commit 56bc3e95ca
31 changed files with 93 additions and 86 deletions

View file

@ -26,7 +26,7 @@ seek = [withFilesUnlocked start]
start :: CommandStartBackendFile
start (file, _) = do
showStart "lock" file
return $ Just $ perform file
next $ perform file
perform :: FilePath -> CommandPerform
perform file = do
@ -36,4 +36,4 @@ perform file = do
liftIO $ Git.run g "reset" [Params "-q --", File file]
-- checkout the symlink
liftIO $ Git.run g "checkout" [Param "--", File file]
return $ Just $ return True -- no cleanup needed
next $ return True -- no cleanup needed