summaryrefslogtreecommitdiff
path: root/Command/Watch.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-13 00:57:48 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-13 00:57:48 -0400
commitab076b2e818e616c1049ec1119d77ca2ff2e3a17 (patch)
treebc9728579c58cef00a954a3e3a681976ecb57a6b /Command/Watch.hs
parentda62edb42af02ce34e9ea69edcd8ec2f30cdd625 (diff)
move comment
Diffstat (limited to 'Command/Watch.hs')
-rw-r--r--Command/Watch.hs13
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