mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Add parsed URL to PubGrubPackage
(#3426)
Avoid reparsing urls by storing the parsed parts across resolution on `PubGrubPackage`. Part 1 of #3408
This commit is contained in:
parent
5132c6a6e2
commit
0010954ca7
17 changed files with 194 additions and 79 deletions
|
@ -54,7 +54,7 @@ enum RefspecStrategy {
|
|||
impl GitReference {
|
||||
/// Creates a [`GitReference`] from an arbitrary revision string, which could represent a
|
||||
/// branch, tag, commit, or named ref.
|
||||
pub(crate) fn from_rev(rev: &str) -> Self {
|
||||
pub fn from_rev(rev: &str) -> Self {
|
||||
if rev.starts_with("refs/") {
|
||||
Self::NamedRef(rev.to_owned())
|
||||
} else if looks_like_commit_hash(rev) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue