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:
parent
814a2b9960
commit
bef567c31f
3 changed files with 9 additions and 4 deletions
|
@ -181,14 +181,14 @@ mergeDirectCleanup d oldsha newsha = do
|
||||||
go getsha getmode a araw (f, item)
|
go getsha getmode a araw (f, item)
|
||||||
| getsha item == nullSha = noop
|
| getsha item == nullSha = noop
|
||||||
| otherwise = void $
|
| 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)
|
=<< catKey (getsha item) (getmode item)
|
||||||
|
|
||||||
moveout k f = removeDirect k f
|
moveout k f = removeDirect k f
|
||||||
|
|
||||||
{- Files deleted by the merge are removed from the work tree.
|
{- Files deleted by the merge are removed from the work tree.
|
||||||
- Empty work tree directories are removed, per git behavior. -}
|
- Empty work tree directories are removed, per git behavior. -}
|
||||||
moveout_raw f = liftIO $ do
|
moveout_raw f _item = liftIO $ do
|
||||||
nukeFile f
|
nukeFile f
|
||||||
void $ tryIO $ removeDirectory $ parentDir 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
|
{- Any new, modified, or renamed files were written to the temp
|
||||||
- directory by the merge, and are moved to the real work tree. -}
|
- 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
|
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
|
{- If possible, converts a symlink in the working tree into a direct
|
||||||
- mode file. If the content is not available, leaves the symlink
|
- mode file. If the content is not available, leaves the symlink
|
||||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -25,6 +25,9 @@ git-annex (5.20131131) UNRELEASED; urgency=low
|
||||||
* repair: Improve repair of git-annex index file.
|
* repair: Improve repair of git-annex index file.
|
||||||
* repair: Remove damaged git-annex sync branches.
|
* repair: Remove damaged git-annex sync branches.
|
||||||
* status: Ignore new files that are gitignored.
|
* 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
|
-- Joey Hess <joeyh@debian.org> Sun, 01 Dec 2013 13:57:58 -0400
|
||||||
|
|
||||||
|
|
|
@ -51,3 +51,5 @@ git annex sync
|
||||||
ls
|
ls
|
||||||
# End of transcript or log.
|
# End of transcript or log.
|
||||||
"""]]
|
"""]]
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue