summaryrefslogtreecommitdiff
path: root/Remote/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-01-10 11:45:44 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-01-10 11:45:44 -0400
commitbf4c44daf628a980666cc86fabae9522375d09e8 (patch)
tree1c9fd190f8876ae02ea9128e71b355fc07df11e7 /Remote/Git.hs
parented882e5a45b92fef6dfe42c767aaa2c84ee54b62 (diff)
check for direct mode file change when copying to a local git remote
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r--Remote/Git.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index a5718e328..2ece2fb8e 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -331,13 +331,15 @@ copyFromRemoteCheap r key file
copyToRemote :: Remote -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool
copyToRemote r key file p
| not $ Git.repoIsUrl (repo r) =
- guardUsable (repo r) False $ commitOnCleanup r $ copylocal
+ guardUsable (repo r) False $ commitOnCleanup r $
+ copylocal =<< Annex.Content.prepSendAnnex key
| Git.repoIsSsh (repo r) = commitOnCleanup r $
Annex.Content.sendAnnex key noop $ \object ->
rsyncHelper (Just p) =<< rsyncParamsRemote r False key object file
| otherwise = error "copying to non-ssh repo not supported"
where
- copylocal = Annex.Content.sendAnnex key noop $ \object -> do
+ copylocal Nothing = return False
+ copylocal (Just (object, checksuccess)) = do
let params = rsyncParams r
u <- getUUID
-- run copy from perspective of remote
@@ -347,7 +349,7 @@ copyToRemote r key file p
ensureInitialized
download u key file noRetry $
Annex.Content.saveState True `after`
- Annex.Content.getViaTmp key
+ Annex.Content.getViaTmpChecked checksuccess key
(\d -> rsyncOrCopyFile params object d p)
)