diff options
-rw-r--r-- | Command/Lock.hs | 6 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/bugs/unlock_then_lock_of_uncommitted_file_loses_it.mdwn | 6 |
3 files changed, 6 insertions, 7 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 diff --git a/debian/changelog b/debian/changelog index 9c38d1727..6b57a5580 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ git-annex (3.20120523) UNRELEASED; urgency=low * sync: Show a nicer message if a user tries to sync to a special remote. + * lock: Reset unlocked file to index, rather than to branch head. -- Joey Hess <joeyh@debian.org> Sun, 27 May 2012 20:55:29 -0400 diff --git a/doc/bugs/unlock_then_lock_of_uncommitted_file_loses_it.mdwn b/doc/bugs/unlock_then_lock_of_uncommitted_file_loses_it.mdwn index 69704bdd0..9c093de38 100644 --- a/doc/bugs/unlock_then_lock_of_uncommitted_file_loses_it.mdwn +++ b/doc/bugs/unlock_then_lock_of_uncommitted_file_loses_it.mdwn @@ -1,5 +1,7 @@ -Add a file, then unlock it, and then lock it. There is an error and the -symlink gets deleted. +Add a file (do not commit), then unlock it, and then lock it. +There is an error and the symlink gets deleted. The file will still be staged in the index, and the file content is still in the annex. --[[Joey]] + +[[done]] |