optimise direct mode startup scan

A recent change made existing symlinks be re-staged. That does not need to
be done during the startup scan though.
This commit is contained in:
Joey Hess 2013-04-24 21:20:29 -04:00
parent 46529c0129
commit a9081ae473

View file

@ -203,9 +203,12 @@ onAddDirect symlinkssupported matcher file fs = do
- really modified, but it might have - really modified, but it might have
- just been deleted and been put back, - just been deleted and been put back,
- so it symlink is restaged to make sure. -} - so it symlink is restaged to make sure. -}
( do ( ifM (scanComplete <$> getDaemonStatus)
link <- liftAnnex $ inRepo $ gitAnnexLink file key ( do
addLink file link (Just key) link <- liftAnnex $ inRepo $ gitAnnexLink file key
addLink file link (Just key)
, noChange
)
, guardSymlinkStandin (Just key) $ do , guardSymlinkStandin (Just key) $ do
debug ["changed direct", file] debug ["changed direct", file]
liftAnnex $ changedDirect key file liftAnnex $ changedDirect key file