Skip to content

Commit 9e9c653

Browse files
committed
Merge branch 'patch-1'
2 parents e304369 + 98cfbec commit 9e9c653

File tree

3 files changed

+134
-44
lines changed

3 files changed

+134
-44
lines changed

Cargo.lock

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

gix-transport/Cargo.toml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,44 @@ default = []
2222
## If set, blocking implementations of the typical git transports become available in `crate::client`
2323
blocking-client = ["gix-packetline/blocking-io"]
2424
## Implies `blocking-client`, and adds support for the http and https transports.
25-
http-client = ["base64", "gix-features/io-pipe", "blocking-client", "gix-credentials"]
25+
http-client = [
26+
"base64",
27+
"gix-features/io-pipe",
28+
"blocking-client",
29+
"gix-credentials",
30+
]
2631
## Implies `http-client`, and adds support for the http and https transports using the Rust bindings for `libcurl`.
2732
http-client-curl = ["curl", "http-client"]
33+
## Implies `http-client-curl` and enables `rustls` for creationg `https://` connections.
34+
http-client-curl-rust-tls = ["http-client-curl", "curl/rustls"]
2835
### Implies `http-client` and adds support for http and https transports using the blocking version of `reqwest`.
2936
http-client-reqwest = ["reqwest", "http-client"]
37+
## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `rustls` crate.
38+
http-client-reqwest-rust-tls = ["http-client-reqwest", "reqwest/rustls-tls"]
39+
## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `rustls` crate.
40+
## This also makes use of `trust-dns` to avoid `getaddrinfo`, but note it comes with its own problems.
41+
http-client-reqwest-rust-tls-trust-dns = [
42+
"http-client-reqwest",
43+
"reqwest/rustls-tls",
44+
"reqwest/trust-dns",
45+
]
46+
## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `native-tls` crate.
47+
http-client-reqwest-native-tls = ["http-client-reqwest", "reqwest/default-tls"]
3048
## If set, an async implementations of the git transports becomes available in `crate::client`.
3149
## Suitable for implementing your own transports while using git's way of communication, typically in conjunction with a custom server.
3250
## **Note** that the _blocking_ client has a wide range of available transports, with the _async_ version of it supporting only the TCP based `git` transport leaving you
3351
## with the responsibility to providing such an implementation of `futures-io::AsyncRead/AsyncWrite` yourself.
34-
async-client = ["gix-packetline/async-io", "async-trait", "futures-lite", "futures-io", "pin-project-lite"]
52+
async-client = [
53+
"gix-packetline/async-io",
54+
"async-trait",
55+
"futures-lite",
56+
"futures-io",
57+
"pin-project-lite",
58+
]
3559

3660
#! ### Other
3761
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
38-
serde= ["dep:serde"]
62+
serde = ["dep:serde"]
3963

4064
[[test]]
4165
name = "blocking-transport"
@@ -61,8 +85,14 @@ gix-packetline = { version = "^0.17.5", path = "../gix-packetline" }
6185
gix-credentials = { version = "^0.24.2", path = "../gix-credentials", optional = true }
6286
gix-quote = { version = "^0.4.12", path = "../gix-quote" }
6387

64-
serde = { version = "1.0.114", optional = true, default-features = false, features = ["std", "derive"]}
65-
bstr = { version = "1.3.0", default-features = false, features = ["std", "unicode"] }
88+
serde = { version = "1.0.114", optional = true, default-features = false, features = [
89+
"std",
90+
"derive",
91+
] }
92+
bstr = { version = "1.3.0", default-features = false, features = [
93+
"std",
94+
"unicode",
95+
] }
6696
thiserror = "1.0.26"
6797

6898
# for async-client
@@ -87,7 +117,9 @@ async-std = { version = "1.12.0", optional = true }
87117
document-features = { version = "0.2.0", optional = true }
88118

89119
[dev-dependencies]
90-
gix-pack = { path = "../gix-pack", default-features = false, features = ["streaming-input"] }
120+
gix-pack = { path = "../gix-pack", default-features = false, features = [
121+
"streaming-input",
122+
] }
91123
gix-hash = { path = "../gix-hash" }
92124
async-std = { version = "1.9.0", features = ["attributes"] }
93125
maybe-async = "0.2.6"

gix/Cargo.toml

