Skip to content

Commit afd9105

Browse files
committed
vcs: use peeled ref when retrieving tag revision
This is required to support incoming changes introduced in dulwich >=0.22.2. This change preserves current behaviour and ensures locks do not change when dulwich is updated.
1 parent 0ebfd63 commit afd9105

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/poetry/vcs/git/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def get_remote_url(repo: Repo, remote: str = "origin") -> str:
176176
@staticmethod
177177
def get_revision(repo: Repo) -> str:
178178
with repo:
179-
return repo.head().decode("utf-8")
179+
return repo.get_peeled(b"HEAD").decode("utf-8")
180180

181181
@classmethod
182182
def info(cls, repo: Repo | Path) -> GitRepoLocalInfo:

0 commit comments

Comments
 (0)