diff options
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Watch.hs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Command/Watch.hs b/Command/Watch.hs index 22a534d45..6f85c124c 100644 --- a/Command/Watch.hs +++ b/Command/Watch.hs @@ -236,6 +236,11 @@ onAdd file = do {- 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 - before adding it. + - + - This is often called on symlinks that are already staged correctly. + - A symlink may have been deleted and being re-added, or added when + - the watcher was not running; so it always stages even symlinks that + - already exist. -} onAddSymlink :: Handler onAddSymlink file = go =<< Backend.lookupFile file @@ -250,13 +255,7 @@ onAddSymlink file = go =<< Backend.lookupFile file liftIO $ createSymbolicLink link file addlink link ) - {- This is often called on symlinks that are already staged - - correctly, especially during the startup scan. A symlink - - may have been deleted and re-added, or added when - - the watcher was not running; so it always stages - - even symlinks that already exist. - - - - So for speed, tries to reuse the existing blob for + {- For speed, tries to reuse the existing blob for - the symlink target. -} addlink link = do v <- catObjectDetails $ Ref $ ':':file |