From 48efa2d2d34ec532345054d0054dd81cfc597895 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jun 2012 20:44:15 -0400 Subject: avoid explicit queue flush The queue is still flushed on add, because each add event is handled by a separate Annex monad. That needs to be fixed to speed up add a lot. --- Command/Watch.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Command/Watch.hs') diff --git a/Command/Watch.hs b/Command/Watch.hs index 024d2c568..a3dc48b01 100644 --- a/Command/Watch.hs +++ b/Command/Watch.hs @@ -15,7 +15,6 @@ import Utility.ThreadLock import qualified Annex import qualified Command.Add as Add import qualified Git.Command -import qualified Annex.Queue import qualified Backend import Annex.Content @@ -67,11 +66,9 @@ run startstate a f = do - The git queue is immediately flushed, so the file is added to git - now, rather than later (when it may have been already moved or deleted!) -} onAdd :: FilePath -> Annex () -onAdd file = doQuietSideAction $ do - void $ doCommand $ do - showStart "add" file - next $ Add.perform file - Annex.Queue.flush +onAdd file = void $ doCommand $ do + showStart "add" file + next $ Add.perform file {- A symlink might be an arbitrary symlink, which is just added. - Or, if it is a git-annex symlink, ensure it points to the content -- cgit v1.2.3