summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-04-24 21:20:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-04-24 21:20:29 -0400
commitd5b88303c12b0897af4bc21500ed168f52e64322 (patch)
treecb296cd3dd569245af10a87c8368abb37733eab7
parent76bef32b5e6c84183d8974f91749592a3ada8c9d (diff)
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.
-rw-r--r--Assistant/Threads/Watcher.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs
index 58c4c2e30..88efa39d8 100644
--- a/Assistant/Threads/Watcher.hs
+++ b/Assistant/Threads/Watcher.hs
@@ -203,9 +203,12 @@ onAddDirect symlinkssupported matcher file fs = do
- really modified, but it might have
- just been deleted and been put back,
- so it symlink is restaged to make sure. -}
- ( do
- link <- liftAnnex $ inRepo $ gitAnnexLink file key
- addLink file link (Just key)
+ ( ifM (scanComplete <$> getDaemonStatus)
+ ( do
+ link <- liftAnnex $ inRepo $ gitAnnexLink file key
+ addLink file link (Just key)
+ , noChange
+ )
, guardSymlinkStandin (Just key) $ do
debug ["changed direct", file]
liftAnnex $ changedDirect key file