Skip to content

Commit bf63845

Browse files
committed
Fix the git URL regex which may incorrectly match a Windows path as git URL
E.g. c:/temp/pytest-of-Screamer/pytest-8/test_import_after_add_git1_0/test3.git
1 parent dd543b7 commit bf63845

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mbed/mbed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
regex_url_ref = r'^(.*/([\w.+-]+)(?:\.\w+)?)/?(?:#(.*))?$'
106106

107107
# git url (no #rev)
108-
regex_git_url = r'^(git\://|ssh\://|https?\://|)(([^/:@]+)(\:([^/:@]+))?@)?([^/:]+)[:/](.+?)(\.git|\/?)$'
108+
regex_git_url = r'^(git\://|ssh\://|https?\://|)(([^/:@]+)(\:([^/:@]+))?@)?([^/:]{3,})[:/](.+?)(\.git|\/?)$'
109109
# hg url (no #rev)
110110
regex_hg_url = r'^(file|ssh|https?)://([^/:]+)/([^/]+)/?([^/]+?)?$'
111111

0 commit comments

Comments
 (0)