update keys database when adjusting branches

This commit is contained in:
Joey Hess 2016-02-29 17:27:19 -04:00
parent d7bd4d971d
commit 70e78cc53e
Failed to extract signature

View file

@ -26,6 +26,7 @@ import Annex.CatFile
import Annex.Link
import Git.HashObject
import Annex.AutoMerge
import qualified Database.Keys
data Adjustment = UnlockAdjustment
deriving (Show)
@ -35,7 +36,9 @@ adjustTreeItem UnlockAdjustment h ti@(TreeItem f m s)
| toBlobType m == Just SymlinkBlob = do
mk <- catKey s
case mk of
Just k -> Just . TreeItem f (fromBlobType FileBlob)
Just k -> do
Database.Keys.addAssociatedFile k f
Just . TreeItem f (fromBlobType FileBlob)
<$> hashPointerFile' h k
Nothing -> return (Just ti)
| otherwise = return (Just ti)