mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-11 11:02:04 +00:00
Respect pip-like Git branch, tag, and commit references (#297)
We need to parse revisions out from URLs like `MyProject @ git+https://git.example.com/MyProject.git@v1.0`, per [VCS Support](https://pip.pypa.io/en/stable/topics/vcs-support/). Cargo has the advantage that it uses a TOML table in its configuration, so the user has to specify whether they're fetching a commit, a tag, a branch, etc. We have to instead assume that anything that isn't clearly a commit is _either_ a branch or a tag. Closes https://github.com/astral-sh/puffin/issues/296.
This commit is contained in:
parent
a4002fe132
commit
e47d3f1f66
8 changed files with 370 additions and 29 deletions
|
@ -9,8 +9,8 @@ use tracing::debug;
|
|||
|
||||
use puffin_cache::{digest, CanonicalUrl};
|
||||
|
||||
use crate::git::GitRemote;
|
||||
use crate::{FetchStrategy, Git, GitReference};
|
||||
use crate::git::{GitReference, GitRemote};
|
||||
use crate::{FetchStrategy, Git};
|
||||
|
||||
/// A remote Git source that can be checked out locally.
|
||||
pub struct GitSource {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue