gitfs: Support ssh:// URLs for dulwich

This commit is contained in:
Erik Johnson 2015-02-24 19:59:06 -06:00
parent 852c29871f
commit 256786cc94

View File

@ -899,6 +899,9 @@ def _init_dulwich(rp_, repo_url, ssl_verify):
successful, otherwise return None. Also return a boolean that will tell
init() whether a new repo was initialized.
'''
if repo_url.startswith('ssh://'):
# Dulwich will throw an error if 'ssh' is used.
repo_url = 'git+' + repo_url
new = False
if not os.listdir(rp_):
# Repo cachedir is empty, initialize a new repo there