Lines changed: 96 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,25 @@ default = ["max-performance-safe", "comfort", "basic", "extras"]
5151
basic = ["blob-diff", "revision", "index"]
5252

5353
## Various additional features and capabilities that are not necessarily part of what most users would need.
54-
extras = ["worktree-stream", "worktree-archive", "revparse-regex", "mailmap", "excludes", "attributes", "worktree-mutation", "credentials", "interrupt", "status", "dirwalk"]
54+
extras = [
55+
"worktree-stream",
56+
"worktree-archive",
57+
"revparse-regex",
58+
"mailmap",
59+
"excludes",
60+
"attributes",
61+
"worktree-mutation",
62+
"credentials",
63+
"interrupt",
64+
"status",
65+
"dirwalk",
66+
]
5567

5668
## Various progress-related features that improve the look of progress message units.
57-
comfort = ["gix-features/progress-unit-bytes", "gix-features/progress-unit-human-numbers"]
69+
comfort = [
70+
"gix-features/progress-unit-bytes",
71+
"gix-features/progress-unit-human-numbers",
72+
]
5873

5974
#! #### Components
6075
#!
@@ -87,7 +102,15 @@ worktree-mutation = ["attributes", "dep:gix-worktree-state"]
87102
excludes = ["dep:gix-ignore", "dep:gix-worktree", "index"]
88103

89104
## Query attributes and excludes. Enables access to pathspecs, worktree checkouts, filter-pipelines and submodules.
90-
attributes = ["excludes", "dep:gix-filter", "dep:gix-pathspec", "dep:gix-attributes", "dep:gix-submodule", "gix-worktree?/attributes", "command"]
105+
attributes = [
106+
"excludes",
107+
"dep:gix-filter",
108+
"dep:gix-pathspec",
109+
"dep:gix-attributes",
110+
"dep:gix-submodule",
111+
"gix-worktree?/attributes",
112+
"command",
113+
]
91114

92115
## Add support for mailmaps, as way of determining the final name of commmiters and authors.
93116
mailmap = ["dep:gix-mailmap", "revision"]
@@ -119,24 +142,56 @@ worktree-archive = ["gix-archive", "worktree-stream", "attributes"]
119142
#! Making a choice here also affects which crypto-library ends up being used.
120143

121144
## Make `gix-protocol` available along with an async client.
122-
async-network-client = ["gix-protocol/async-client", "gix-pack/streaming-input", "attributes", "credentials"]
145+
async-network-client = [
146+
"gix-protocol/async-client",
147+
"gix-pack/streaming-input",
148+
"attributes",
149+
"credentials",
150+
]
123151
## Use this if your crate uses `async-std` as runtime, and enable basic runtime integration when connecting to remote servers via the `git://` protocol.
124-
async-network-client-async-std = ["async-std", "async-network-client", "gix-transport/async-std"]
152+
async-network-client-async-std = [
153+
"async-std",
154+
"async-network-client",
155+
"gix-transport/async-std",
156+
]
125157
## Make `gix-protocol` available along with a blocking client, providing access to the `file://`, `git://` and `ssh://` transports.
126-
blocking-network-client = ["gix-protocol/blocking-client", "gix-pack/streaming-input", "attributes", "credentials"]
158+
blocking-network-client = [
159+
"gix-protocol/blocking-client",
160+
"gix-pack/streaming-input",
161+
"attributes",
162+
"credentials",
163+
]
127164
## Stacks with `blocking-network-client` to provide support for HTTP/S using **curl**, and implies blocking networking as a whole, making the `https://` transport available.
128-
blocking-http-transport-curl = ["blocking-network-client", "gix-transport/http-client-curl"]
165+
blocking-http-transport-curl = [
166+
"blocking-network-client",
167+
"gix-transport/http-client-curl",
168+
]
129169
## Stacks with `blocking-http-transport-curl` and also enables the `rustls` backend to avoid `openssl`.
130-
blocking-http-transport-curl-rustls = ["blocking-http-transport-curl", "dep:curl", "curl?/rustls"]
170+
blocking-http-transport-curl-rustls = [
171+
"blocking-http-transport-curl",
172+
"gix-transport/http-client-curl-rust-tls",
173+
]
131174
## Stacks with `blocking-network-client` to provide support for HTTP/S using **reqwest**, and implies blocking networking as a whole, making the `https://` transport available.
132-
blocking-http-transport-reqwest = ["blocking-network-client", "gix-transport/http-client-reqwest"]
175+
blocking-http-transport-reqwest = [
176+
"blocking-network-client",
177+
"gix-transport/http-client-reqwest",
178+
]
133179
## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `rustls` crate.
134-
blocking-http-transport-reqwest-rust-tls = ["blocking-http-transport-reqwest", "reqwest/rustls-tls"]
180+
blocking-http-transport-reqwest-rust-tls = [
181+
"blocking-http-transport-reqwest",
182+
"gix-transport/http-client-reqwest-rust-tls",
183+
]
135184
## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `rustls` crate.
136185
## This also makes use of `trust-dns` to avoid `getaddrinfo`, but note it comes with its own problems.
137-
blocking-http-transport-reqwest-rust-tls-trust-dns = ["blocking-http-transport-reqwest", "reqwest/rustls-tls", "reqwest/trust-dns"]
186+
blocking-http-transport-reqwest-rust-tls-trust-dns = [
187+
"blocking-http-transport-reqwest",
188+
"gix-transport/http-client-reqwest-rust-tls-trust-dns",
189+
]
138190
## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `native-tls` crate.
139-
blocking-http-transport-reqwest-native-tls = ["blocking-http-transport-reqwest", "reqwest/default-tls"]
191+
blocking-http-transport-reqwest-native-tls = [
192+
"blocking-http-transport-reqwest",
193+
"gix-transport/http-client-reqwest-native-tls",
194+
]
140195

