diff options
author | Joey Hess <joey@kitenet.net> | 2012-12-18 15:04:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-12-18 15:04:44 -0400 |
commit | 10d77d95f454a2fb2806c031a14344dd7cdea006 (patch) | |
tree | b9ba63e2f844031d4fd1d8248e5b01e7b5be7902 /Annex/Content | |
parent | 19e46a374225bc37131454774f20da4c6a7779d9 (diff) |
direct mode merging works!
Automatic merge resoltion code needs to be fixed to preserve objects from
direct mode files.
Diffstat (limited to 'Annex/Content')
-rw-r--r-- | Annex/Content/Direct.hs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index 66aa2e9d5..5e33a8951 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -9,7 +9,6 @@ module Annex.Content.Direct ( associatedFiles, removeAssociatedFile, addAssociatedFile, - updateAssociatedFiles, goodContent, updateCache, recordedCache, @@ -23,11 +22,7 @@ module Annex.Content.Direct ( import Common.Annex import qualified Git -import qualified Git.DiffTree as DiffTree -import Git.Sha -import Annex.CatFile import Utility.TempFile -import Utility.FileMode import Logs.Location import System.Posix.Types @@ -70,23 +65,6 @@ addAssociatedFile key file = changeAssociatedFiles key $ \files -> then files else file:files -{- Uses git diff-tree to find files changed between two tree Shas, and - - updates the associated file mappings, efficiently. -} -updateAssociatedFiles :: Git.Sha -> Git.Sha -> Annex () -updateAssociatedFiles oldsha newsha = do - (items, cleanup) <- inRepo $ DiffTree.diffTree oldsha newsha - forM_ items update - void $ liftIO $ cleanup - where - update item = do - go DiffTree.dstsha DiffTree.dstmode addAssociatedFile - go DiffTree.srcsha DiffTree.srcmode removeAssociatedFile - where - go getsha getmode a = - when (getsha item /= nullSha && isSymLink (getmode item)) $ do - key <- catKey (getsha item) - maybe noop (\k -> void $ a k $ DiffTree.file item) key - {- Checks if a file in the tree, associated with a key, has not been modified. - - To avoid needing to fsck the file's content, which can involve an |