From 0cb34f3caacd0b42e9ad0851a702a9469b90a506 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 May 2013 17:11:02 -0400 Subject: [PATCH] update inode cache after copying content This was also tripped by the test suite's automatic conflict resolution test. Which also shows BTW that an unnecessary copy of content is done sometimes when merging in direct mode. Not going to try to speed that up now. --- Annex/Direct.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Annex/Direct.hs b/Annex/Direct.hs index 962c7595c1..dc09742bc9 100644 --- a/Annex/Direct.hs +++ b/Annex/Direct.hs @@ -198,9 +198,10 @@ toDirectGen k f = do locs <- filterM (\loc -> isNothing <$> getAnnexLinkTarget loc) =<< (filter (/= absf) <$> addAssociatedFile k f) case locs of - (loc:_) -> return $ Just $ + (loc:_) -> return $ Just $ do replaceFile f $ liftIO . void . copyFileExternal loc + updateInodeCache k f _ -> return Nothing {- Removes a direct mode file, while retaining its content in the annex