annex.startupscan can be set to false to disable the assistant's startup scan.
This commit is contained in:
parent
7dab73db84
commit
a3fe8270ca
11 changed files with 46 additions and 28 deletions
|
@ -39,7 +39,7 @@ mergeThread = namedThread "Merger" $ do
|
|||
, modifyHook = changehook
|
||||
, errHook = errhook
|
||||
}
|
||||
void $ liftIO $ watchDir dir (const False) hooks id
|
||||
void $ liftIO $ watchDir dir (const False) True hooks id
|
||||
debug ["watching", dir]
|
||||
|
||||
type Handler = FilePath -> Assistant ()
|
||||
|
|
|
@ -35,7 +35,7 @@ transferWatcherThread = namedThread "TransferWatcher" $ do
|
|||
, modifyHook = modifyhook
|
||||
, errHook = errhook
|
||||
}
|
||||
void $ liftIO $ watchDir dir (const False) hooks id
|
||||
void $ liftIO $ watchDir dir (const False) True hooks id
|
||||
debug ["watching for transfers"]
|
||||
|
||||
type Handler = FilePath -> Assistant ()
|
||||
|
|
|
@ -50,8 +50,9 @@ upgradeWatcherThread urlrenderer = namedThread "UpgradeWatcher" $ do
|
|||
let dir = parentDir flagfile
|
||||
let depth = length (splitPath dir) + 1
|
||||
let nosubdirs f = length (splitPath f) == depth
|
||||
void $ liftIO $ watchDir dir nosubdirs hooks (startup mvar)
|
||||
void $ liftIO $ watchDir dir nosubdirs False hooks (startup mvar)
|
||||
-- Ignore bogus events generated during the startup scan.
|
||||
-- We ask the watcher to not generate them, but just to be safe..
|
||||
startup mvar scanner = do
|
||||
r <- scanner
|
||||
void $ swapMVar mvar Started
|
||||
|
|
|
@ -102,7 +102,8 @@ runWatcher = do
|
|||
, delDirHook = deldirhook
|
||||
, errHook = errhook
|
||||
}
|
||||
handle <- liftIO $ watchDir "." ignored hooks startup
|
||||
scanevents <- liftAnnex $ annexStartupScan <$> Annex.getGitConfig
|
||||
handle <- liftIO $ watchDir "." ignored scanevents hooks startup
|
||||
debug [ "watching", "."]
|
||||
|
||||
{- Let the DirWatcher thread run until signalled to pause it,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue