summaryrefslogtreecommitdiff
path: root/Annex/Direct.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-12 15:57:09 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-12 15:57:09 -0400
commit1cabf96c4b5f45bff9b318115cec109955a618f3 (patch)
tree942ed217d0895b301a871ef69987e03ff4e322b2 /Annex/Direct.hs
parent353bc9e7000b5ee78f69194151475f6eefc82bc0 (diff)
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.
Diffstat (limited to 'Annex/Direct.hs')
-rw-r--r--Annex/Direct.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index 5d4b6a402..340c5c475 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -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