Skip to content

Commit 3ddbd2d

Browse files
committed
feat: Make reqwest TLS backend configuration easy.
We provide the choice of `native-tls` or `rust-tls`. If none is provided, the user can configure on their on similar to how it's done in `git-repository`. Please note that a choice now has to be made or HTTPS will not be available, so use one of… * blocking-http-transport-reqwest-rust-tls * blocking-http-transport-reqwest-native-tls
1 parent 03ff188 commit 3ddbd2d

File tree

4 files changed

+134
-3
lines changed

4 files changed

+134
-3
lines changed

Diff for: Cargo.lock

+125-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ gitoxide-core-blocking-client = ["gitoxide-core/blocking-client"]
7272
## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **curl**.
7373
http-client-curl = ["git-repository/blocking-http-transport-curl"]
7474
## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **reqwest**.
75-
http-client-reqwest = ["git-repository/blocking-http-transport-reqwest", "reqwest-for-configuration-only", "reqwest-for-configuration-only/rustls-tls", "reqwest-for-configuration-only/trust-dns"]
75+
http-client-reqwest = ["git-repository/blocking-http-transport-reqwest-rust-tls"]
7676
## Use async client networking.
7777
gitoxide-core-async-client = ["gitoxide-core/async-client", "futures-lite"]
7878

@@ -87,7 +87,6 @@ anyhow = "1.0.42"
8787
gitoxide-core = { version = "^0.20.0", path = "gitoxide-core" }
8888
git-features = { version = "^0.23.1", path = "git-features" }
8989
git-repository = { version = "^0.28.0", path = "git-repository", default-features = false }
90-
reqwest-for-configuration-only = { package = "reqwest", version = "0.11.13", default-features = false, optional = true }
9190

9291
clap = { version = "3.2.5", features = ["derive", "cargo"] }
9392
prodash = { version = "21", optional = true, default-features = false }

Diff for: git-repository/Cargo.toml

+7
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ blocking-network-client = ["git-protocol/blocking-client"]
4040
blocking-http-transport-curl = ["blocking-network-client", "git-transport/http-client-curl"]
4141
## Stacks with `blocking-network-client` to provide support for HTTP/S using **reqwest**, and implies blocking networking as a whole.
4242
blocking-http-transport-reqwest = ["blocking-network-client", "git-transport/http-client-reqwest"]
43+
## Stacks with `blocking-http-transport-reqwest` and enables HTTPS via the `rustls` crate. Note that https isn't available without a selection.
44+
blocking-http-transport-reqwest-rust-tls = ["blocking-http-transport-reqwest", "reqwest-for-configuration-only/rustls-tls", "reqwest-for-configuration-only/trust-dns"]
45+
## Stacks with `blocking-http-transport-reqwest` and enables HTTPS via the `native-tls` crate. Note that https isn't available without a selection.
46+
blocking-http-transport-reqwest-native-tls = ["blocking-http-transport-reqwest", "reqwest-for-configuration-only/default-tls" ]
4347

4448

4549
#! ### Other
@@ -128,6 +132,9 @@ async-std = { version = "1.12.0", optional = true }
128132
## how a simple unanchored regex of only 'normal' characters would work.
129133
regex = { version = "1.6.0", optional = true, default-features = false, features = ["std"] }
130134

135+
# For internal use to allow pure-Rust builds without opensssl.
136+
reqwest-for-configuration-only = { package = "reqwest", version = "0.11.13", default-features = false, optional = true }
137+
131138
document-features = { version = "0.2.0", optional = true }
132139

133140
[target.'cfg(target_vendor = "apple")'.dependencies]

Diff for: src/gix.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! The `gitoxide` plumbing.
12
//! ## Feature Flags
23
#![cfg_attr(
34
feature = "document-features",

0 commit comments

Comments
 (0)