From 9c69417f4bb261eb6b5f14680e697b049bc6f79d Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 22 Oct 2023 07:30:54 -0500 Subject: [PATCH 1/2] sync(git): Fix issue with @ in chomp_protocol This would cause Git SSH URLs to be chopped off in set_remote() See also: https://github.com/vcs-python/libvcs/issues/431 --- src/libvcs/sync/git.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/libvcs/sync/git.py b/src/libvcs/sync/git.py index 2d261ff36..6ea306b35 100644 --- a/src/libvcs/sync/git.py +++ b/src/libvcs/sync/git.py @@ -605,9 +605,6 @@ def chomp_protocol(url: str) -> str: if "+" in url: url = url.split("+", 1)[1] scheme, netloc, path, query, frag = urlparse.urlsplit(url) - rev = None - if "@" in path: - path, rev = path.rsplit("@", 1) url = urlparse.urlunsplit((scheme, netloc, path, query, "")) if url.startswith("ssh://git@github.com/"): url = url.replace("ssh://", "git+ssh://") From dd0147ebe245da03c6fb06788633f13dcc0393d4 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 22 Oct 2023 07:52:14 -0500 Subject: [PATCH 2/2] docs(CHANGES): Note fix for chomped Git Remote URLs --- CHANGES | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index f39c9998c..a25f4b513 100644 --- a/CHANGES +++ b/CHANGES @@ -15,6 +15,11 @@ $ pip install --user --upgrade --pre libvcs +### Bug fixes + +- Git Remote URLs: Fix bug that would cause git remotes with `@` to be chopped off after the + protocol (#446, fixes #431) + ### Packaging - Move pytest configuration to `pyproject.toml` (#441)