From afe327ac4947d6d32ff888e7485509be03d9baaf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 4 Nov 2021 15:20:26 -0400 Subject: [PATCH] disable filter.annex.process in restagePointerFile This means git will run git-annex smudge --clean once per file that is restaged, which can be slow. But probably *not* as slow as git feeding all the content of annexed files you've gotten through a pipe to git-annex filter-process. The only time this is probably not ideal is after a drop of a bunch of files, when filter-process would be faster. --- Annex/Link.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Annex/Link.hs b/Annex/Link.hs index 878228788d..9e019d7d6a 100644 --- a/Annex/Link.hs +++ b/Annex/Link.hs @@ -221,10 +221,18 @@ restagePointerFile (Restage True) f orig = withTSDelta $ \tsd -> let updatetmpindex = do r' <- liftIO $ Git.Env.addGitEnv r Git.Index.indexEnv =<< Git.Index.indexEnvVal (toRawFilePath tmpindex) - -- Avoid git warning about CRLF munging. let r'' = r' { gitGlobalOpts = gitGlobalOpts r' ++ + -- Avoid git warning about CRLF munging. [ Param "-c" , Param $ "core.safecrlf=" ++ boolConfig False + -- Avoid using git-annex + -- filter-process, because git + -- pipes the content of annexed + -- files into it; using + -- git-annex smudge --clean is + -- probably faster. + , Param "-c" + , Param $ "filter.annex.process=" ] } runsGitAnnexChildProcessViaGit' r'' $ \r''' -> liftIO $ Git.UpdateIndex.refreshIndex r''' $ \feed ->