Skip to content

Commit c3cff88

Browse files
committed
fix: allow to configure the http transport layer in git-repository. (#30)
This way the user of the library has a choice to activate any of these features: * http-curl (default) - use curl and a lot of C dependencies for HTTP/HTTPS. But also support advanced HTTP options. * http-request - use reqwest for http and https, which currently doesn't support any options.
1 parent b887560 commit c3cff88

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ regularly run by CI, on the real crates-index, and in a more realistic manner mi
1717

1818
The API is mostly the same, but has a few breaking changes to deal with order selection.
1919

20+
Last but not least, the user can now configure the HTTP backend to use, which allows for a pure-Rust
21+
build as well.
22+
2023
### Chore
2124

2225
- <csr-id-d91afc930e833f4eb90f64971200d691662f9b0d/> a pipeline to validate basic assumptions are stil fulfilled.

Cargo.toml

+8-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@ path = "tests/baseline_atomic.rs.rs"
2525
required-features = ["max-performance"]
2626

2727
[features]
28-
default = []
28+
default = ["http-curl"]
29+
## Configure `git-repository` to use maximum performance.
2930
max-performance = ["git-repository/max-performance"]
31+
## Use libcurl for all http/https interactions. Supports many git http settings, but needs a C toolchain to build.
32+
http-curl = ["git-repository/blocking-http-transport-curl"]
33+
## Use reqwest along with pure-rust TLS implementations. Needs no C toolchain, but might not be parity in features compared to curl.
34+
http-reqwest = ["git-repository/blocking-http-transport-reqwest-rust-tls"]
35+
3036

3137
[dependencies]
32-
git-repository = { version = "0.28.0", default-features = false, features = ["max-performance-safe", "blocking-network-client", "blocking-http-transport"] }
38+
git-repository = { version = "0.29.0", default-features = false, features = ["max-performance-safe", "blocking-network-client"] }
3339
serde = { version = "1", features = ["std", "derive"] }
3440
hex = "0.4.3"
3541
smartstring = "1.0.1"

0 commit comments

Comments
 (0)