summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-10-27 18:03:36 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-10-27 18:03:36 -0400
commitc879eb873ec2fda1ec7d76c0de27d9ace57ba6e7 (patch)
tree58c878428c97b3e142b763a900fcc1efb2ed98c8
parent1826b3bd67b8d3e146fd833d4cb500b03d1bf096 (diff)
do commit location changes to remote in copy --to
test suite pointed out that if a file was copied from B to A, and then A cloned, the clone ought to immediatly know it can get the file from A.
-rw-r--r--Remote/Git.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index fd3a61243..b0138901d 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -190,8 +190,11 @@ copyToRemote r key
let keysrc = gitAnnexLocation g key
params <- rsyncParams r
-- run copy from perspective of remote
- liftIO $ onLocal r $ Annex.Content.getViaTmp key $
- rsyncOrCopyFile params keysrc
+ liftIO $ onLocal r $ do
+ ok <- Annex.Content.getViaTmp key $
+ rsyncOrCopyFile params keysrc
+ Annex.Content.saveState
+ return ok
| Git.repoIsSsh r = do
g <- gitRepo
let keysrc = gitAnnexLocation g key