Fix direct mode's handling when modifications to non-annexed files are pulled from a remote. A bug prevented the files from being updated in the work tree, and this caused the modification to be reverted.

This commit is contained in:
Joey Hess 2013-12-12 15:57:09 -04:00
parent 814a2b9960
commit bef567c31f
3 changed files with 9 additions and 4 deletions

View file

@ -181,14 +181,14 @@ mergeDirectCleanup d oldsha newsha = do
go getsha getmode a araw (f, item)
| getsha item == nullSha = noop
| otherwise = void $
tryAnnex . maybe (araw f) (\k -> void $ a k f)
tryAnnex . maybe (araw f item) (\k -> void $ a k f)
=<< catKey (getsha item) (getmode item)
moveout k f = removeDirect k f
{- Files deleted by the merge are removed from the work tree.
- Empty work tree directories are removed, per git behavior. -}
moveout_raw f = liftIO $ do
moveout_raw f _item = liftIO $ do
nukeFile f
void $ tryIO $ removeDirectory $ parentDir f
@ -202,9 +202,9 @@ mergeDirectCleanup d oldsha newsha = do
{- Any new, modified, or renamed files were written to the temp
- directory by the merge, and are moved to the real work tree. -}
movein_raw f = liftIO $ do
movein_raw f item = liftIO $ do
createDirectoryIfMissing True $ parentDir f
void $ tryIO $ rename (d </> f) f
void $ tryIO $ rename (d </> getTopFilePath (DiffTree.file item)) f
{- If possible, converts a symlink in the working tree into a direct
- mode file. If the content is not available, leaves the symlink

3
debian/changelog vendored
View file

@ -25,6 +25,9 @@ git-annex (5.20131131) UNRELEASED; urgency=low
* repair: Improve repair of git-annex index file.
* repair: Remove damaged git-annex sync branches.
* status: Ignore new files that are gitignored.
* Fix direct mode's handling when modifications to non-annexed files
are pulled from a remote. A bug prevented the files from being updated
in the work tree, and this caused the modification to be reverted.
-- Joey Hess <joeyh@debian.org> Sun, 01 Dec 2013 13:57:58 -0400

View file

@ -51,3 +51,5 @@ git annex sync
ls
# End of transcript or log.
"""]]
> [[fixed|done]] --[[Joey]]