summaryrefslogtreecommitdiff
path: root/Annex/Queue.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-07 15:19:44 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-07 15:19:44 -0400
commit0a11b35d89104fa0b9653f15963d273a0d3585c3 (patch)
treef09621e0443bb526975543299adf1aefb64b47ef /Annex/Queue.hs
parent727158ff5546233e6f6b8bd8543c9514e3bd7af6 (diff)
extend Git.Queue to be able to queue more than simple git commands
While I was in there, I noticed and fixed a bug in the queue size calculations. It was never encountered only because Queue.add was only ever run with 1 file in the list.
Diffstat (limited to 'Annex/Queue.hs')
-rw-r--r--Annex/Queue.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Annex/Queue.hs b/Annex/Queue.hs
index d4a2c592e..9f2ad6791 100644
--- a/Annex/Queue.hs
+++ b/Annex/Queue.hs
@@ -6,7 +6,7 @@
-}
module Annex.Queue (
- add,
+ addCommand,
flush,
flushWhenFull
) where
@@ -17,10 +17,10 @@ import qualified Git.Queue
import Config
{- Adds a git command to the queue. -}
-add :: String -> [CommandParam] -> [FilePath] -> Annex ()
-add command params files = do
+addCommand :: String -> [CommandParam] -> [FilePath] -> Annex ()
+addCommand command params files = do
q <- get
- store =<< inRepo (Git.Queue.add q command params files)
+ store =<< inRepo (Git.Queue.addCommand command params files q)
{- Runs the queue if it is full. Should be called periodically. -}
flushWhenFull :: Annex ()