summaryrefslogtreecommitdiff
path: root/Command/PreCommit.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-02-28 16:10:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-02-28 16:18:55 -0400
commitfcdc4797a9ab2b792a9bb20f2ca9802b8f6d5a1e (patch)
tree0471848c11df7c1481d8c735eab1280d7684eddc /Command/PreCommit.hs
parent7e5678bcf7cd78bd04520117201be37dc9d4d544 (diff)
use ShellParam type
So, I have a type checked safe handling of filenames starting with dashes, throughout the code.
Diffstat (limited to 'Command/PreCommit.hs')
-rw-r--r--Command/PreCommit.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/PreCommit.hs b/Command/PreCommit.hs
index 750997f54..d2f696434 100644
--- a/Command/PreCommit.hs
+++ b/Command/PreCommit.hs
@@ -15,6 +15,7 @@ import qualified GitRepo as Git
import qualified Command.Add
import qualified Command.Fix
import Messages
+import Utility
command :: [Command]
command = [Command "pre-commit" paramPath seek "run by git pre-commit hook"]
@@ -41,6 +42,6 @@ cleanup file = do
-- drop that and run command queued by Add.state to
-- stage the symlink
g <- Annex.gitRepo
- liftIO $ Git.run g ["reset", "-q", "--", file]
+ liftIO $ Git.run g "reset" [Params "-q --", File file]
Annex.queueRun
return True