summaryrefslogtreecommitdiff
path: root/Command/PreCommit.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/PreCommit.hs')
-rw-r--r--Command/PreCommit.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/PreCommit.hs b/Command/PreCommit.hs
index a15510bd9..d4e5c04b9 100644
--- a/Command/PreCommit.hs
+++ b/Command/PreCommit.hs
@@ -28,7 +28,7 @@ start file = return $ Just $ perform file
perform :: FilePath -> SubCmdPerform
perform file = do
pairs <- Backend.chooseBackends [file]
- ok <- doSubCmd $ Command.Add.start $ pairs !! 0
+ ok <- doSubCmd $ Command.Add.start $ head pairs
if ok
then return $ Just $ cleanup file
else error $ "failed to add " ++ file ++ "; canceling commit"