diff options
-rw-r--r-- | git_config.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/git_config.py b/git_config.py index 914b2924..fcd0446c 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -459,6 +459,11 @@ def init_ssh(): | |||
459 | def _open_ssh(host, port=None): | 459 | def _open_ssh(host, port=None): |
460 | global _ssh_master | 460 | global _ssh_master |
461 | 461 | ||
462 | # Bail before grabbing the lock if we already know that we aren't going to | ||
463 | # try creating new masters below. | ||
464 | if sys.platform in ('win32', 'cygwin'): | ||
465 | return False | ||
466 | |||
462 | # Acquire the lock. This is needed to prevent opening multiple masters for | 467 | # Acquire the lock. This is needed to prevent opening multiple masters for |
463 | # the same host when we're running "repo sync -jN" (for N > 1) _and_ the | 468 | # the same host when we're running "repo sync -jN" (for N > 1) _and_ the |
464 | # manifest <remote fetch="ssh://xyz"> specifies a different host from the | 469 | # manifest <remote fetch="ssh://xyz"> specifies a different host from the |
@@ -476,11 +481,8 @@ def _open_ssh(host, port=None): | |||
476 | if key in _master_keys: | 481 | if key in _master_keys: |
477 | return True | 482 | return True |
478 | 483 | ||
479 | if (not _ssh_master | 484 | if not _ssh_master or 'GIT_SSH' in os.environ: |
480 | or 'GIT_SSH' in os.environ | 485 | # Failed earlier, so don't retry. |
481 | or sys.platform in ('win32', 'cygwin')): | ||
482 | # failed earlier, or cygwin ssh can't do this | ||
483 | # | ||
484 | return False | 486 | return False |
485 | 487 | ||
486 | # We will make two calls to ssh; this is the common part of both calls. | 488 | # We will make two calls to ssh; this is the common part of both calls. |