This commit is contained in:
Joey Hess 2011-09-15 16:57:02 -04:00
parent 35145202d2
commit 5ff04bf2af
7 changed files with 18 additions and 12 deletions

View file

@ -10,6 +10,7 @@ module Command.PreCommit where
import Command
import qualified Command.Add
import qualified Command.Fix
import Backend
command :: [Command]
command = [repoCommand "pre-commit" paramPaths seek "run by git pre-commit hook"]
@ -24,7 +25,7 @@ start :: BackendFile -> CommandStart
start p = next $ perform p
perform :: BackendFile -> CommandPerform
perform pair@(file, _) = do
perform pair@(_, file) = do
ok <- doCommand $ Command.Add.start pair
if ok
then next $ return True