summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-06-18 17:23:36 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-06-18 17:23:36 -0400
commit9b4142c9e0ae2f6720b0af2012a3bc2b1046670f (patch)
treec4c338e96f44af74e838b3c24a8dd45ab186650e /Git
parent3493653759246ad0faea6370bb94290636973fba (diff)
Fix bug in annex.queuesize calculation that caused much more queue flushing than necessary.
The bug caused the size of the queue to be miscalculted; it was doubled each time an item was added. Commands run after approx 140 items rather than the intended 10240!
Diffstat (limited to 'Git')
-rw-r--r--Git/Queue.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Git/Queue.hs b/Git/Queue.hs
index 2ec3a2b1e..9b87a18ea 100644
--- a/Git/Queue.hs
+++ b/Git/Queue.hs
@@ -82,16 +82,16 @@ new lim = Queue 0 (fromMaybe defaultLimit lim) M.empty
-}
addCommand :: String -> [CommandParam] -> [FilePath] -> Queue -> Repo -> IO Queue
addCommand subcommand params files q repo =
- updateQueue action different (length newfiles) q repo
+ updateQueue action different (length files) q repo
where
key = actionKey action
action = CommandAction
{ getSubcommand = subcommand
, getParams = params
- , getFiles = newfiles
+ , getFiles = allfiles
}
- newfiles = map File files ++ maybe [] getFiles (M.lookup key $ items q)
-
+ allfiles = map File files ++ maybe [] getFiles (M.lookup key $ items q)
+
different (CommandAction { getSubcommand = s }) = s /= subcommand
different _ = True