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.
This commit is contained in:
Joey Hess 2021-11-04 15:20:26 -04:00
parent b25a138e22
commit afe327ac49
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -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 ->