mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-17 22:07:47 +00:00
Assume git+
prefix when URLs end in .git
(#5868)
## Summary Right now, this applies _everywhere_, so the following also works: ``` pip install "elmer-circuitbuilder @ https://github.com/ElmerCSC/elmer_circuitbuilder.git" ``` I actually think that's ok? Closes https://github.com/astral-sh/uv/issues/5866.
This commit is contained in:
parent
dceba77ff7
commit
9a80dfeed4
4 changed files with 89 additions and 1 deletions
|
@ -347,6 +347,11 @@ impl TryFrom<Url> for ParsedUrl {
|
|||
message: "Unknown scheme",
|
||||
}),
|
||||
}
|
||||
} else if Path::new(url.path())
|
||||
.extension()
|
||||
.is_some_and(|ext| ext.eq_ignore_ascii_case("git"))
|
||||
{
|
||||
Ok(Self::Git(ParsedGitUrl::try_from(url)?))
|
||||
} else if url.scheme().eq_ignore_ascii_case("file") {
|
||||
let path = url
|
||||
.to_file_path()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue