Skip to content

Commit

Permalink
fix(vcs) allow '+' in git url path (#765)
Browse files Browse the repository at this point in the history
  • Loading branch information
uhryniuk authored Oct 2, 2024
1 parent 929ec7a commit 4eb24d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/poetry/core/vcs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
USER = r"[a-zA-Z0-9_.-]+"
RESOURCE = r"[a-zA-Z0-9_.-]+"
PORT = r"\d+"
PATH = r"[%\w~.\-/\\\$]+"
PATH = r"[%\w~.\-\+/\\\$]+"
NAME = r"[%\w~.\-]+"
REV = r"[^@#]+?"
SUBDIR = r"[\w\-/\\]+"
Expand Down
12 changes: 12 additions & 0 deletions tests/vcs/test_vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,18 @@ def test_normalize_url(url: str, normalized: GitUrl) -> None:
None,
),
),
(
"git+ssh://[email protected]:sdispater/project/+git/my_repo.git",
ParsedUrl(
"ssh",
"git.example.com",
":sdispater/project/+git/my_repo.git",
"git",
None,
"my_repo",
None,
),
),
(
"git+ssh://[email protected]:sdispater/project/my_repo.git#subdirectory=project-dir",
ParsedUrl(
Expand Down

0 comments on commit 4eb24d9

Please sign in to comment.