flush the git queue when a new type of action is being added to it

This allows the queue to be used in a single process for multiple possibly
conflicting commands, like add and rm, without running them out of order.

This assumes that running the same git subcommand with different parameters
cannot itself conflict.
This commit is contained in:
Joey Hess 2012-06-04 20:41:22 -04:00
parent bd7857d903
commit 7a6fb8ae4e
2 changed files with 20 additions and 10 deletions

View file

@ -20,7 +20,7 @@ import Config
add :: String -> [CommandParam] -> [FilePath] -> Annex ()
add command params files = do
q <- get
store $ Git.Queue.add q command params files
store =<< inRepo (Git.Queue.add q command params files)
{- Runs the queue if it is full. Should be called periodically. -}
flushWhenFull :: Annex ()