aboutsummaryrefslogtreecommitdiff
path: root/Remote/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-11-16 20:27:01 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-11-16 20:27:01 -0400
commitd77b7936adc49a98172a16a3fea89fb2ad9fd642 (patch)
tree32bdb57950809be9dd6452f7c3d393e37fa6cefb /Remote/Git.hs
parent7d93cde25f86475d5374edd465b9572c50ae8353 (diff)
refactor
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r--Remote/Git.hs15
1 files changed, 2 insertions, 13 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 46b571a2e..d410db02f 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -641,19 +641,8 @@ rsyncOrCopyFile rsyncparams src dest p =
where
sameDeviceIds a b = (==) <$> getDeviceId a <*> getDeviceId b
getDeviceId f = deviceID <$> liftIO (getFileStatus $ parentDir f)
- docopy = liftIO $ bracket
- (forkIO $ watchfilesize zeroBytesProcessed)
- (void . tryIO . killThread)
- (const $ copyFileExternal CopyTimeStamps src dest)
- watchfilesize oldsz = do
- threadDelay 500000 -- 0.5 seconds
- v <- catchMaybeIO $ toBytesProcessed <$> getFileSize dest
- case v of
- Just sz
- | sz /= oldsz -> do
- p sz
- watchfilesize sz
- _ -> watchfilesize oldsz
+ docopy = liftIO $ watchFileSize dest p $
+ copyFileExternal CopyTimeStamps src dest
#endif
dorsync = Ssh.rsyncHelper (Just p) $
rsyncparams ++ [File src, File dest]