mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Use file:// protocol for cloning under test
This commit is contained in:
parent
e76bc17f53
commit
989bcfe9ca
4 changed files with 7 additions and 3 deletions
|
|
@ -37,8 +37,11 @@ def in_env(repo_cmd_runner):
|
|||
def guess_go_dir(remote_url):
|
||||
if remote_url.endswith('.git'):
|
||||
remote_url = remote_url[:-1 * len('.git')]
|
||||
looks_like_url = (
|
||||
not remote_url.startswith('file://') and
|
||||
('//' in remote_url or '@' in remote_url)
|
||||
)
|
||||
remote_url = remote_url.replace(':', '/')
|
||||
looks_like_url = '//' in remote_url or '@' in remote_url
|
||||
if looks_like_url:
|
||||
_, _, remote_url = remote_url.rpartition('//')
|
||||
_, _, remote_url = remote_url.rpartition('@')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue