Periodically flush git command queue, to avoid boating memory usage too much.

Since the queue is flushed in between subcommand actions being run,
there should be no issues with actions that expect to queue up some stuff
and have it run after they do other stuff. So I didn't have to audit for
such assumptions.
This commit is contained in:
Joey Hess 2011-04-07 13:59:31 -04:00
parent 77f45e4e45
commit bc51387e6d
14 changed files with 101 additions and 59 deletions

View file

@ -11,6 +11,7 @@ import Control.Monad.State (liftIO)
import Command
import qualified Annex
import qualified AnnexQueue
import qualified GitRepo as Git
import qualified Command.Add
import qualified Command.Fix
@ -42,5 +43,5 @@ cleanup file = do
-- stage the symlink
g <- Annex.gitRepo
liftIO $ Git.run g "reset" [Params "-q --", File file]
Annex.queueRun
AnnexQueue.flush True
return True