diff options
author | Joey Hess <joey@kitenet.net> | 2013-03-11 12:56:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-03-11 12:56:47 -0400 |
commit | 8c5d75f6fbde080f3e3ad0766b5f3a1d4cee8d81 (patch) | |
tree | a74c92d131733dc0df454f71c6372edacc745aa8 /Annex/Content | |
parent | de5c24518b878322cd883ab4d4cfb46d07dbdce3 (diff) |
detect renames during commit, and .. um, do nothing special because it's lunch time
But I'm well set up to fast-track direct mode adds for renames now.
Diffstat (limited to 'Annex/Content')
-rw-r--r-- | Annex/Content/Direct.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index 164cb64a4..bbf6e310d 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -14,6 +14,7 @@ module Annex.Content.Direct ( updateInodeCache, writeInodeCache, compareInodeCaches, + compareInodeCachesWith, sameInodeCache, sameFileStatus, removeInodeCache, @@ -147,12 +148,15 @@ sameFileStatus key status = do {- If the inodes have changed, only the size and mtime are compared. -} compareInodeCaches :: InodeCache -> InodeCache -> Annex Bool compareInodeCaches x y - | x `compareStrong` y = return True + | compareStrong x y = return True | otherwise = ifM inodesChanged ( return $ compareWeak x y , return False ) +compareInodeCachesWith :: Annex InodeComparisonType +compareInodeCachesWith = ifM inodesChanged ( return Weakly, return Strongly ) + {- Some filesystems get new inodes each time they are mounted. - In order to work on such a filesystem, a sentinal file is used to detect - when the inodes have changed. |