Skip to content
Unverified Commit 22342346 authored by Jelmer Vernooij's avatar Jelmer Vernooij Committed by GitHub
Browse files

Fix AssertionError when cloning at annotated tag (#10719)

When cloning a Git repository at an annotated tag, if the peeled tag
reference (refs/tags/v1.0.0^{}) is not available in the fetch result,
Poetry would set HEAD to the tag object SHA instead of the commit SHA.
This caused reset_index() to fail with:
  AssertionError: assert isinstance(obj, Commit)

The fix peels tag objects recursively to extract the underlying commit
SHA before setting HEAD. This ensures HEAD always points to a Commit
object, not a Tag object.

Fixes python-poetry#10658
parent 197571e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment