summaryrefslogtreecommitdiffstats
path: root/git_config.py
diff options
context:
space:
mode:
authorChristian Koestlin <christian.koestlin@gmail.com>2016-12-05 20:32:45 +0100
committerDavid Pursehouse <dpursehouse@collab.net>2017-08-29 20:16:08 +0000
commit2ec2a5d64c8f5bad7d2549720a928d4b52080d01 (patch)
treeabe11bc2843de6a4d6743ced40d248fa8c2c0abe /git_config.py
parent9ead97bb51f5b1ad1d0a45e0c5442f15e1e38fd7 (diff)
downloadgit-repo-2ec2a5d64c8f5bad7d2549720a928d4b52080d01.tar.gz
Fixed upload to remotes with the url ssh://hostname
Change-Id: I1d0dd4d3f90eac45205f6f4ca98a29b0babdbc3f
Diffstat (limited to 'git_config.py')
-rw-r--r--git_config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git_config.py b/git_config.py
index 8c247394..f4aa131a 100644
--- a/git_config.py
+++ b/git_config.py
@@ -620,7 +620,7 @@ class Remote(object):
620 u = self.review 620 u = self.review
621 if u.startswith('persistent-'): 621 if u.startswith('persistent-'):
622 u = u[len('persistent-'):] 622 u = u[len('persistent-'):]
623 if u.split(':')[0] not in ('http', 'https', 'sso'): 623 if u.split(':')[0] not in ('http', 'https', 'sso', 'ssh'):
624 u = 'http://%s' % u 624 u = 'http://%s' % u
625 if u.endswith('/Gerrit'): 625 if u.endswith('/Gerrit'):
626 u = u[:len(u) - len('/Gerrit')] 626 u = u[:len(u) - len('/Gerrit')]
@@ -636,7 +636,7 @@ class Remote(object):
636 host, port = os.environ['REPO_HOST_PORT_INFO'].split() 636 host, port = os.environ['REPO_HOST_PORT_INFO'].split()
637 self._review_url = self._SshReviewUrl(userEmail, host, port) 637 self._review_url = self._SshReviewUrl(userEmail, host, port)
638 REVIEW_CACHE[u] = self._review_url 638 REVIEW_CACHE[u] = self._review_url
639 elif u.startswith('sso:'): 639 elif u.startswith('sso:') or u.startswith('ssh:'):
640 self._review_url = u # Assume it's right 640 self._review_url = u # Assume it's right
641 REVIEW_CACHE[u] = self._review_url 641 REVIEW_CACHE[u] = self._review_url
642 elif 'REPO_IGNORE_SSH_INFO' in os.environ: 642 elif 'REPO_IGNORE_SSH_INFO' in os.environ: