summaryrefslogtreecommitdiffstats
path: root/vendor/gix-url
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-url
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-url')
-rw-r--r--vendor/gix-url/.cargo-checksum.json2
-rw-r--r--vendor/gix-url/CHANGELOG.md97
-rw-r--r--vendor/gix-url/Cargo.toml10
-rw-r--r--vendor/gix-url/src/expand_path.rs2
-rw-r--r--vendor/gix-url/src/impls.rs1
-rw-r--r--vendor/gix-url/src/lib.rs41
-rw-r--r--vendor/gix-url/src/parse.rs4
-rw-r--r--vendor/gix-url/src/scheme.rs2
8 files changed, 124 insertions, 35 deletions
diff --git a/vendor/gix-url/.cargo-checksum.json b/vendor/gix-url/.cargo-checksum.json
index a1b8ca463..9cfb00ac7 100644
--- a/vendor/gix-url/.cargo-checksum.json
+++ b/vendor/gix-url/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"01ddc2ac63e3300134495116f5ea053d57e3e773efaddeb7f280167f9a4af4a8","Cargo.toml":"bc5a334f1d5ab7a2c80f1242721a285431b6bf08968311fad46691a67a33063d","src/expand_path.rs":"53e9893a2ddc07bce89ce8c61a5aa1202b05533dc2503f92ee2d9ad68c57fdc5","src/impls.rs":"d95d48aaba0ca4a6390a46d93c58252bccd95242f7c0fea11f6a3500fe2e9afb","src/lib.rs":"1934ad8b3b6d91a882933b29932c1fa0dd7a4cfa93771d78f7431329687957d7","src/parse.rs":"42cf6a49f2c3f7168f0602b3b47eae82f84f9885655e6bf63a325a827f2926b3","src/scheme.rs":"26922553e1644ba3352980930a2f4581ad72aac67a3608c754866ca13016d64c"},"package":"044072b7ce8601b62dcec841b92129f5cc677072823324121b395d766ac5f528"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"e7e337f2705fa8a264754e1b525edb95796bbf7942ec90c5551e04a92678755e","Cargo.toml":"fe333a352b22c0eaf858e9738a134e1d5398dcc6119481ee2fd9ee62940eabe7","src/expand_path.rs":"b0d2fe688c170dfa1381b3cb7add373a618a8ac2520ebdeb2ea721318bb88566","src/impls.rs":"3e47180ec440b42bbd0ba2bdbcbfc247fbfd4020066ce5ca0f4c137b36807323","src/lib.rs":"fc219a768c3c96a5b649bdba11d03e8f168ed347391208bcf48c40eb49e91c5c","src/parse.rs":"9740c12bb5b16b7c787bbf7bb20c90d38cde6306e1eb43b945ae72caee6dbcff","src/scheme.rs":"02a6a230eea7459b05959ff4e8ce30f4d45526e1f1a47ff88b260bb1943d2433"},"package":"dfc77f89054297cc81491e31f1bab4027e554b5ef742a44bd7035db9a0f78b76"} \ No newline at end of file
diff --git a/vendor/gix-url/CHANGELOG.md b/vendor/gix-url/CHANGELOG.md
index 40eeb7051..14fb91d91 100644
--- a/vendor/gix-url/CHANGELOG.md
+++ b/vendor/gix-url/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.15.0 (2023-03-04)
+## 0.18.0 (2023-04-27)
A maintenance release without user-facing changes.
@@ -14,6 +14,100 @@ 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.17.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/>
+
+ - 7 commits contributed to the release over the course of 46 calendar days.
+ - 46 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)
+
+### 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-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))
+ - 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))
+ - Merge branch 'fix-cred-helper' ([`01277a6`](https://github.com/Byron/gitoxide/commit/01277a681e4997896e04567490c572b5af606f35))
+</details>
+
+## 0.16.0 (2023-03-10)
+
+### New Features (BREAKING)
+
+ - <csr-id-c6897d95febf40467c780c3827792135b70a7e25/> support passwords in urls.
+ It's now possible to use urls like `https://user:pass@host/repo` without loosing
+ the password portion of the URL.
+
+ We also change the `from_parts()` method to take all parts needed to describe a URL,
+ which is a breaking change.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 4 commits contributed to the release.
+ - 6 days passed between releases.
+ - 1 commit was 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))
+ - Merge branch 'password-in-urls' ([`85f8b28`](https://github.com/Byron/gitoxide/commit/85f8b283a1671e2631cda437ca8da93f9a2a4ebd))
+ - Support passwords in urls. ([`c6897d9`](https://github.com/Byron/gitoxide/commit/c6897d95febf40467c780c3827792135b70a7e25))
+</details>
+
+## 0.15.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 +119,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-url/Cargo.toml b/vendor/gix-url/Cargo.toml
index 8d5cf6bcb..d00c509b6 100644
--- a/vendor/gix-url/Cargo.toml
+++ b/vendor/gix-url/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.64"
name = "gix-url"
-version = "0.15.0"
+version = "0.18.0"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
include = [
"src/**/*",
@@ -44,10 +44,10 @@ version = "0.2.0"
optional = true
[dependencies.gix-features]
-version = "^0.28.0"
+version = "^0.29.0"
[dependencies.gix-path]
-version = "^0.7.2"
+version = "^0.8.0"
[dependencies.home]
version = "0.5.3"
@@ -68,7 +68,7 @@ version = "1.0.32"
version = "2.1.1"
[features]
-serde1 = [
- "serde",
+serde = [
+ "dep:serde",
"bstr/serde",
]
diff --git a/vendor/gix-url/src/expand_path.rs b/vendor/gix-url/src/expand_path.rs
index 393ce9116..85fb0da50 100644
--- a/vendor/gix-url/src/expand_path.rs
+++ b/vendor/gix-url/src/expand_path.rs
@@ -5,7 +5,7 @@ use bstr::{BStr, BString, ByteSlice};
/// Whether a repository is resolving for the current user, or the given one.
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
-#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum ForUser {
/// The currently logged in user.
Current,
diff --git a/vendor/gix-url/src/impls.rs b/vendor/gix-url/src/impls.rs
index d3c578088..14926fc3c 100644
--- a/vendor/gix-url/src/impls.rs
+++ b/vendor/gix-url/src/impls.rs
@@ -13,6 +13,7 @@ impl Default for Url {
serialize_alternative_form: false,
scheme: Scheme::Ssh,
user: None,
+ password: None,
host: None,
port: None,
path: bstr::BString::default(),
diff --git a/vendor/gix-url/src/lib.rs b/vendor/gix-url/src/lib.rs
index 9e3de2b79..ca62bdd6f 100644
--- a/vendor/gix-url/src/lib.rs
+++ b/vendor/gix-url/src/lib.rs
@@ -32,12 +32,14 @@ pub use scheme::Scheme;
///
/// Note that we do not support passing the password using the URL as it's likely leading to accidents.
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
-#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Url {
/// The URL scheme.
pub scheme: Scheme,
/// The user to impersonate on the remote.
user: Option<String>,
+ /// The password associated with a user.
+ password: Option<String>,
/// The host to which to connect. Localhost is implied if `None`.
host: Option<String>,
/// When serializing, use the alternative forms as it was parsed as such.
@@ -50,44 +52,25 @@ pub struct Url {
/// Instantiation
impl Url {
- /// Create a new instance from the given parts, which will be validated by parsing them back.
+ /// Create a new instance from the given parts, including a password, which will be validated by parsing them back.
pub fn from_parts(
scheme: Scheme,
user: Option<String>,
+ password: Option<String>,
host: Option<String>,
port: Option<u16>,
path: BString,
+ serialize_alternative_form: bool,
) -> Result<Self, parse::Error> {
parse(
Url {
scheme,
user,
+ password,
host,
port,
path,
- serialize_alternative_form: false,
- }
- .to_bstring()
- .as_ref(),
- )
- }
-
- /// Create a new instance from the given parts, which will be validated by parsing them back from its alternative form.
- pub fn from_parts_as_alternative_form(
- scheme: Scheme,
- user: Option<String>,
- host: Option<String>,
- port: Option<u16>,
- path: BString,
- ) -> Result<Self, parse::Error> {
- parse(
- Url {
- scheme,
- user,
- host,
- port,
- path,
- serialize_alternative_form: true,
+ serialize_alternative_form,
}
.to_bstring()
.as_ref(),
@@ -133,6 +116,10 @@ impl Url {
pub fn user(&self) -> Option<&str> {
self.user.as_deref()
}
+ /// Returns the password mentioned in the url, if present.
+ pub fn password(&self) -> Option<&str> {
+ self.password.as_deref()
+ }
/// Returns the host mentioned in the url, if present.
pub fn host(&self) -> Option<&str> {
self.host.as_deref()
@@ -178,6 +165,10 @@ impl Url {
match (&self.user, &self.host) {
(Some(user), Some(host)) => {
out.write_all(user.as_bytes())?;
+ if let Some(password) = &self.password {
+ out.write_all(&[b':'])?;
+ out.write_all(password.as_bytes())?;
+ }
out.write_all(&[b'@'])?;
out.write_all(host.as_bytes())?;
}
diff --git a/vendor/gix-url/src/parse.rs b/vendor/gix-url/src/parse.rs
index df5ad5565..bb9c1f38b 100644
--- a/vendor/gix-url/src/parse.rs
+++ b/vendor/gix-url/src/parse.rs
@@ -66,10 +66,12 @@ fn has_no_explicit_protocol(url: &[u8]) -> bool {
}
fn to_owned_url(url: url::Url) -> Result<crate::Url, Error> {
+ let password = url.password();
Ok(crate::Url {
serialize_alternative_form: false,
scheme: str_to_protocol(url.scheme()),
- user: if url.username().is_empty() {
+ password: password.map(ToOwned::to_owned),
+ user: if url.username().is_empty() && password.is_none() {
None
} else {
Some(url.username().into())
diff --git a/vendor/gix-url/src/scheme.rs b/vendor/gix-url/src/scheme.rs
index 5f491596a..1c5f04526 100644
--- a/vendor/gix-url/src/scheme.rs
+++ b/vendor/gix-url/src/scheme.rs
@@ -2,7 +2,7 @@
///
/// It defines how to talk to a given repository.
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
-#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(missing_docs)]
pub enum Scheme {
/// A local resource that is accessible on the current host.