fix last zombies in the assistant

Made Git.LsFiles return cleanup actions, and everything waits on
processes now, except of course for Seek.
This commit is contained in:
Joey Hess 2012-10-04 19:56:32 -04:00
parent f7f1d25df8
commit 47314c0fad
13 changed files with 59 additions and 39 deletions

View file

@ -228,10 +228,14 @@ withKeysReferencedM a = withKeysReferenced' () calla
calla k _ = a k
withKeysReferenced' :: v -> (Key -> v -> Annex v) -> Annex v
withKeysReferenced' initial a = go initial =<< files
withKeysReferenced' initial a = do
(files, clean) <- getfiles
r <- go initial files
liftIO $ void clean
return r
where
files = ifM isBareRepo
( return []
getfiles = ifM isBareRepo
( return ([], return True)
, do
top <- fromRepo Git.repoPath
inRepo $ LsFiles.inRepo [top]