aboutsummaryrefslogtreecommitdiff
path: root/Remote/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-04-19 13:10:56 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-04-19 13:10:56 -0400
commitbf7e6f74dbadf02e7e908c368dacd480f1b92035 (patch)
tree37b5395b9bd37f53452360b7fcc112bbbb9afdc2 /Remote/Git.hs
parent07f7e6e8c60ab2bb4a1469cae9aed2358e21f515 (diff)
Fix duplicate progress meter display when downloading from a git remote over http with -J.
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r--Remote/Git.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 284d6a49c..a0992957c 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -418,8 +418,11 @@ lockKey r key callback
{- Tries to copy a key's content from a remote's annex to a file. -}
copyFromRemote :: Remote -> Key -> AssociatedFile -> FilePath -> MeterUpdate -> Annex (Bool, Verification)
-copyFromRemote r key file dest p = concurrentMetered (Just p) key $
- copyFromRemote' r key file dest
+copyFromRemote r key file dest p
+ | Git.repoIsHttp (repo r) = unVerified $
+ Annex.Content.downloadUrl key p (keyUrls r key) dest
+ | otherwise = concurrentMetered (Just p) key $
+ copyFromRemote' r key file dest
copyFromRemote' :: Remote -> Key -> AssociatedFile -> FilePath -> MeterUpdate -> Annex (Bool, Verification)
copyFromRemote' r key file dest meterupdate
@@ -441,8 +444,6 @@ copyFromRemote' r key file dest meterupdate
| Git.repoIsSsh (repo r) = unVerified $ feedprogressback $ \p -> do
Ssh.rsyncHelper (Just (combineMeterUpdate meterupdate p))
=<< Ssh.rsyncParamsRemote False r Download key dest file
- | Git.repoIsHttp (repo r) = unVerified $
- Annex.Content.downloadUrl key meterupdate (keyUrls r key) dest
| otherwise = error "copying from non-ssh, non-http remote not supported"
where
{- Feed local rsync's progress info back to the remote,
@@ -519,8 +520,7 @@ copyFromRemoteCheap r key af file
)
| Git.repoIsSsh (repo r) =
ifM (Annex.Content.preseedTmp key file)
- ( fst <$> concurrentMetered Nothing key
- (copyFromRemote' r key af file)
+ ( fst <$> copyFromRemote r key af file nullMeterUpdate
, return False
)
| otherwise = return False