summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-10 13:56:04 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-10 13:56:04 -0400
commitc5707c84d372fc668b957c5d0b224bcf524e04f1 (patch)
treeb27e9e47ab4d6ea54946403d2c80a585ffc2a410 /Annex
parente5f855b7f8e887f169c1bb086ef9a4f595dc767e (diff)
queue size fix
Increase queue size for update-index actions, because otherwise they'll never be flushed.
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Queue.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Annex/Queue.hs b/Annex/Queue.hs
index a7d4e153b..c019aed6c 100644
--- a/Annex/Queue.hs
+++ b/Annex/Queue.hs
@@ -9,7 +9,8 @@ module Annex.Queue (
addCommand,
addUpdateIndex,
flush,
- flushWhenFull
+ flushWhenFull,
+ size
) where
import Common.Annex
@@ -45,6 +46,10 @@ flush = do
q' <- inRepo $ Git.Queue.flush q
store q'
+{- Gets the size of the queue. -}
+size :: Annex Int
+size = Git.Queue.size <$> get
+
get :: Annex Git.Queue.Queue
get = maybe new return =<< getState repoqueue