Skip to content

Commit 9c12b37

Browse files
authored
sync(git): Fix issue with @ in chomp_protocol() (#446)
See also: - #431 - vcs-python/vcspull#425
2 parents b72c398 + dd0147e commit 9c12b37

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ $ pip install --user --upgrade --pre libvcs
1515

1616
<!-- Maintainers, insert changes / features for the next release here -->
1717

18+
### Bug fixes
19+
20+
- Git Remote URLs: Fix bug that would cause git remotes with `@` to be chopped off after the
21+
protocol (#446, fixes #431)
22+
1823
### Packaging
1924

2025
- Move pytest configuration to `pyproject.toml` (#441)

src/libvcs/sync/git.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,9 +605,6 @@ def chomp_protocol(url: str) -> str:
605605
if "+" in url:
606606
url = url.split("+", 1)[1]
607607
scheme, netloc, path, query, frag = urlparse.urlsplit(url)
608-
rev = None
609-
if "@" in path:
610-
path, rev = path.rsplit("@", 1)
611608
url = urlparse.urlunsplit((scheme, netloc, path, query, ""))
612609
if url.startswith("ssh://[email protected]/"):
613610
url = url.replace("ssh://", "git+ssh://")

0 commit comments

Comments
 (0)