fix failure count memory leak
This is the last memory leak that prevents git-annex from running in constant space, as far as I can see. I can now run git annex find dummied up to repeatedly find the same file over and over, on millions olf files, and memory stays entirely constant.
This commit is contained in:
parent
4645f83678
commit
505d6b1a06
2 changed files with 8 additions and 9 deletions
|
@ -80,7 +80,9 @@ tryRun' errnum state cmd (a:as) = do
|
|||
a
|
||||
handle (Left err) = showerr err >> cont False state
|
||||
handle (Right (success, state')) = cont success state'
|
||||
cont success s = tryRun' (if success then errnum else errnum + 1) s cmd as
|
||||
cont success s = do
|
||||
let errnum' = if success then errnum else errnum + 1
|
||||
(tryRun' $! errnum') s cmd as
|
||||
showerr err = Annex.eval state $ do
|
||||
showErr err
|
||||
showEndFail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue