summaryrefslogtreecommitdiff
path: root/Command/PreCommit.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/PreCommit.hs')
-rw-r--r--Command/PreCommit.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/PreCommit.hs b/Command/PreCommit.hs
index 1db40f75f..d7f248713 100644
--- a/Command/PreCommit.hs
+++ b/Command/PreCommit.hs
@@ -27,13 +27,13 @@ seek = [withFilesToBeCommitted Command.Fix.start,
withFilesUnlockedToBeCommitted start]
start :: CommandStartBackendFile
-start pair = return $ Just $ perform pair
+start pair = next $ perform pair
perform :: BackendFile -> CommandPerform
perform pair@(file, _) = do
ok <- doCommand $ Command.Add.start pair
if ok
- then return $ Just $ cleanup file
+ then next $ cleanup file
else error $ "failed to add " ++ file ++ "; canceling commit"
cleanup :: FilePath -> CommandCleanup