aboutsummaryrefslogtreecommitdiff
path: root/Command/Lock.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/Lock.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/Lock.hs')
-rw-r--r--Command/Lock.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Command/Lock.hs b/Command/Lock.hs
index 00a553e95..a3a39a907 100644
--- a/Command/Lock.hs
+++ b/Command/Lock.hs
@@ -14,6 +14,7 @@ import Command
import Messages
import qualified Annex
import qualified GitRepo as Git
+import Utility
command :: [Command]
command = [Command "lock" paramPath seek "undo unlock command"]
@@ -32,7 +33,7 @@ perform file = do
liftIO $ removeFile file
g <- Annex.gitRepo
-- first reset the file to drop any changes checked into the index
- liftIO $ Git.run g ["reset", "-q", "--", file]
+ liftIO $ Git.run g "reset" [Params "-q --", File file]
-- checkout the symlink
- liftIO $ Git.run g ["checkout", "--", file]
+ liftIO $ Git.run g "checkout" [Param "--", File file]
return $ Just $ return True -- no cleanup needed