Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
7d5934e5
Unverified
Commit
7d5934e5
authored
Feb 11, 2020
by
finswimmer
Committed by
GitHub
Feb 11, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2018 from amarshall/fix-git-url-pattern
Fix non-compliant Git URL matching
parents
ed443425
73488935
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
poetry/vcs/git.py
+2
-2
tests/vcs/test_git.py
+16
-0
No files found.
poetry/vcs/git.py
View file @
7d5934e5
...
@@ -12,8 +12,8 @@ pattern_formats = {
...
@@ -12,8 +12,8 @@ pattern_formats = {
"user"
:
r"[a-zA-Z0-9_.-]+"
,
"user"
:
r"[a-zA-Z0-9_.-]+"
,
"resource"
:
r"[a-zA-Z0-9_.-]+"
,
"resource"
:
r"[a-zA-Z0-9_.-]+"
,
"port"
:
r"\d+"
,
"port"
:
r"\d+"
,
"path"
:
r"[\w\-/\\]+"
,
"path"
:
r"[\w
~.
\-/\\]+"
,
"name"
:
r"[\w\-]+"
,
"name"
:
r"[\w
~.
\-]+"
,
"rev"
:
r"[^@#]+"
,
"rev"
:
r"[^@#]+"
,
}
}
...
...
tests/vcs/test_git.py
View file @
7d5934e5
...
@@ -21,6 +21,10 @@ from poetry.vcs.git import ParsedUrl
...
@@ -21,6 +21,10 @@ from poetry.vcs.git import ParsedUrl
GitUrl
(
"https://user@hostname/project/blah.git"
,
None
),
GitUrl
(
"https://user@hostname/project/blah.git"
,
None
),
),
),
(
(
"git+https://user@hostname/project~_-.foo/blah~_-.bar.git"
,
GitUrl
(
"https://user@hostname/project~_-.foo/blah~_-.bar.git"
,
None
),
),
(
"git+https://user@hostname:project/blah.git"
,
"git+https://user@hostname:project/blah.git"
,
GitUrl
(
"https://user@hostname/project/blah.git"
,
None
),
GitUrl
(
"https://user@hostname/project/blah.git"
,
None
),
),
),
...
@@ -99,6 +103,18 @@ def test_normalize_url(url, normalized):
...
@@ -99,6 +103,18 @@ def test_normalize_url(url, normalized):
),
),
),
),
(
(
"git+https://user@hostname/project~_-.foo/blah~_-.bar.git"
,
ParsedUrl
(
"https"
,
"hostname"
,
"/project~_-.foo/blah~_-.bar.git"
,
"user"
,
None
,
"blah~_-.bar"
,
None
,
),
),
(
"git+https://user@hostname:project/blah.git"
,
"git+https://user@hostname:project/blah.git"
,
ParsedUrl
(
ParsedUrl
(
"https"
,
"hostname"
,
":project/blah.git"
,
"user"
,
None
,
"blah"
,
None
"https"
,
"hostname"
,
":project/blah.git"
,
"user"
,
None
,
"blah"
,
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment