queueing of internal IO actions on files

This would be better if getInternalFiles were
more polymorphic, but I can't see a good
way to accomplish that without messing with Data.Typeable,
which seemed like overkill.

Reverted CommandAction back to the simpler version.

This commit was sponsored by Eric Drechsel on Patreon.
This commit is contained in:
Joey Hess 2018-08-17 13:24:52 -04:00
parent c5a8abb130
commit 82c5dd8a01
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 46 additions and 28 deletions

View file

@ -9,7 +9,7 @@
module Annex.Queue (
addCommand,
addCommandCond,
addInternalAction,
addUpdateIndex,
flush,
flushWhenFull,
@ -30,11 +30,11 @@ addCommand command params files = do
store <=< flushWhenFull <=< inRepo $
Git.Queue.addCommand command params files q
addCommandCond :: String -> [CommandParam] -> [(FilePath, IO Bool)] -> Annex ()
addCommandCond command params files = do
addInternalAction :: InternalActionRunner -> [(FilePath, IO Bool)] -> Annex ()
addInternalAction runner files = do
q <- get
store <=< flushWhenFull <=< inRepo $
Git.Queue.addCommandCond command params files q
Git.Queue.addInternalAction runner files q
{- Adds an update-index stream to the queue. -}
addUpdateIndex :: Git.UpdateIndex.Streamer -> Annex ()