From 280d35cb7d9f72acefc38d421fd935fe5abdb451 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 14 May 2013 13:51:14 -0400 Subject: avoid running background transferinfo when ssh connection caching is not supported --- Remote/Git.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3