141196

142197
#! #### Performance
@@ -147,20 +202,13 @@ blocking-http-transport-reqwest-native-tls = ["blocking-http-transport-reqwest",
147202
## Activate features that maximize performance, like using threads, but leave everything else that might affect compatibility out to allow users more fine-grained
148203
## control over performance features like which `zlib*` implementation to use.
149204
## No C toolchain is involved.
150-
max-control = [
151-
"parallel",
152-
"pack-cache-lru-static",
153-
"pack-cache-lru-dynamic",
154-
]
205+
max-control = ["parallel", "pack-cache-lru-static", "pack-cache-lru-dynamic"]
155206

156207
## Activate features that maximize performance, like usage of threads, `and access to caching in object databases, skipping the ones known to cause compile failures
157208
## on some platforms.
158209
## Note that this configuration still uses a pure Rust zlib implementation which isn't the fastest compared to its C-alternatives.
159210
## No C toolchain is involved.
160-
max-performance-safe = [
161-
"max-control",
162-
"parallel-walkdir"
163-
]
211+
max-performance-safe = ["max-control", "parallel-walkdir"]
164212

165213
## If set, walkdir iterators will be multi-threaded which affects the listing of loose objects and references.
166214
## Note, however, that this will use `rayon` under the hood and spawn threads for each traversal to avoid a global rayon thread pool.
@@ -215,7 +263,8 @@ zlib-stock = ["gix-features/zlib-stock"]
215263
verbose-object-parsing-errors = ["gix-object/verbose-object-parsing-errors"]
216264

217265
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
218-
serde = ["dep:serde",
266+
serde = [
267+
"dep:serde",
219268
"gix-pack/serde",
220269
"gix-object/serde",
221270
"gix-protocol?/serde",
@@ -230,7 +279,8 @@ serde = ["dep:serde",
230279
"gix-revision/serde",
231280
"gix-worktree?/serde",
232281
"gix-commitgraph/serde",
233-
"gix-credentials?/serde"]
282+
"gix-credentials?/serde",
283+
]
234284

235285
## Re-export the progress tree root which allows to obtain progress from various functions which take `impl gix::Progress`.
236286
## Applications which want to display progress will probably need this implementation.
@@ -240,7 +290,6 @@ progress-tree = ["prodash/progress-tree"]
240290
cache-efficiency-debug = ["gix-features/cache-efficiency-debug"]
241291

242292

243-
244293
[dependencies]
245294
gix-macros = { version = "^0.1.4", path = "../gix-macros" }
246295
gix-utils = { version = "^0.1.11", path = "../gix-utils" }
@@ -261,7 +310,9 @@ gix-odb = { version = "^0.59.0", path = "../gix-odb" }
261310
gix-hash = { version = "^0.14.2", path = "../gix-hash" }
262311
gix-object = { version = "^0.42.1", path = "../gix-object" }
263312
gix-actor = { version = "^0.31.1", path = "../gix-actor" }
264-
gix-pack = { version = "^0.49.0", path = "../gix-pack", default-features = false, features = ["object-cache-dynamic"] }
313+
gix-pack = { version = "^0.49.0", path = "../gix-pack", default-features = false, features = [
314+
"object-cache-dynamic",
315+
] }
265316
gix-revision = { version = "^0.27.0", path = "../gix-revision", default-features = false }
266317
gix-revwalk = { version = "^0.13.0", path = "../gix-revwalk" }
267318
gix-negotiate = { version = "^0.13.0", path = "../gix-negotiate", optional = true }
@@ -271,7 +322,10 @@ gix-url = { version = "^0.27.2", path = "../gix-url" }
271322
gix-traverse = { version = "^0.38.0", path = "../gix-traverse" }
272323
gix-diff = { version = "^0.42.0", path = "../gix-diff", default-features = false }
273324
gix-mailmap = { version = "^0.23.0", path = "../gix-mailmap", optional = true }
274-
gix-features = { version = "^0.38.1", path = "../gix-features", features = ["progress", "once_cell"] }
325+
gix-features = { version = "^0.38.1", path = "../gix-features", features = [
326+
"progress",
327+
"once_cell",
328+
] }
275329
gix-trace = { version = "^0.1.8", path = "../gix-trace" }
276330

277331
gix-glob = { version = "^0.16.2", path = "../gix-glob" }
@@ -286,7 +340,9 @@ gix-hashtable = { version = "^0.5.2", path = "../gix-hashtable" }
286340
gix-commitgraph = { version = "^0.24.2", path = "../gix-commitgraph" }
287341
gix-pathspec = { version = "^0.7.2", path = "../gix-pathspec", optional = true }
288342
gix-submodule = { version = "^0.10.0", path = "../gix-submodule", optional = true }
289-
gix-status = { version = "^0.8.0", path = "../gix-status", optional = true, features = ["worktree-rewrites"] }
343+
gix-status = { version = "^0.8.0", path = "../gix-status", optional = true, features = [
344+
"worktree-rewrites",
345+
] }
290346
gix-command = { version = "^0.3.6", path = "../gix-command", optional = true }
291347

292348
gix-worktree-stream = { version = "^0.11.0", path = "../gix-worktree-stream", optional = true }
@@ -301,21 +357,19 @@ prodash = { workspace = true, optional = true, features = ["progress-tree"] }
301357
once_cell = "1.14.0"
302358
signal-hook = { version = "0.3.9", default-features = false, optional = true }
303359
thiserror = "1.0.26"
304-
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] }
360+
serde = { version = "1.0.114", optional = true, default-features = false, features = [
361+
"derive",
362+
] }
305363
smallvec = "1.9.0"
306364
async-std = { version = "1.12.0", optional = true }
307365

308-
# Used for feature-configuration only.
309-
curl = { workspace = true, optional = true }
310-
311366
## For use in rev-parse, which provides searching commits by running a regex on their message.
312367
##
313368
## If disabled, the text will be search verbatim in any portion of the commit message, similar to
314369
## how a simple unanchored regex of only 'normal' characters would work.
315-
regex = { version = "1.6.0", optional = true, default-features = false, features = ["std"] }
316-
317-
# For internal use to allow pure-Rust builds without openssl.
318-
reqwest = { workspace = true, optional = true }
370+
regex = { version = "1.6.0", optional = true, default-features = false, features = [
371+
"std",
372+
] }
319373

320374
# for `interrupt` module
321375
parking_lot = "0.12.1"
@@ -332,4 +386,10 @@ serial_test = { version = "2.0.0", default-features = false }
332386
async-std = { version = "1.12.0", features = ["attributes"] }
333387

334388
[package.metadata.docs.rs]
335-
features = ["document-features", "max-performance", "blocking-network-client", "blocking-http-transport-curl", "serde"]
389+
features = [
390+
"document-features",
391+
"max-performance",
392+
"blocking-network-client",
393+
"blocking-http-transport-curl",
394+
"serde",
395+
]

0 commit comments

Comments
 (0)