summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Remote/Git.hs15
-rw-r--r--doc/design/assistant/syncing.mdwn5
2 files changed, 11 insertions, 9 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 49f040cc8..06e9ef1eb 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -269,12 +269,15 @@ copyToRemote r key file
params <- rsyncParams r
u <- getUUID
-- run copy from perspective of remote
- liftIO $ onLocal r $ do
- ensureInitialized
- download u key file $
- Annex.Content.saveState True `after`
- Annex.Content.getViaTmp key
- (rsyncOrCopyFile params keysrc)
+ liftIO $ onLocal r $ ifM (Annex.Content.inAnnex key)
+ ( return False
+ , do
+ ensureInitialized
+ download u key file $
+ Annex.Content.saveState True `after`
+ Annex.Content.getViaTmp key
+ (rsyncOrCopyFile params keysrc)
+ )
| Git.repoIsSsh r = commitOnCleanup r $ do
keysrc <- inRepo $ gitAnnexLocation key
rsyncHelper =<< rsyncParamsRemote r False key keysrc file
diff --git a/doc/design/assistant/syncing.mdwn b/doc/design/assistant/syncing.mdwn
index b9c6016b2..7a445b353 100644
--- a/doc/design/assistant/syncing.mdwn
+++ b/doc/design/assistant/syncing.mdwn
@@ -36,10 +36,9 @@ all the other git clones, at both the git level and the key/value level.
that already has the content) and loop, until the git-annex branches catch
up and break the cycle.
- Possible solution: C could record a download intent. (Similar to a failed
+ Possible solution: C could record a deferred download. (Similar to a failed
download, but with an unknown source.) When C next receives a git-annex
- branch push, it could try to requeue downloads that it has such intents
- registered for. **done**
+ branch push, it could try to queue deferred downloads. **done**
Note that this solution won't cover use cases the other does. For example,
connect a USB drive A; B syncs files from it, and then should pass them to C.