summaryrefslogtreecommitdiffstats
path: root/vendor/gix-transport
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/gix-transport
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-transport')
-rw-r--r--vendor/gix-transport/.cargo-checksum.json2
-rw-r--r--vendor/gix-transport/CHANGELOG.md178
-rw-r--r--vendor/gix-transport/Cargo.toml16
-rw-r--r--vendor/gix-transport/src/client/async_io/bufread_ext.rs23
-rw-r--r--vendor/gix-transport/src/client/blocking_io/bufread_ext.rs23
-rw-r--r--vendor/gix-transport/src/client/blocking_io/connect.rs9
-rw-r--r--vendor/gix-transport/src/client/blocking_io/file.rs2
-rw-r--r--vendor/gix-transport/src/client/blocking_io/http/mod.rs51
-rw-r--r--vendor/gix-transport/src/client/blocking_io/http/traits.rs2
-rw-r--r--vendor/gix-transport/src/client/blocking_io/ssh/mod.rs1
-rw-r--r--vendor/gix-transport/src/client/blocking_io/ssh/tests.rs22
-rw-r--r--vendor/gix-transport/src/client/capabilities.rs2
-rw-r--r--vendor/gix-transport/src/client/non_io_types.rs13
-rw-r--r--vendor/gix-transport/src/lib.rs13
14 files changed, 287 insertions, 70 deletions
diff --git a/vendor/gix-transport/.cargo-checksum.json b/vendor/gix-transport/.cargo-checksum.json
index 08ab5f134..57a3abec4 100644
--- a/vendor/gix-transport/.cargo-checksum.json
+++ b/vendor/gix-transport/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"42e325cc72b69e544f76f387cfa343dbd8b0618b3f57fe066b1474d70a533f5c","Cargo.toml":"e9ec51f24d98190505c53f38fce76de9dedbfc3afeefd7e4182f41612eec0483","src/client/async_io/bufread_ext.rs":"51f55866fbae6521a45db6c054c9d8dbd01a458dec939a4d071d8c1798a11db3","src/client/async_io/connect.rs":"d2f64a865612cdf2aefebc8c58c28b0d303e697819ae467b0145d18ab87fd359","src/client/async_io/mod.rs":"dbc880330eea5ab38d2ac7aa8d295352cac1011aa4f6c9d9216ccfb7fa79789d","src/client/async_io/request.rs":"ad260288ef4d118af83b9bb3ce34e0d4b4bdac0dd3e2225463a74b8d7b791708","src/client/async_io/traits.rs":"22f76033eb5c8a26bd26bb7a24b26471b64a446f64e9daa535ab9fcb8d837dfe","src/client/blocking_io/bufread_ext.rs":"b67b7d02288a415b65dc2ef70eb68cd5d14bc680709489929ab8de5c654f6f29","src/client/blocking_io/connect.rs":"3f2db12f9b39f919acead9db33b35edf2cc6b43fc7d1a64f1be3eca2347acb2a","src/client/blocking_io/file.rs":"ddac1d00660760994c0e1e1b78b13126e4d34543ec84b61caf3fb0449eba6612","src/client/blocking_io/http/curl/mod.rs":"4fa0027b0aabdb71676c5267d8dab446ccd81863dd80dc9ac8f43e7710099ca4","src/client/blocking_io/http/curl/remote.rs":"46e7e34f84d52e39b583c8c2b35c8cd08fcadee95ad6e04390edb4b7348798d9","src/client/blocking_io/http/mod.rs":"ac14fcd20c45d5be59e04cfb293844acd064be34b559fb16eb793e4b891055f6","src/client/blocking_io/http/redirect.rs":"1f6d57c8a87a9cb4c3699c53f5e05468d99b89d49532c1f805931dcdcff36c0b","src/client/blocking_io/http/reqwest/mod.rs":"08d09aefaddbd0049676bdbe403fca2282c9da4484a6d7cd8e84ec8a46060184","src/client/blocking_io/http/reqwest/remote.rs":"dfcebff86bbf77401e1f22152b570a125dc38c8e983df51e14f8bb1e2459586c","src/client/blocking_io/http/traits.rs":"fe44b23d6c18389c2befe1b163bc3e268302b32952b7e7fc1c8d88561d1e2ba6","src/client/blocking_io/mod.rs":"b3b09948dcad91f5e9060875e5096c3d4155e3fdf33af0415b04f9c6246adec2","src/client/blocking_io/request.rs":"4877c53b0940c44f8c1d7ed84a0186451a1ff0f1d8b4274346ef534baf6d7449","src/client/blocking_io/ssh/mod.rs":"e9aafcfe09e63e940a822e68f4eee60436cb22b82ef355417257bab78c7419db","src/client/blocking_io/ssh/program_kind.rs":"e573e45103ac3978da65cb87be3aac476fc40781a953d2c464f754fa79398cee","src/client/blocking_io/ssh/tests.rs":"a5092be07ede47fc2ce8abacf3c328fab16652896f23ef33541f1ffc440411e4","src/client/blocking_io/traits.rs":"efc43e28a680e941b4443c6d014b4ce8591e6214f8f88565fc6c6dd1d2bbfc43","src/client/capabilities.rs":"fc92ed668cf0ed8b710f2a49f83bc2b4712b43ccd23b6ea99bc58aecf4d4dba2","src/client/git/async_io.rs":"97b8dccc93bf5a62349aec7dc967acb59212ca66a49347564da50e4fc64864ec","src/client/git/blocking_io.rs":"42e3ee0f597cc31bd87027e21573ccfd4270b835795526f65ef193cff0da077c","src/client/git/mod.rs":"46d990e403f5f825fb0f9332d2ee1a3d8b33209d5a74fe8b473840bcf8e873c4","src/client/mod.rs":"563bb655c93af9dde121a6c8ddb94055aac862da5ac3e9d0420ca5eb21892387","src/client/non_io_types.rs":"ef5d423003298029c1abecae3090e5f4ef8aecad43643ec952ad1ce523067586","src/client/traits.rs":"8dd06180d15209ba7d878835858c1f9c8e74656faf303d01b8bcaf7a6512d6b4","src/lib.rs":"1a1a3bd82420faa766deaf8dd59aff44225e3172c9da339aedd93bff25028343"},"package":"d633947b36a2fbbc089195bdc71621158f1660c2ff2a6b12b0279c16e2f764bc"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"ef1e774e77d9f2c1c8a5d190ed0c4e762039d2b5cb8a7e9de5a52c4d949b3451","Cargo.toml":"ad7f10f9f001b1df53e63a73e33aae41a81c636dd7f3eb256f3dbbbe8268d8a7","src/client/async_io/bufread_ext.rs":"e41868eaa501affde6736799cc288ade608db127842c47567fb0b41e73087315","src/client/async_io/connect.rs":"d2f64a865612cdf2aefebc8c58c28b0d303e697819ae467b0145d18ab87fd359","src/client/async_io/mod.rs":"dbc880330eea5ab38d2ac7aa8d295352cac1011aa4f6c9d9216ccfb7fa79789d","src/client/async_io/request.rs":"ad260288ef4d118af83b9bb3ce34e0d4b4bdac0dd3e2225463a74b8d7b791708","src/client/async_io/traits.rs":"22f76033eb5c8a26bd26bb7a24b26471b64a446f64e9daa535ab9fcb8d837dfe","src/client/blocking_io/bufread_ext.rs":"a5fcf2e396978ad0579834257e58ce61a444f21d67e601c959cff2dad06bf22a","src/client/blocking_io/connect.rs":"e146594221beae80385b08094a128066a8772127b989bb63e8bb0b5d7dc7f82d","src/client/blocking_io/file.rs":"90e79c15eb76b4a6faab5728f2a76ee5b6970a7f5f12eb3d093d6e78570f3fdf","src/client/blocking_io/http/curl/mod.rs":"4fa0027b0aabdb71676c5267d8dab446ccd81863dd80dc9ac8f43e7710099ca4","src/client/blocking_io/http/curl/remote.rs":"46e7e34f84d52e39b583c8c2b35c8cd08fcadee95ad6e04390edb4b7348798d9","src/client/blocking_io/http/mod.rs":"3a58753707f5ee2d7a59123d3a749bb17864ed70fe6c5b197174bc9b4861e691","src/client/blocking_io/http/redirect.rs":"1f6d57c8a87a9cb4c3699c53f5e05468d99b89d49532c1f805931dcdcff36c0b","src/client/blocking_io/http/reqwest/mod.rs":"08d09aefaddbd0049676bdbe403fca2282c9da4484a6d7cd8e84ec8a46060184","src/client/blocking_io/http/reqwest/remote.rs":"dfcebff86bbf77401e1f22152b570a125dc38c8e983df51e14f8bb1e2459586c","src/client/blocking_io/http/traits.rs":"dce3e07198f0b769d56d4d3b9a359626d3878cfa53f2a8605b37fc5144ef58b0","src/client/blocking_io/mod.rs":"b3b09948dcad91f5e9060875e5096c3d4155e3fdf33af0415b04f9c6246adec2","src/client/blocking_io/request.rs":"4877c53b0940c44f8c1d7ed84a0186451a1ff0f1d8b4274346ef534baf6d7449","src/client/blocking_io/ssh/mod.rs":"a2eb446804b7d377db8a0bae5d74936271dc7cdd71f12629eaf21a0c821453c8","src/client/blocking_io/ssh/program_kind.rs":"e573e45103ac3978da65cb87be3aac476fc40781a953d2c464f754fa79398cee","src/client/blocking_io/ssh/tests.rs":"309e795036635782a005cba1ddf0e8dcf7b1e1fea49429f644996c942cf7ccbe","src/client/blocking_io/traits.rs":"efc43e28a680e941b4443c6d014b4ce8591e6214f8f88565fc6c6dd1d2bbfc43","src/client/capabilities.rs":"dfdefb6fc9f52ad815d5cd065597571e70769563cc79c5fe16a355b9b9a5d56c","src/client/git/async_io.rs":"97b8dccc93bf5a62349aec7dc967acb59212ca66a49347564da50e4fc64864ec","src/client/git/blocking_io.rs":"42e3ee0f597cc31bd87027e21573ccfd4270b835795526f65ef193cff0da077c","src/client/git/mod.rs":"46d990e403f5f825fb0f9332d2ee1a3d8b33209d5a74fe8b473840bcf8e873c4","src/client/mod.rs":"563bb655c93af9dde121a6c8ddb94055aac862da5ac3e9d0420ca5eb21892387","src/client/non_io_types.rs":"ec10e9d7cf6270caf087643484dc4935b014124cf5b914f28eaa476a6869349a","src/client/traits.rs":"8dd06180d15209ba7d878835858c1f9c8e74656faf303d01b8bcaf7a6512d6b4","src/lib.rs":"da212d3a29ecca99861707d7413dee1864220a4ec4f2b204473606db8c3b58ab"},"package":"f01c2bf7b989c679695ef635fc7d9e80072e08101be4b53193c8e8b649900102"} \ No newline at end of file
diff --git a/vendor/gix-transport/CHANGELOG.md b/vendor/gix-transport/CHANGELOG.md
index 06da083c5..e4c7fdc04 100644
--- a/vendor/gix-transport/CHANGELOG.md
+++ b/vendor/gix-transport/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## 0.27.0 (2023-03-04)
+## 0.31.0 (2023-04-27)
A maintenance release without user-facing changes.
@@ -14,6 +14,181 @@ A maintenance release without user-facing changes.
<csr-read-only-do-not-edit/>
- 2 commits contributed to the release.
+ - 0 commits were understood as [conventional](https://www.conventionalcommits.org).
+ - 0 issues like '(#ID)' were seen in commit messages
+
+### Commit Details
+
+<csr-read-only-do-not-edit/>
+
+<details><summary>view details</summary>
+
+ * **Uncategorized**
+ - Prepare changelogs prior to release ([`0135158`](https://github.com/Byron/gitoxide/commit/013515897215400539bfd53c25548bd054186ba6))
+ - Bump gix-path v0.8.0, safety bump 20 crates (gix set to 0.44.1 manually) ([`43ebaf2`](https://github.com/Byron/gitoxide/commit/43ebaf267557218865862538ffc7bdf00558492f))
+</details>
+
+## 0.30.0 (2023-04-26)
+
+### New Features (BREAKING)
+
+ - <csr-id-b83ee366a3c65c717beb587ad809268f1c54b8ad/> Rename `serde1` cargo feature to `serde` and use the weak-deps cargo capability.
+ With it it's possible to not automatically declare all optional dependencies externally visible
+ features, and thus re-use feature names that oterwise are also a crate name.
+
+ Previously I thought that `serde1` is for future-proofing and supporting multiple serde versions
+ at the same time. However, it's most definitely a burden I wouldn't want anyway, so using
+ `serde` seems to be the way to go into the future.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 10 commits contributed to the release over the course of 9 calendar days.
+ - 31 days passed between releases.
+ - 1 commit was understood as [conventional](https://www.conventionalcommits.org).
+ - 1 unique issue was worked on: [#814](https://github.com/Byron/gitoxide/issues/814)
+
+### Thanks Clippy
+
+<csr-read-only-do-not-edit/>
+
+[Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic.
+
+### Commit Details
+
+<csr-read-only-do-not-edit/>
+
+<details><summary>view details</summary>
+
+ * **[#814](https://github.com/Byron/gitoxide/issues/814)**
+ - Rename `serde1` cargo feature to `serde` and use the weak-deps cargo capability. ([`b83ee36`](https://github.com/Byron/gitoxide/commit/b83ee366a3c65c717beb587ad809268f1c54b8ad))
+ * **Uncategorized**
+ - Release gix-index v0.16.0, gix-mailmap v0.12.0, gix-pack v0.34.0, gix-odb v0.44.0, gix-packetline v0.16.0, gix-transport v0.30.0, gix-protocol v0.31.0, gix-revision v0.13.0, gix-refspec v0.10.0, gix-worktree v0.16.0, gix v0.44.0 ([`d7173b2`](https://github.com/Byron/gitoxide/commit/d7173b2d2cb79685fdf7f618c31c576db24fa648))
+ - Release gix-index v0.16.0, gix-mailmap v0.12.0, gix-pack v0.34.0, gix-odb v0.44.0, gix-packetline v0.16.0, gix-transport v0.30.0, gix-protocol v0.31.0, gix-revision v0.13.0, gix-refspec v0.10.0, gix-worktree v0.16.0, gix v0.44.0 ([`e4df557`](https://github.com/Byron/gitoxide/commit/e4df5574c0813a0236319fa6e8b3b41bab179fc8))
+ - Release gix-hash v0.11.1, gix-path v0.7.4, gix-glob v0.6.0, gix-attributes v0.11.0, gix-config-value v0.11.0, gix-fs v0.1.1, gix-tempfile v5.0.3, gix-utils v0.1.1, gix-lock v5.0.1, gix-object v0.29.1, gix-ref v0.28.0, gix-sec v0.7.0, gix-config v0.21.0, gix-prompt v0.4.0, gix-url v0.17.0, gix-credentials v0.13.0, gix-diff v0.29.0, gix-discover v0.17.0, gix-hashtable v0.2.0, gix-ignore v0.1.0, gix-bitmap v0.2.3, gix-traverse v0.25.0, gix-index v0.16.0, gix-mailmap v0.12.0, gix-pack v0.34.0, gix-odb v0.44.0, gix-packetline v0.16.0, gix-transport v0.30.0, gix-protocol v0.31.0, gix-revision v0.13.0, gix-refspec v0.10.0, gix-worktree v0.16.0, gix v0.44.0, safety bump 7 crates ([`91134a1`](https://github.com/Byron/gitoxide/commit/91134a11c8ba0e942f692488ec9bce9fa1086324))
+ - Prepare changelogs prior to release ([`30a1a71`](https://github.com/Byron/gitoxide/commit/30a1a71f36f24faac0e0b362ffdfedea7f9cdbf1))
+ - Merge branch 'fix-823' ([`6ebd61e`](https://github.com/Byron/gitoxide/commit/6ebd61e548a36a04e413ac725a03e607a3588334))
+ - Thanks clippy ([`14e64e7`](https://github.com/Byron/gitoxide/commit/14e64e74649cfb1f2f99da87015939af98fae5c8))
+ - Release gix-utils v0.1.0, gix-hash v0.11.0, gix-date v0.5.0, gix-features v0.29.0, gix-actor v0.20.0, gix-object v0.29.0, gix-archive v0.1.0, gix-fs v0.1.0, safety bump 25 crates ([`8dbd0a6`](https://github.com/Byron/gitoxide/commit/8dbd0a60557a85acfa231800a058cbac0271a8cf))
+ - Merge branch 'main' into dev ([`cdef398`](https://github.com/Byron/gitoxide/commit/cdef398c4a3bd01baf0be2c27a3f77a400172b0d))
+ - Rename the serde1 feature to serde ([`19338d9`](https://github.com/Byron/gitoxide/commit/19338d934b6712b7d6bd3fa3b2e4189bf7e6c8a1))
+</details>
+
+## 0.29.1 (2023-03-26)
+
+A maintenance release without any user-facing changes.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 3 commits contributed to the release over the course of 3 calendar days.
+ - 11 days passed between releases.
+ - 0 commits were understood as [conventional](https://www.conventionalcommits.org).
+ - 0 issues like '(#ID)' were seen in commit messages
+
+### Commit Details
+
+<csr-read-only-do-not-edit/>
+
+<details><summary>view details</summary>
+
+ * **Uncategorized**
+ - Release gix-tempfile v5.0.2, gix-validate v0.7.4, gix-config v0.20.0, gix-prompt v0.3.3, gix-diff v0.28.1, gix-discover v0.16.1, gix-pack v0.33.2, gix-transport v0.29.1, gix-protocol v0.30.1, gix-revision v0.12.1, gix-worktree v0.15.1, gix v0.43.0, safety bump gix v0.43.0 ([`5dc1f9f`](https://github.com/Byron/gitoxide/commit/5dc1f9f2bcb8b3e147115fcb6f76558e8f48ffef))
+ - Prepare changelogs prior to release ([`3016a28`](https://github.com/Byron/gitoxide/commit/3016a285f566bdfe7de2774fa6f2254c1b1a2c51))
+ - Correct more typos with `typos` tool. ([`2321eb9`](https://github.com/Byron/gitoxide/commit/2321eb971c2b89551506e2016a3495fafd15b47d))
+</details>
+
+## 0.29.0 (2023-03-14)
+
+A maintenance release without any user-facing changes.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 7 commits contributed to the release over the course of 3 calendar days.
+ - 3 days passed between releases.
+ - 0 commits were understood as [conventional](https://www.conventionalcommits.org).
+ - 0 issues like '(#ID)' were seen in commit messages
+
+### Commit Details
+
+<csr-read-only-do-not-edit/>
+
+<details><summary>view details</summary>
+
+ * **Uncategorized**
+ - Release gix-features v0.28.1, gix-tempfile v5.0.1, gix-ref v0.27.1, gix-pack v0.33.1, gix-packetline v0.15.0, gix-transport v0.29.0, gix-protocol v0.30.0, gix v0.42.0, safety bump 3 crates ([`c1f1bfb`](https://github.com/Byron/gitoxide/commit/c1f1bfb8dc0e73993678353e4492d0614b642ed1))
+ - Prepare changelogs prior to release ([`c66e298`](https://github.com/Byron/gitoxide/commit/c66e2982577e4cd9faef63798986b8cf8ece93a2))
+ - Make fmt ([`3836cc0`](https://github.com/Byron/gitoxide/commit/3836cc0c9c3e1158b56142b924483c8a77217d53))
+ - Merge branch 'various-fixes' ([`cc0f506`](https://github.com/Byron/gitoxide/commit/cc0f5061fba27d57022dc616c941034b98fd4875))
+ - Adjust to changes in `gix-packetline` ([`4f45814`](https://github.com/Byron/gitoxide/commit/4f45814eea9c20b449effd9b29d31623943ff853))
+ - Merge branch 'shallow-protocol' ([`531dd19`](https://github.com/Byron/gitoxide/commit/531dd19502b8b635fb1a60f747eb381fd12e00ca))
+ - Merge branch 'fix-cred-helper' ([`01277a6`](https://github.com/Byron/gitoxide/commit/01277a681e4997896e04567490c572b5af606f35))
+</details>
+
+## 0.28.0 (2023-03-10)
+
+### Bug Fixes (BREAKING)
+
+ - <csr-id-72ec01b6e37e56fda72e8f137c92dc2276bc0791/> add `ReadLineBufRead::readline_str(&mut String)` to get consistent readline behaviour.
+ Previously the `async` version of the transport implementation would use the default `read_line` implementation
+ which would search for newlines in packetlines. However, these aren't always emitted which could lead to
+ multiple packetlines to be concatenated.
+
+ Now the we always use our implementation which simply treats one packet line as line, no matter whether
+ or not it ends with optional newline.
+
+### Bug Fixes
+
+ - <csr-id-397ed90a36c0b86e2c9022b2787656746045c5a3/> Assure `ReadlineBufRead::readline_str()` calls our implementation for `Box<T: ReadlineBufRead>` as well.
+ This fixes a bug where the HTTP implementation would incorrectly concatenate packetlines without newlines
+ as sent by the server for shallow info lines.
+
+### New Features (BREAKING)
+
+ - <csr-id-7830f1e112ed3c936b08ab53cd20b9eff7feb7d5/> HTTP transport uses url identity if username and password is set.
+ Note that this also changes `http::Transport::new(...)` to accept a `gix_url::Url`
+ instead of a string as it's typically the input and makes it easier to derive an
+ identity.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 8 commits contributed to the release.
+ - 6 days passed between releases.
+ - 3 commits were understood as [conventional](https://www.conventionalcommits.org).
+ - 0 issues like '(#ID)' were seen in commit messages
+
+### Commit Details
+
+<csr-read-only-do-not-edit/>
+
+<details><summary>view details</summary>
+
+ * **Uncategorized**
+ - Release gix-tempfile v5.0.0, gix-lock v5.0.0, gix-ref v0.27.0, gix-config v0.19.0, gix-url v0.16.0, gix-credentials v0.12.0, gix-discover v0.16.0, gix-index v0.15.0, gix-pack v0.33.0, gix-odb v0.43.0, gix-transport v0.28.0, gix-protocol v0.29.0, gix-worktree v0.15.0, gix v0.41.0, safety bump 12 crates ([`29a0870`](https://github.com/Byron/gitoxide/commit/29a087043d1feb2f127b065341c8028d0bd0301e))
+ - Prepare changelogs prior to release ([`e06f5f5`](https://github.com/Byron/gitoxide/commit/e06f5f523e83f4da390eddbebcb9a2d58674587b))
+ - Assure `ReadlineBufRead::readline_str()` calls our implementation for `Box<T: ReadlineBufRead>` as well. ([`397ed90`](https://github.com/Byron/gitoxide/commit/397ed90a36c0b86e2c9022b2787656746045c5a3))
+ - Add `ReadLineBufRead::readline_str(&mut String)` to get consistent readline behaviour. ([`72ec01b`](https://github.com/Byron/gitoxide/commit/72ec01b6e37e56fda72e8f137c92dc2276bc0791))
+ - Merge branch 'password-in-urls' ([`85f8b28`](https://github.com/Byron/gitoxide/commit/85f8b283a1671e2631cda437ca8da93f9a2a4ebd))
+ - HTTP transport uses url identity if username and password is set. ([`7830f1e`](https://github.com/Byron/gitoxide/commit/7830f1e112ed3c936b08ab53cd20b9eff7feb7d5))
+ - Adjust to changes in `gix-url` ([`66602bb`](https://github.com/Byron/gitoxide/commit/66602bbb7fe62f7425c8289902a1d2fce121e87c))
+ - Fix ssh helper invocation tests under Rust 1.68 ([`d137a8c`](https://github.com/Byron/gitoxide/commit/d137a8cc5c578dc70bb31aef96cad1db99503dbf))
+</details>
+
+## 0.27.0 (2023-03-04)
+
+A maintenance release without user-facing changes.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 3 commits contributed to the release.
- 3 days passed between releases.
- 0 commits were understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
@@ -25,6 +200,7 @@ A maintenance release without user-facing changes.
<details><summary>view details</summary>
* **Uncategorized**
+ - Release gix-attributes v0.10.0, gix-ref v0.26.0, gix-config v0.18.0, gix-url v0.15.0, gix-credentials v0.11.0, gix-discover v0.15.0, gix-index v0.14.0, gix-mailmap v0.11.0, gix-odb v0.42.0, gix-transport v0.27.0, gix-protocol v0.28.0, gix-revision v0.12.0, gix-refspec v0.9.0, gix-worktree v0.14.0, gix v0.39.0 ([`93e75fe`](https://github.com/Byron/gitoxide/commit/93e75fed454ed8b342231bde4638db90e407ce52))
- Prepare changelogs prior to release ([`895e482`](https://github.com/Byron/gitoxide/commit/895e482badf01e953bb9144001eebd5e1b1c4d84))
- Release gix-features v0.28.0, gix-actor v0.19.0, gix-object v0.28.0, gix-diff v0.28.0, gix-traverse v0.24.0, gix-pack v0.32.0, safety bump 20 crates ([`0f411e9`](https://github.com/Byron/gitoxide/commit/0f411e93ec812592bb9d3a52b751399dd86f76f7))
</details>
diff --git a/vendor/gix-transport/Cargo.toml b/vendor/gix-transport/Cargo.toml
index c4451d414..4381e3b96 100644
--- a/vendor/gix-transport/Cargo.toml
+++ b/vendor/gix-transport/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.64"
name = "gix-transport"
-version = "0.27.0"
+version = "0.31.0"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
include = [
"src/**/*",
@@ -27,7 +27,7 @@ repository = "https://github.com/Byron/gitoxide"
features = [
"http-client-curl",
"document-features",
- "serde1",
+ "serde",
]
rustdoc-args = [
"--cfg",
@@ -98,23 +98,23 @@ optional = true
version = "^0.2.4"
[dependencies.gix-credentials]
-version = "^0.11.0"
+version = "^0.14.0"
optional = true
[dependencies.gix-features]
-version = "^0.28.0"
+version = "^0.29.0"
[dependencies.gix-packetline]
-version = "^0.14.3"
+version = "^0.16.0"
[dependencies.gix-quote]
version = "^0.4.3"
[dependencies.gix-sec]
-version = "^0.6.2"
+version = "^0.8.0"
[dependencies.gix-url]
-version = "^0.15.0"
+version = "^0.18.0"
[dependencies.pin-project-lite]
version = "0.2.6"
@@ -172,4 +172,4 @@ http-client-reqwest = [
"reqwest",
"http-client",
]
-serde1 = ["serde"]
+serde = ["dep:serde"]
diff --git a/vendor/gix-transport/src/client/async_io/bufread_ext.rs b/vendor/gix-transport/src/client/async_io/bufread_ext.rs
index abe206b8a..2b4362fc9 100644
--- a/vendor/gix-transport/src/client/async_io/bufread_ext.rs
+++ b/vendor/gix-transport/src/client/async_io/bufread_ext.rs
@@ -5,7 +5,7 @@ use std::{
use async_trait::async_trait;
use futures_io::{AsyncBufRead, AsyncRead};
-use gix_packetline::PacketLineRef;
+use gix_packetline::{read::ProgressAction, PacketLineRef};
use crate::{
client::{Error, MessageKind},
@@ -15,7 +15,7 @@ use crate::{
/// A function `f(is_error, text)` receiving progress or error information.
/// As it is not a future itself, it must not block. If IO is performed within the function, be sure to spawn
/// it onto an executor.
-pub type HandleProgress = Box<dyn FnMut(bool, &[u8])>;
+pub type HandleProgress = Box<dyn FnMut(bool, &[u8]) -> ProgressAction>;
/// This trait exists to get a version of a `gix_packetline::Provider` without type parameters,
/// but leave support for reading lines directly without forcing them through `String`.
@@ -34,6 +34,12 @@ pub trait ReadlineBufRead: AsyncBufRead {
async fn readline(
&mut self,
) -> Option<io::Result<Result<gix_packetline::PacketLineRef<'_>, gix_packetline::decode::Error>>>;
+
+ /// Read a line similar to `BufRead::read_line()`, but assure it doesn't try to find newlines
+ /// which might concatenate multiple distinct packet lines.
+ ///
+ /// Making this a trait method allows to handle differences between async and blocking.
+ async fn readline_str(&mut self, line: &mut String) -> io::Result<usize>;
}
/// Provide even more access to the underlying packet reader.
@@ -58,6 +64,9 @@ impl<'a, T: ReadlineBufRead + ?Sized + 'a + Unpin> ReadlineBufRead for Box<T> {
async fn readline(&mut self) -> Option<io::Result<Result<PacketLineRef<'_>, gix_packetline::decode::Error>>> {
self.deref_mut().readline().await
}
+ async fn readline_str(&mut self, line: &mut String) -> io::Result<usize> {
+ self.deref_mut().readline_str(line).await
+ }
}
#[async_trait(?Send)]
@@ -80,10 +89,15 @@ impl<'a, T: ExtendedBufRead + ?Sized + 'a + Unpin> ExtendedBufRead for Box<T> {
}
#[async_trait(?Send)]
-impl<T: AsyncRead + Unpin> ReadlineBufRead for gix_packetline::read::WithSidebands<'_, T, for<'b> fn(bool, &'b [u8])> {
+impl<T: AsyncRead + Unpin> ReadlineBufRead
+ for gix_packetline::read::WithSidebands<'_, T, for<'b> fn(bool, &'b [u8]) -> ProgressAction>
+{
async fn readline(&mut self) -> Option<io::Result<Result<PacketLineRef<'_>, gix_packetline::decode::Error>>> {
self.read_data_line().await
}
+ async fn readline_str(&mut self, line: &mut String) -> io::Result<usize> {
+ self.read_line_to_string(line).await
+ }
}
#[async_trait(?Send)]
@@ -91,6 +105,9 @@ impl<'a, T: AsyncRead + Unpin> ReadlineBufRead for gix_packetline::read::WithSid
async fn readline(&mut self) -> Option<io::Result<Result<PacketLineRef<'_>, gix_packetline::decode::Error>>> {
self.read_data_line().await
}
+ async fn readline_str(&mut self, line: &mut String) -> io::Result<usize> {
+ self.read_line_to_string(line).await
+ }
}
#[async_trait(?Send)]
diff --git a/vendor/gix-transport/src/client/blocking_io/bufread_ext.rs b/vendor/gix-transport/src/client/blocking_io/bufread_ext.rs
index 5842ddd3d..3513a7fd5 100644
--- a/vendor/gix-transport/src/client/blocking_io/bufread_ext.rs
+++ b/vendor/gix-transport/src/client/blocking_io/bufread_ext.rs
@@ -3,14 +3,14 @@ use std::{
ops::{Deref, DerefMut},
};
-use gix_packetline::PacketLineRef;
+use gix_packetline::{read::ProgressAction, PacketLineRef};
use crate::{
client::{Error, MessageKind},
Protocol,
};
/// A function `f(is_error, text)` receiving progress or error information.
-pub type HandleProgress = Box<dyn FnMut(bool, &[u8])>;
+pub type HandleProgress = Box<dyn FnMut(bool, &[u8]) -> ProgressAction>;
/// This trait exists to get a version of a `gix_packetline::Provider` without type parameters,
/// but leave support for reading lines directly without forcing them through `String`.
@@ -28,6 +28,12 @@ pub trait ReadlineBufRead: io::BufRead {
fn readline(
&mut self,
) -> Option<io::Result<Result<gix_packetline::PacketLineRef<'_>, gix_packetline::decode::Error>>>;
+
+ /// Read a line similar to `BufRead::read_line()`, but assure it doesn't try to find newlines
+ /// which might concatenate multiple distinct packet lines.
+ ///
+ /// Making this a trait method allows to handle differences between async and blocking.
+ fn readline_str(&mut self, line: &mut String) -> io::Result<usize>;
}
/// Provide even more access to the underlying packet reader.
@@ -50,6 +56,9 @@ impl<'a, T: ReadlineBufRead + ?Sized + 'a> ReadlineBufRead for Box<T> {
fn readline(&mut self) -> Option<io::Result<Result<PacketLineRef<'_>, gix_packetline::decode::Error>>> {
ReadlineBufRead::readline(self.deref_mut())
}
+ fn readline_str(&mut self, line: &mut String) -> io::Result<usize> {
+ ReadlineBufRead::readline_str(self.deref_mut(), line)
+ }
}
impl<'a, T: ExtendedBufRead + ?Sized + 'a> ExtendedBufRead for Box<T> {
@@ -70,16 +79,24 @@ impl<'a, T: ExtendedBufRead + ?Sized + 'a> ExtendedBufRead for Box<T> {
}
}
-impl<T: io::Read> ReadlineBufRead for gix_packetline::read::WithSidebands<'_, T, fn(bool, &[u8])> {
+impl<T: io::Read> ReadlineBufRead for gix_packetline::read::WithSidebands<'_, T, fn(bool, &[u8]) -> ProgressAction> {
fn readline(&mut self) -> Option<io::Result<Result<PacketLineRef<'_>, gix_packetline::decode::Error>>> {
self.read_data_line()
}
+
+ fn readline_str(&mut self, line: &mut String) -> io::Result<usize> {
+ self.read_line_to_string(line)
+ }
}
impl<'a, T: io::Read> ReadlineBufRead for gix_packetline::read::WithSidebands<'a, T, HandleProgress> {
fn readline(&mut self) -> Option<io::Result<Result<PacketLineRef<'_>, gix_packetline::decode::Error>>> {
self.read_data_line()
}
+
+ fn readline_str(&mut self, line: &mut String) -> io::Result<usize> {
+ self.read_line_to_string(line)
+ }
}
impl<'a, T: io::Read> ExtendedBufRead for gix_packetline::read::WithSidebands<'a, T, HandleProgress> {
diff --git a/vendor/gix-transport/src/client/blocking_io/connect.rs b/vendor/gix-transport/src/client/blocking_io/connect.rs
index de3334f18..5bdb5319e 100644
--- a/vendor/gix-transport/src/client/blocking_io/connect.rs
+++ b/vendor/gix-transport/src/client/blocking_io/connect.rs
@@ -23,7 +23,7 @@ pub(crate) mod function {
Ok(match url.scheme {
gix_url::Scheme::Ext(_) => return Err(Error::UnsupportedScheme(url.scheme)),
gix_url::Scheme::File => {
- if url.user().is_some() || url.host().is_some() || url.port.is_some() {
+ if url.user().is_some() || url.password().is_some() || url.host().is_some() || url.port.is_some() {
return Err(Error::UnsupportedUrlTokens {
url: url.to_bstring(),
scheme: url.scheme,
@@ -59,10 +59,9 @@ pub(crate) mod function {
#[cfg(not(any(feature = "http-client-curl", feature = "http-client-reqwest")))]
gix_url::Scheme::Https | gix_url::Scheme::Http => return Err(Error::CompiledWithoutHttp(url.scheme)),
#[cfg(any(feature = "http-client-curl", feature = "http-client-reqwest"))]
- gix_url::Scheme::Https | gix_url::Scheme::Http => Box::new(crate::client::http::connect(
- &url.to_bstring().to_string(),
- options.version,
- )),
+ gix_url::Scheme::Https | gix_url::Scheme::Http => {
+ Box::new(crate::client::http::connect(url, options.version))
+ }
})
}
}
diff --git a/vendor/gix-transport/src/client/blocking_io/file.rs b/vendor/gix-transport/src/client/blocking_io/file.rs
index d80fe55df..d60b70c6e 100644
--- a/vendor/gix-transport/src/client/blocking_io/file.rs
+++ b/vendor/gix-transport/src/client/blocking_io/file.rs
@@ -71,7 +71,7 @@ impl SpawnProcessOnDemand {
}
fn new_local(path: BString, version: Protocol) -> SpawnProcessOnDemand {
SpawnProcessOnDemand {
- url: gix_url::Url::from_parts_as_alternative_form(gix_url::Scheme::File, None, None, None, path.clone())
+ url: gix_url::Url::from_parts(gix_url::Scheme::File, None, None, None, None, path.clone(), true)
.expect("valid url"),
path,
ssh_cmd: None,
diff --git a/vendor/gix-transport/src/client/blocking_io/http/mod.rs b/vendor/gix-transport/src/client/blocking_io/http/mod.rs
index d88d6bf26..64cc892d8 100644
--- a/vendor/gix-transport/src/client/blocking_io/http/mod.rs
+++ b/vendor/gix-transport/src/client/blocking_io/http/mod.rs
@@ -45,9 +45,10 @@ pub mod options {
dyn FnMut(gix_credentials::helper::Action) -> gix_credentials::protocol::Result + Send + Sync;
/// Possible settings for the `http.followRedirects` configuration option.
- #[derive(Debug, Copy, Clone, PartialEq, Eq)]
+ #[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
pub enum FollowRedirects {
/// Follow only the first redirect request, most suitable for typical git requests.
+ #[default]
Initial,
/// Follow all redirect requests from the server unconditionally
All,
@@ -55,16 +56,11 @@ pub mod options {
None,
}
- impl Default for FollowRedirects {
- fn default() -> Self {
- FollowRedirects::Initial
- }
- }
-
/// The way to configure a proxy for authentication if a username is present in the configured proxy.
- #[derive(Debug, Copy, Clone, PartialEq, Eq)]
+ #[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
pub enum ProxyAuthMethod {
/// Automatically pick a suitable authentication method.
+ #[default]
AnyAuth,
///HTTP basic authentication.
Basic,
@@ -76,12 +72,6 @@ pub mod options {
Ntlm,
}
- impl Default for ProxyAuthMethod {
- fn default() -> Self {
- ProxyAuthMethod::AnyAuth
- }
- }
-
/// Available SSL version numbers.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord, PartialOrd)]
#[allow(missing_docs)]
@@ -133,7 +123,7 @@ pub mod options {
#[derive(Default, Clone)]
pub struct Options {
/// Headers to be added to every request.
- /// They are applied unconditionally and are expected to be valid as they occour in an HTTP request, like `header: value`, without newlines.
+ /// They are applied unconditionally and are expected to be valid as they occur in an HTTP request, like `header: value`, without newlines.
///
/// Refers to `http.extraHeader` multi-var.
pub extra_headers: Vec<String>,
@@ -217,26 +207,40 @@ pub struct Transport<H: Http> {
impl<H: Http> Transport<H> {
/// Create a new instance with `http` as implementation to communicate to `url` using the given `desired_version`.
/// Note that we will always fallback to other versions as supported by the server.
- pub fn new_http(http: H, url: &str, desired_version: Protocol) -> Self {
+ pub fn new_http(http: H, url: gix_url::Url, desired_version: Protocol) -> Self {
+ let identity = url
+ .user()
+ .zip(url.password())
+ .map(|(user, pass)| gix_sec::identity::Account {
+ username: user.to_string(),
+ password: pass.to_string(),
+ });
Transport {
- url: url.to_owned(),
+ url: url.to_bstring().to_string(),
user_agent_header: concat!("User-Agent: git/oxide-", env!("CARGO_PKG_VERSION")),
desired_version,
actual_version: Default::default(),
service: None,
http,
line_provider: None,
- identity: None,
+ identity,
}
}
}
+impl<H: Http> Transport<H> {
+ /// Returns the identity that the transport uses when connecting to the remote.
+ pub fn identity(&self) -> Option<&gix_sec::identity::Account> {
+ self.identity.as_ref()
+ }
+}
+
#[cfg(any(feature = "http-client-curl", feature = "http-client-reqwest"))]
impl Transport<Impl> {
/// Create a new instance to communicate to `url` using the given `desired_version` of the `git` protocol.
///
/// Note that the actual implementation depends on feature toggles.
- pub fn new(url: &str, desired_version: Protocol) -> Self {
+ pub fn new(url: gix_url::Url, desired_version: Protocol) -> Self {
Self::new_http(Impl::default(), url, desired_version)
}
}
@@ -472,6 +476,11 @@ impl<H: Http, B: ReadlineBufRead + Unpin> ReadlineBufRead for HeadersThenBody<H,
}
self.body.readline()
}
+
+ fn readline_str(&mut self, line: &mut String) -> std::io::Result<usize> {
+ self.handle_headers()?;
+ self.body.readline_str(line)
+ }
}
impl<H: Http, B: ExtendedBufRead + Unpin> ExtendedBufRead for HeadersThenBody<H, B> {
@@ -497,13 +506,13 @@ impl<H: Http, B: ExtendedBufRead + Unpin> ExtendedBufRead for HeadersThenBody<H,
/// Connect to the given `url` via HTTP/S using the `desired_version` of the `git` protocol, with `http` as implementation.
#[cfg(all(feature = "http-client", not(feature = "http-client-curl")))]
-pub fn connect_http<H: Http>(http: H, url: &str, desired_version: Protocol) -> Transport<H> {
+pub fn connect_http<H: Http>(http: H, url: gix_url::Url, desired_version: Protocol) -> Transport<H> {
Transport::new_http(http, url, desired_version)
}
/// Connect to the given `url` via HTTP/S using the `desired_version` of the `git` protocol.
#[cfg(any(feature = "http-client-curl", feature = "http-client-reqwest"))]
-pub fn connect(url: &str, desired_version: Protocol) -> Transport<Impl> {
+pub fn connect(url: gix_url::Url, desired_version: Protocol) -> Transport<Impl> {
Transport::new(url, desired_version)
}
diff --git a/vendor/gix-transport/src/client/blocking_io/http/traits.rs b/vendor/gix-transport/src/client/blocking_io/http/traits.rs
index 5b163f892..52176fecc 100644
--- a/vendor/gix-transport/src/client/blocking_io/http/traits.rs
+++ b/vendor/gix-transport/src/client/blocking_io/http/traits.rs
@@ -84,7 +84,7 @@ impl<A, B, C> From<PostResponse<A, B, C>> for GetResponse<A, B> {
}
/// A trait to abstract the HTTP operations needed to power all git interactions: read via GET and write via POST.
-/// Note that 401 must be turned into `std::io::Error(PermissionDenied)`, and other non-success http stati must be transformed
+/// Note that 401 must be turned into `std::io::Error(PermissionDenied)`, and other non-success http statuses must be transformed
/// into `std::io::Error(Other)`
#[allow(clippy::type_complexity)]
pub trait Http {
diff --git a/vendor/gix-transport/src/client/blocking_io/ssh/mod.rs b/vendor/gix-transport/src/client/blocking_io/ssh/mod.rs
index 63e4dc817..7c042dc28 100644
--- a/vendor/gix-transport/src/client/blocking_io/ssh/mod.rs
+++ b/vendor/gix-transport/src/client/blocking_io/ssh/mod.rs
@@ -86,6 +86,7 @@ pub mod connect {
///
/// The `desired_version` is the preferred protocol version when establishing the connection, but note that it can be
/// downgraded by servers not supporting it.
+#[allow(clippy::result_large_err)]
pub fn connect(
url: gix_url::Url,
desired_version: Protocol,
diff --git a/vendor/gix-transport/src/client/blocking_io/ssh/tests.rs b/vendor/gix-transport/src/client/blocking_io/ssh/tests.rs
index 27c661bd8..f0820d14e 100644
--- a/vendor/gix-transport/src/client/blocking_io/ssh/tests.rs
+++ b/vendor/gix-transport/src/client/blocking_io/ssh/tests.rs
@@ -126,7 +126,7 @@ mod program_kind {
&["ssh", "-o", "SendEnv=GIT_PROTOCOL", "host"][..],
),
] {
- assert_eq!(call_args(ProgramKind::Ssh, url, protocol), quoted(expected));
+ assert_eq!(call_args(ProgramKind::Ssh, url, protocol), joined(expected));
}
}
@@ -134,14 +134,14 @@ mod program_kind {
fn tortoise_plink_has_batch_command() {
assert_eq!(
call_args(ProgramKind::TortoisePlink, "ssh://user@host:42/p", Protocol::V2),
- quoted(&["tortoiseplink.exe", "-batch", "-P", "42", "user@host"])
+ joined(&["tortoiseplink.exe", "-batch", "-P", "42", "user@host"])
);
}
#[test]
fn port_for_all() {
for kind in [ProgramKind::TortoisePlink, ProgramKind::Plink, ProgramKind::Putty] {
- assert!(call_args(kind, "ssh://user@host:43/p", Protocol::V2).ends_with(r#""-P" "43" "user@host""#));
+ assert!(call_args(kind, "ssh://user@host:43/p", Protocol::V2).ends_with("-P 43 user@host"));
}
}
@@ -153,7 +153,7 @@ mod program_kind {
}
assert_eq!(
call_args(ProgramKind::Simple, "ssh://user@host/p", Protocol::V2),
- quoted(&["simple", "user@host"]),
+ joined(&["simple", "user@host"]),
"simple can only do simple invocations"
);
}
@@ -191,8 +191,8 @@ mod program_kind {
Ok(())
}
- fn quoted(input: &[&str]) -> String {
- input.iter().map(|s| format!("\"{s}\"")).collect::<Vec<_>>().join(" ")
+ fn joined(input: &[&str]) -> String {
+ input.to_vec().join(" ")
}
fn try_call(
kind: ProgramKind,
@@ -207,7 +207,15 @@ mod program_kind {
try_call(kind, url, version).expect("no error")
}
fn call_args(kind: ProgramKind, url: &str, version: Protocol) -> String {
- format!("{:?}", std::process::Command::from(call(kind, url, version)))
+ let cmd = std::process::Command::from(call(kind, url, version));
+ format!(
+ "{} {}",
+ cmd.get_program().to_string_lossy(),
+ cmd.get_args()
+ .map(|arg| arg.to_string_lossy().into_owned())
+ .collect::<Vec<_>>()
+ .join(" ")
+ )
}
type Result = std::result::Result<(), ssh::invocation::Error>;
diff --git a/vendor/gix-transport/src/client/capabilities.rs b/vendor/gix-transport/src/client/capabilities.rs
index 4c10dc100..05185edae 100644
--- a/vendor/gix-transport/src/client/capabilities.rs
+++ b/vendor/gix-transport/src/client/capabilities.rs
@@ -24,7 +24,7 @@ pub enum Error {
/// A structure to represent multiple [capabilities][Capability] or features supported by the server.
#[derive(Debug, Clone, Default)]
-#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Capabilities {
data: BString,
value_sep: u8,
diff --git a/vendor/gix-transport/src/client/non_io_types.rs b/vendor/gix-transport/src/client/non_io_types.rs
index a207f7f0b..807b22a8f 100644
--- a/vendor/gix-transport/src/client/non_io_types.rs
+++ b/vendor/gix-transport/src/client/non_io_types.rs
@@ -1,6 +1,6 @@
/// Configure how the [`RequestWriter`][crate::client::RequestWriter] behaves when writing bytes.
-#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
-#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+#[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum WriteMode {
/// Each [write()][std::io::Write::write()] call writes the bytes verbatim as one or more packet lines.
///
@@ -11,19 +11,14 @@ pub enum WriteMode {
///
/// This mode also indicates that the lines written fit into memory, hence the transport may chose to not stream it but to buffer it
/// instead. This is relevant for some transports, like the one for HTTP.
+ #[default]
OneLfTerminatedLinePerWriteCall,
}
-impl Default for WriteMode {
- fn default() -> Self {
- WriteMode::OneLfTerminatedLinePerWriteCall
- }
-}
-
/// The kind of packet line to write when transforming a [`RequestWriter`][crate::client::RequestWriter] into an
/// [`ExtendedBufRead`][crate::client::ExtendedBufRead].
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
-#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum MessageKind {
/// A `flush` packet.
Flush,
diff --git a/vendor/gix-transport/src/lib.rs b/vendor/gix-transport/src/lib.rs
index ca02b3b59..96e03a0e8 100644
--- a/vendor/gix-transport/src/lib.rs
+++ b/vendor/gix-transport/src/lib.rs
@@ -19,26 +19,21 @@ pub use futures_io;
pub use gix_packetline as packetline;
/// The version of the way client and server communicate.
-#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
-#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+#[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(missing_docs)]
pub enum Protocol {
/// Version 1 was the first one conceived, is stateful, and our implementation was seen to cause deadlocks. Prefer V2
V1 = 1,
/// A command-based and stateless protocol with clear semantics, and the one to use assuming the server isn't very old.
/// This is the default.
+ #[default]
V2 = 2,
}
-impl Default for Protocol {
- fn default() -> Self {
- Protocol::V2
- }
-}
-
/// The kind of service to invoke on the client or the server side.
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
-#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Service {
/// The service sending packs from a server to the client. Used for fetching pack data.
UploadPack,