]> dgit.raspbian.org Git - git-annex.git/commitdiff
disable filter.annex.process in restagePointerFile
authorJoey Hess <joeyh@joeyh.name>
Thu, 4 Nov 2021 19:20:26 +0000 (15:20 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 4 Nov 2021 19:20:26 +0000 (15:20 -0400)
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

index 878228788df195657ba3a8eac7a98e1e87b4ce03..9e019d7d6a9fe6111ba881506f20cf60ef67e81c 100644 (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 ->