Skip to content

Commit af9b14e

Browse files
committed
port all git functionality to use git CLI
1 parent c2931e8 commit af9b14e

File tree

16 files changed

+276
-2266
lines changed

16 files changed

+276
-2266
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Source distributions can run arbitrary code on build and can make unwanted modif
7878
```bash
7979
docker buildx build -t uv-builder -f builder.dockerfile --load .
8080
# Build for musl to avoid glibc errors, might not be required with your OS version
81-
cargo build --target x86_64-unknown-linux-musl --profile profiling --features vendored-openssl
81+
cargo build --target x86_64-unknown-linux-musl --profile profiling
8282
docker run --rm -it -v $(pwd):/app uv-builder /app/target/x86_64-unknown-linux-musl/profiling/uv-dev resolve-many --cache-dir /app/cache-docker /app/scripts/popular_packages/pypi_10k_most_dependents.txt
8383
```
8484

Cargo.lock

Lines changed: 2 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ flate2 = { version = "1.0.28", default-features = false }
7979
fs-err = { version = "2.11.0" }
8080
fs2 = { version = "0.4.3" }
8181
futures = { version = "0.3.30" }
82-
git2 = { version = "0.18.1" }
8382
glob = { version = "0.3.1" }
8483
hex = { version = "0.4.3" }
8584
hmac = { version = "0.12.1" }

crates/distribution-types/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pep508_rs = { workspace = true }
2020
platform-tags = { workspace = true }
2121
pypi-types = { workspace = true }
2222
uv-fs = { workspace = true }
23-
uv-git = { workspace = true, features = ["vendored-openssl"] }
23+
uv-git = { workspace = true }
2424
uv-normalize = { workspace = true }
2525

2626
anyhow = { workspace = true }

crates/pypi-types/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ uv-normalize = { workspace = true }
1919
uv-git = { workspace = true }
2020

2121
chrono = { workspace = true, features = ["serde"] }
22-
git2 = { workspace = true }
2322
indexmap = { workspace = true, features = ["serde"] }
2423
mailparse = { workspace = true }
2524
once_cell = { workspace = true }

crates/pypi-types/src/parsed_url.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use thiserror::Error;
55
use url::{ParseError, Url};
66

77
use pep508_rs::{Pep508Url, UnnamedRequirementUrl, VerbatimUrl, VerbatimUrlError};
8-
use uv_git::{GitSha, GitUrl};
8+
use uv_git::{GitSha, GitUrl, OidParseError};
99

1010
use crate::{ArchiveInfo, DirInfo, DirectUrl, VcsInfo, VcsKind};
1111

@@ -20,7 +20,7 @@ pub enum ParsedUrlError {
2020
#[error("Invalid path in file URL: `{0}`")]
2121
InvalidFileUrl(Url),
2222
#[error("Failed to parse Git reference from URL: `{0}`")]
23-
GitShaParse(Url, #[source] git2::Error),
23+
GitShaParse(Url, #[source] OidParseError),
2424
#[error("Not a valid URL: `{0}`")]
2525
UrlParse(String, #[source] ParseError),
2626
#[error(transparent)]

crates/uv-distribution/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ uv-cache = { workspace = true }
2525
uv-client = { workspace = true }
2626
uv-extract = { workspace = true }
2727
uv-fs = { workspace = true, features = ["tokio"] }
28-
uv-git = { workspace = true, features = ["vendored-openssl"] }
28+
uv-git = { workspace = true }
2929
uv-normalize = { workspace = true }
3030
uv-types = { workspace = true }
3131
uv-configuration = { workspace = true }

crates/uv-git/Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ cache-key = { workspace = true }
1717
uv-fs = { workspace = true }
1818

1919
anyhow = { workspace = true }
20+
thiserror = { workspace = true }
2021
base64 = { workspace = true }
2122
cargo-util = { workspace = true }
22-
git2 = { workspace = true }
2323
glob = { workspace = true }
24+
hex = { workspace = true }
2425
hmac = { workspace = true }
2526
home = { workspace = true }
2627
rand = { workspace = true }
@@ -30,7 +31,3 @@ tokio = { workspace = true }
3031
tracing = { workspace = true }
3132
url = { workspace = true }
3233
fs-err = { workspace = true }
33-
34-
[features]
35-
vendored-libgit2 = ["git2/vendored-libgit2"]
36-
vendored-openssl = ["git2/vendored-openssl"]

0 commit comments

Comments
 (0)