summaryrefslogtreecommitdiff
path: root/Command/Lock.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-05-30 17:01:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-05-30 17:01:22 -0400
commit65977a558446fd4208b04614191b68bae838b044 (patch)
tree0ad6b92ccea3e4e228f93f906fd5bbfd2cba417e /Command/Lock.hs
parent96f00bafd033049ae257903f3815d296e3d335ff (diff)
lock: Reset unlocked file to index, rather than to branch head.
Resetting an unlocked file to the branch head failed if it had just been added, not committed, and unlocked, since the branch didbn't have it. The code was concerned about dropping any changes that might be staged in the index, but I cannot see why.
Diffstat (limited to 'Command/Lock.hs')
-rw-r--r--Command/Lock.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/Command/Lock.hs b/Command/Lock.hs
index b8aedb252..ab97b14bc 100644
--- a/Command/Lock.hs
+++ b/Command/Lock.hs
@@ -24,9 +24,5 @@ start file = do
perform :: FilePath -> CommandPerform
perform file = do
- liftIO $ removeFile file
- -- Checkout from HEAD to get rid of any changes that might be
- -- staged in the index, and get back to the previous symlink to
- -- the content.
- Annex.Queue.add "checkout" [Param "HEAD", Param "--"] [file]
+ Annex.Queue.add "checkout" [Param "--"] [file]
next $ return True -- no cleanup needed