check for direct mode file change when copying to a local git remote
This commit is contained in:
parent
a8c8c95435
commit
a6a5ed8121
2 changed files with 53 additions and 32 deletions
|
@ -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)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue