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.
This commit is contained in:
parent
7a6fb8ae4e
commit
48efa2d2d3
1 changed files with 3 additions and 6 deletions
|
@ -15,7 +15,6 @@ import Utility.ThreadLock
|
||||||
import qualified Annex
|
import qualified Annex
|
||||||
import qualified Command.Add as Add
|
import qualified Command.Add as Add
|
||||||
import qualified Git.Command
|
import qualified Git.Command
|
||||||
import qualified Annex.Queue
|
|
||||||
import qualified Backend
|
import qualified Backend
|
||||||
import Annex.Content
|
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
|
- 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!) -}
|
- now, rather than later (when it may have been already moved or deleted!) -}
|
||||||
onAdd :: FilePath -> Annex ()
|
onAdd :: FilePath -> Annex ()
|
||||||
onAdd file = doQuietSideAction $ do
|
onAdd file = void $ doCommand $ do
|
||||||
void $ doCommand $ do
|
showStart "add" file
|
||||||
showStart "add" file
|
next $ Add.perform file
|
||||||
next $ Add.perform file
|
|
||||||
Annex.Queue.flush
|
|
||||||
|
|
||||||
{- A symlink might be an arbitrary symlink, which is just added.
|
{- 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
|
- Or, if it is a git-annex symlink, ensure it points to the content
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue