aboutsummaryrefslogtreecommitdiff
path: root/Git/Queue.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-13 14:55:01 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-13 14:55:01 -0400
commit3b72782586f5f6872d00891f6b46f5a8cb654e7a (patch)
treeeedcc18e399d06aa77c6637264d7bad3836fe94b /Git/Queue.hs
parentc747c8e423afe272dcf045abf3f1e8c1f6985e5c (diff)
immediate queue flushing when annex.queuesize=1
Previously, it only flushed when the queue got larger than 1. Also, make the queue auto-flush when items are added, rather than needing to be flushed as a separate step. This simplifies the code and make it more efficient too, as it avoids needing to read the queue out of the state to check if it should be flushed.
Diffstat (limited to 'Git/Queue.hs')
-rw-r--r--Git/Queue.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Git/Queue.hs b/Git/Queue.hs
index 23533a14d..086b5a56f 100644
--- a/Git/Queue.hs
+++ b/Git/Queue.hs
@@ -137,7 +137,7 @@ merge origq newq = origq
{- Is a queue large enough that it should be flushed? -}
full :: Queue -> Bool
-full (Queue cur lim _) = cur > lim
+full (Queue cur lim _) = cur >= lim
{- Runs a queue on a git repository. -}
flush :: Queue -> Repo -> IO Queue