Allow conflicting Git URLs that refer to the same commit SHA (#2769)
## Summary This PR leverages our lookahead direct URL resolution to significantly improve the range of Git URLs that we can accept (e.g., if a user provides the same requirement, once as a direct dependency, and once as a tag). We did some of this in #2285, but the solution here is more general and works for arbitrary transitive URLs. Closes https://github.com/astral-sh/uv/issues/2614.
This commit is contained in:
@@ -91,6 +91,12 @@ impl Hash for CanonicalUrl {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<CanonicalUrl> for Url {
|
||||
fn from(value: CanonicalUrl) -> Self {
|
||||
value.0
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for CanonicalUrl {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
std::fmt::Display::fmt(&self.0, f)
|
||||
|
||||
Reference in New Issue
Block a user