diff --git a/Annex/Link.hs b/Annex/Link.hs index d7353d7889..5b840bf730 100644 --- a/Annex/Link.hs +++ b/Annex/Link.hs @@ -35,6 +35,7 @@ import Utility.FileMode import Utility.InodeCache import Utility.Tmp.Dir import Utility.CopyFile +import qualified Database.Keys.Handle import qualified Utility.RawFilePath as R import qualified Data.ByteString as S @@ -202,6 +203,8 @@ restagePointerFile (Restage True) f orig = withTSDelta $ \tsd -> -- updated index file. runner :: Git.Queue.InternalActionRunner Annex runner = Git.Queue.InternalActionRunner "restagePointerFile" $ \r l -> do + liftIO . Database.Keys.Handle.flushDbQueue + =<< Annex.getState Annex.keysdbhandle realindex <- liftIO $ Git.Index.currentIndexFile r let lock = fromRawFilePath (Git.Index.indexFileLock realindex) lockindex = liftIO $ catchMaybeIO $ Git.LockFile.openLock' lock diff --git a/CHANGELOG b/CHANGELOG index ef2a84fc78..b91d85abe2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -36,6 +36,7 @@ git-annex (8.20201130) UNRELEASED; urgency=medium * Fix a bug that prevented git-annex init from working in a submodule. * Fix a bug in view filename generation when a metadata value ended with "/" (or ":" or "\" on Windows) + * adjust: Fix some bad behavior when unlocked files use URL keys. -- Joey Hess Mon, 04 Jan 2021 12:52:41 -0400 diff --git a/Command/Smudge.hs b/Command/Smudge.hs index ebf041018a..6286879634 100644 --- a/Command/Smudge.hs +++ b/Command/Smudge.hs @@ -255,8 +255,9 @@ updateSmudged restage = streamSmudged $ \k topf -> do f <- fromRepo (fromTopFilePath topf) whenM (inAnnex k) $ do obj <- calcRepo (gitAnnexLocation k) - unlessM (isJust <$> populatePointerFile restage k obj f) $ - liftIO (isPointerFile f) >>= \case + populatePointerFile restage k obj f >>= \case + Just ic -> Database.Keys.addInodeCaches k [ic] + Nothing -> liftIO (isPointerFile f) >>= \case Just k' | k' == k -> toplevelWarning False $ "unable to populate worktree file " ++ fromRawFilePath f _ -> noop