Skip to content

Commit b760721

Browse files
dimblebyCopilot
andauthored
fix: add trailing slash to tag ref prefix in Git._clone (#10799)
The tag import prefix was b"refs/tags" (no trailing slash), so stripping it from e.g. b"refs/tags/v1.0" produced b"/v1.0" instead of b"v1.0", creating malformed local refs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ead674b commit b760721

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/poetry/vcs/git/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def _clone(cls, url: str, refspec: GitRefSpec, target: Path) -> Repo:
373373

374374
for base, prefix in {
375375
(Ref(b"refs/remotes/origin"), b"refs/heads/"),
376-
(Ref(b"refs/tags"), b"refs/tags"),
376+
(Ref(b"refs/tags"), b"refs/tags/"),
377377
}:
378378
try:
379379
local.refs.import_refs(

0 commit comments

Comments
 (0)