diff --git a/Annex/WorkTree.hs b/Annex/WorkTree.hs index 89d80c0cae..84ee39f4c4 100644 --- a/Annex/WorkTree.hs +++ b/Annex/WorkTree.hs @@ -14,6 +14,8 @@ import Annex.Version import Annex.Content import Annex.ReplaceFile import Annex.CurrentBranch +import Annex.InodeSentinal +import Utility.InodeCache import Config import Git.FilePath import qualified Git.Ref @@ -84,9 +86,13 @@ scanUnlockedFiles = whenM (isJust <$> inRepo Git.Branch.current) $ do whenM (inAnnex k) $ do f <- fromRepo $ fromTopFilePath tf destmode <- liftIO $ catchMaybeIO $ fileMode <$> getFileStatus f - replaceFile f $ \tmp -> + ic <- replaceFile f $ \tmp -> linkFromAnnex k tmp destmode >>= \case - LinkAnnexOk -> return () - LinkAnnexNoop -> return () - LinkAnnexFailed -> liftIO $ + LinkAnnexOk -> + withTSDelta (liftIO . genInodeCache tmp) + LinkAnnexNoop -> return Nothing + LinkAnnexFailed -> liftIO $ do writePointerFile tmp k destmode + return Nothing + liftIO $ print ic + maybe noop (restagePointerFile (Restage True) f) ic diff --git a/CHANGELOG b/CHANGELOG index 5a6c05cf89..a3978dc36e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,8 @@ git-annex (7.20181206) UNRELEASED; urgency=medium * webdav: When initializing, avoid trying to make a directory at the top of the webdav server, which could never accomplish anything and failed on nextcloud servers. (Reversion introduced in version 6.20170925.) + * Fix a case where upgrade to v7 caused git to think that unlocked files + were modified. -- Joey Hess Thu, 06 Dec 2018 13:39:16 -0400 diff --git a/doc/forum/why_are_all_those_files_modified/comment_5_ade6edafc859f53845fef5ba0c92fb1b._comment b/doc/forum/why_are_all_those_files_modified/comment_5_ade6edafc859f53845fef5ba0c92fb1b._comment new file mode 100644 index 0000000000..7c4ef13055 --- /dev/null +++ b/doc/forum/why_are_all_those_files_modified/comment_5_ade6edafc859f53845fef5ba0c92fb1b._comment @@ -0,0 +1,7 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 5""" + date="2018-12-11T17:03:38Z" + content=""" +Fixed the problem I described. +"""]]