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
Loading
Please register or sign in to comment