diff options
author | Joey Hess <joey@kitenet.net> | 2013-05-14 13:51:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-05-14 13:51:14 -0400 |
commit | 280d35cb7d9f72acefc38d421fd935fe5abdb451 (patch) | |
tree | 49d6b70bc3d60ebb0fd1596ac5185657bfae399d /Remote | |
parent | 62382fa360e16c83eb33634367ede0b95e467c6e (diff) |
avoid running background transferinfo when ssh connection caching is not supported
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Git.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index 7c7540543..b741918ee 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -308,6 +308,8 @@ copyFromRemote' r key file dest - git-annex-shell transferinfo at the same time - git-annex-shell sendkey is running. - + - To avoid extra password prompts, this is only done when ssh + - connection caching is supported. - Note that it actually waits for rsync to indicate - progress before starting transferinfo, in order - to ensure ssh connection caching works and reuses @@ -316,7 +318,10 @@ copyFromRemote' r key file dest - Also note that older git-annex-shell does not support - transferinfo, so stderr is dropped and failure ignored. -} - feedprogressback a = do + feedprogressback a = ifM (isJust <$> sshCacheDir) + ( feedprogressback' a + , bracketIO noop (const noop) $ a const + feedprogressback' a = do u <- getUUID let fields = (Fields.remoteUUID, fromUUID u) : maybe [] (\f -> [(Fields.associatedFile, f)]) file |