diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-04 20:44:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-04 20:44:15 -0400 |
commit | 48efa2d2d34ec532345054d0054dd81cfc597895 (patch) | |
tree | 169891ab8e2607f68c79d7dda8a0be43a0cc30a5 /Command | |
parent | 7a6fb8ae4e455ea311213da50cc5e8cd6d5667b2 (diff) |
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.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Watch.hs | 9 |
1 files changed, 3 insertions, 6 deletions
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 |