summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
Diffstat (limited to 'Remote')
-rw-r--r--Remote/Git.hs15
1 files changed, 9 insertions, 6 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