summaryrefslogtreecommitdiffstats
path: root/vendor/gix-validate
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/gix-validate
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-validate')
-rw-r--r--vendor/gix-validate/.cargo-checksum.json2
-rw-r--r--vendor/gix-validate/CHANGELOG.md90
-rw-r--r--vendor/gix-validate/Cargo.toml6
-rw-r--r--vendor/gix-validate/src/lib.rs5
-rw-r--r--vendor/gix-validate/src/reference.rs2
-rw-r--r--vendor/gix-validate/src/submodule.rs32
6 files changed, 129 insertions, 8 deletions
diff --git a/vendor/gix-validate/.cargo-checksum.json b/vendor/gix-validate/.cargo-checksum.json
index b0d808154..0c580e42d 100644
--- a/vendor/gix-validate/.cargo-checksum.json
+++ b/vendor/gix-validate/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"f6239eaefc3c44c997c14f392c44e75336eb2d6a85fe80e0a1d7685f7b46fed4","Cargo.toml":"219a0c89a08f28dce482af78e91bdcc8734df77c14ddad8ab66376f4072df0cf","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","src/lib.rs":"00c56e6e0af19c60d745d37ca4a6a0947578b424833d213c3b7b99e6546b381b","src/reference.rs":"ef5a5249db79a5751806f023f4da4f89458f1db5a57bcf6de70fdf6c28576e65","src/tag.rs":"dd0fd5e65812e9db0b68daa64a2c290d8c2e56c8262400d1aa6f7c2b7f3f9a0a"},"package":"57ea5845b506c7728b9d89f4227cc369a5fc5a1d5b26c3add0f0d323413a3a60"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"479caf73d000d8e6bed0998d244e5f91fa77eef15b8109cb4a0c494f86bed6aa","Cargo.toml":"1f26cbc9db39e15679f2b1791b35ae13a4d8cfab1589971805cc51475b9eb51c","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","src/lib.rs":"a020aedc92ff329042056122f8d385ea06833abea0071b7eea60fa1c69c3ce62","src/reference.rs":"62f9c40d90d89b130201e65fc40c495ca8524283121c7e665c584def0671c0c6","src/submodule.rs":"8a31ca6b7b94326df7e75d3f7a6268263164cb88c489501c7483f399873a14cb","src/tag.rs":"dd0fd5e65812e9db0b68daa64a2c290d8c2e56c8262400d1aa6f7c2b7f3f9a0a"},"package":"e05cab2b03a45b866156e052aa38619f4ece4adcb2f79978bfc249bc3b21b8c5"} \ No newline at end of file
diff --git a/vendor/gix-validate/CHANGELOG.md b/vendor/gix-validate/CHANGELOG.md
index 963733d89..bbba33d57 100644
--- a/vendor/gix-validate/CHANGELOG.md
+++ b/vendor/gix-validate/CHANGELOG.md
@@ -5,6 +5,93 @@ 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.8.0 (2023-08-07)
+
+### New Features
+
+ - <csr-id-afb1f02a795e947ce55e9312cc44e635e5e290f1/> add validation for submodule names
+
+### Bug Fixes (BREAKING)
+
+ - <csr-id-a9da3f84b979aa25225a819428b85bff6290da9b/> remove `tagname` and `refname`.
+ These were duplicate paths to the same function, and callers may always
+ rename them on use.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 4 commits contributed to the release over the course of 2 calendar days.
+ - 15 days passed between releases.
+ - 2 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 of `gix-submodule` ([`f3c4311`](https://github.com/Byron/gitoxide/commit/f3c43110e8d5f16cf87e50821044d8b3edbae235))
+ - Merge branch 'submodules' ([`b629f8a`](https://github.com/Byron/gitoxide/commit/b629f8a774931d58c0a9b124fa75f85807c6c5d1))
+ - Remove `tagname` and `refname`. ([`a9da3f8`](https://github.com/Byron/gitoxide/commit/a9da3f84b979aa25225a819428b85bff6290da9b))
+ - Add validation for submodule names ([`afb1f02`](https://github.com/Byron/gitoxide/commit/afb1f02a795e947ce55e9312cc44e635e5e290f1))
+</details>
+
+## 0.7.7 (2023-07-22)
+
+A maintenance release without user-facing changes.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 5 commits contributed to the release over the course of 1 calendar day.
+ - 30 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.32.1, gix-actor v0.24.1, gix-validate v0.7.7, gix-object v0.33.1, gix-path v0.8.4, gix-glob v0.10.1, gix-quote v0.4.6, gix-attributes v0.16.0, gix-command v0.2.8, gix-packetline-blocking v0.16.4, gix-filter v0.2.0, gix-fs v0.4.1, gix-chunk v0.4.4, gix-commitgraph v0.18.1, gix-hashtable v0.2.4, gix-revwalk v0.4.1, gix-traverse v0.30.1, gix-worktree-stream v0.2.0, gix-archive v0.2.0, gix-config-value v0.12.5, gix-tempfile v7.0.1, gix-utils v0.1.5, gix-lock v7.0.2, gix-ref v0.33.1, gix-sec v0.8.4, gix-prompt v0.5.4, gix-url v0.21.1, gix-credentials v0.17.1, gix-diff v0.33.1, gix-discover v0.22.1, gix-ignore v0.5.1, gix-bitmap v0.2.6, gix-index v0.21.1, gix-mailmap v0.16.1, gix-negotiate v0.5.1, gix-pack v0.40.1, gix-odb v0.50.1, gix-packetline v0.16.4, gix-transport v0.34.1, gix-protocol v0.36.1, gix-revision v0.18.1, gix-refspec v0.14.1, gix-worktree v0.23.0, gix v0.50.0, safety bump 5 crates ([`16295b5`](https://github.com/Byron/gitoxide/commit/16295b58e2581d2e8b8b762816f52baabe871c75))
+ - Prepare more changelogs ([`c4cc5f2`](https://github.com/Byron/gitoxide/commit/c4cc5f261d29f712a101033a18293a97a9d4ae85))
+ - Release gix-date v0.7.1, gix-hash v0.11.4, gix-trace v0.1.3, gix-features v0.32.0, gix-actor v0.24.0, gix-validate v0.7.7, gix-object v0.33.0, gix-path v0.8.4, gix-glob v0.10.0, gix-quote v0.4.6, gix-attributes v0.15.0, gix-command v0.2.7, gix-packetline-blocking v0.16.3, gix-filter v0.1.0, gix-fs v0.4.0, gix-chunk v0.4.4, gix-commitgraph v0.18.0, gix-hashtable v0.2.4, gix-revwalk v0.4.0, gix-traverse v0.30.0, gix-worktree-stream v0.2.0, gix-archive v0.2.0, gix-config-value v0.12.4, gix-tempfile v7.0.1, gix-utils v0.1.5, gix-lock v7.0.2, gix-ref v0.33.0, gix-sec v0.8.4, gix-prompt v0.5.3, gix-url v0.21.0, gix-credentials v0.17.0, gix-diff v0.33.0, gix-discover v0.22.0, gix-ignore v0.5.0, gix-bitmap v0.2.6, gix-index v0.21.0, gix-mailmap v0.16.0, gix-negotiate v0.5.0, gix-pack v0.40.0, gix-odb v0.50.0, gix-packetline v0.16.4, gix-transport v0.34.0, gix-protocol v0.36.0, gix-revision v0.18.0, gix-refspec v0.14.0, gix-worktree v0.22.0, gix v0.49.1 ([`5cb3589`](https://github.com/Byron/gitoxide/commit/5cb3589b74fc5376e02cbfe151e71344e1c417fe))
+ - Update changelogs prior to release ([`2fc66b5`](https://github.com/Byron/gitoxide/commit/2fc66b55097ed494b72d1af939ba5561f71fde97))
+ - Update license field following SPDX 2.1 license expression standard ([`9064ea3`](https://github.com/Byron/gitoxide/commit/9064ea31fae4dc59a56bdd3a06c0ddc990ee689e))
+</details>
+
+## 0.7.6 (2023-06-22)
+
+A maintenance release without user-facing changes.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 4 commits contributed to the release over the course of 5 calendar days.
+ - 15 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-date v0.6.0, gix-hash v0.11.3, gix-trace v0.1.1, gix-features v0.31.0, gix-actor v0.22.0, gix-path v0.8.2, gix-glob v0.9.0, gix-quote v0.4.5, gix-attributes v0.14.0, gix-chunk v0.4.3, gix-commitgraph v0.17.0, gix-config-value v0.12.2, gix-fs v0.3.0, gix-tempfile v7.0.0, gix-utils v0.1.3, gix-lock v7.0.0, gix-validate v0.7.6, gix-object v0.31.0, gix-ref v0.31.0, gix-sec v0.8.2, gix-config v0.24.0, gix-command v0.2.6, gix-prompt v0.5.2, gix-url v0.20.0, gix-credentials v0.16.0, gix-diff v0.31.0, gix-discover v0.20.0, gix-hashtable v0.2.2, gix-ignore v0.4.0, gix-bitmap v0.2.5, gix-revwalk v0.2.0, gix-traverse v0.28.0, gix-index v0.19.0, gix-mailmap v0.14.0, gix-negotiate v0.3.0, gix-pack v0.38.0, gix-odb v0.48.0, gix-packetline v0.16.3, gix-transport v0.33.0, gix-protocol v0.34.0, gix-revision v0.16.0, gix-refspec v0.12.0, gix-worktree v0.20.0, gix v0.47.0, gitoxide-core v0.29.0, gitoxide v0.27.0, safety bump 30 crates ([`ea9f942`](https://github.com/Byron/gitoxide/commit/ea9f9424e777f10da0e33bb9ffbbefd01c4c5a74))
+ - Prepare changelogs prior to release ([`18b0a37`](https://github.com/Byron/gitoxide/commit/18b0a371941aa2d4d62512437d5daa351ba99ffd))
+ - Merge branch 'corpus' ([`aa16c8c`](https://github.com/Byron/gitoxide/commit/aa16c8ce91452a3e3063cf1cf0240b6014c4743f))
+ - Change MSRV to 1.65 ([`4f635fc`](https://github.com/Byron/gitoxide/commit/4f635fc4429350bae2582d25de86429969d28f30))
+</details>
+
## 0.7.5 (2023-06-06)
A maintenance release without user-facing changes.
@@ -13,7 +100,7 @@ A maintenance release without user-facing changes.
<csr-read-only-do-not-edit/>
- - 8 commits contributed to the release over the course of 12 calendar days.
+ - 9 commits contributed to the release over the course of 12 calendar days.
- 72 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 +112,7 @@ A maintenance release without user-facing changes.
<details><summary>view details</summary>
* **Uncategorized**
+ - Release gix-date v0.5.1, gix-hash v0.11.2, gix-features v0.30.0, gix-actor v0.21.0, gix-path v0.8.1, gix-glob v0.8.0, gix-quote v0.4.4, gix-attributes v0.13.0, gix-chunk v0.4.2, gix-commitgraph v0.16.0, gix-config-value v0.12.1, gix-fs v0.2.0, gix-tempfile v6.0.0, gix-utils v0.1.2, gix-lock v6.0.0, gix-validate v0.7.5, gix-object v0.30.0, gix-ref v0.30.0, gix-sec v0.8.1, gix-config v0.23.0, gix-command v0.2.5, gix-prompt v0.5.1, gix-url v0.19.0, gix-credentials v0.15.0, gix-diff v0.30.0, gix-discover v0.19.0, gix-hashtable v0.2.1, gix-ignore v0.3.0, gix-bitmap v0.2.4, gix-traverse v0.26.0, gix-index v0.17.0, gix-mailmap v0.13.0, gix-revision v0.15.0, gix-negotiate v0.2.0, gix-pack v0.36.0, gix-odb v0.46.0, gix-packetline v0.16.2, gix-transport v0.32.0, gix-protocol v0.33.0, gix-refspec v0.11.0, gix-worktree v0.18.0, gix v0.45.0, safety bump 29 crates ([`9a9fa96`](https://github.com/Byron/gitoxide/commit/9a9fa96fa8a722bddc5c3b2270b0edf8f6615141))
- Prepare changelogs prior to release ([`8f15cec`](https://github.com/Byron/gitoxide/commit/8f15cec1ec7d5a9d56bb158f155011ef2bb3539b))
- Merge pull request #878 from blinxen/main ([`67da689`](https://github.com/Byron/gitoxide/commit/67da6894c8d8a24b982c732a1753a3e0a3300cc3))
- Include missing changelog file in some crates ([`0269eed`](https://github.com/Byron/gitoxide/commit/0269eedc08c21589b5381d9b7d7fcc7004160bf8))
diff --git a/vendor/gix-validate/Cargo.toml b/vendor/gix-validate/Cargo.toml
index b8a892a33..bc439fa66 100644
--- a/vendor/gix-validate/Cargo.toml
+++ b/vendor/gix-validate/Cargo.toml
@@ -11,9 +11,9 @@
[package]
edition = "2021"
-rust-version = "1.64"
+rust-version = "1.65"
name = "gix-validate"
-version = "0.7.5"
+version = "0.8.0"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
include = [
"src/**/*",
@@ -21,7 +21,7 @@ include = [
"CHANGELOG.md",
]
description = "Validation functions for various kinds of names in git"
-license = "MIT/Apache-2.0"
+license = "MIT OR Apache-2.0"
repository = "https://github.com/Byron/gitoxide"
[lib]
diff --git a/vendor/gix-validate/src/lib.rs b/vendor/gix-validate/src/lib.rs
index fd603aeb8..f7b6cc4aa 100644
--- a/vendor/gix-validate/src/lib.rs
+++ b/vendor/gix-validate/src/lib.rs
@@ -4,8 +4,9 @@
///
pub mod reference;
-pub use reference::name as refname;
///
pub mod tag;
-pub use tag::name as tagname;
+
+///
+pub mod submodule;
diff --git a/vendor/gix-validate/src/reference.rs b/vendor/gix-validate/src/reference.rs
index 0f32d0038..fff87e3b4 100644
--- a/vendor/gix-validate/src/reference.rs
+++ b/vendor/gix-validate/src/reference.rs
@@ -45,7 +45,7 @@ enum Mode {
}
fn validate(path: &BStr, mode: Mode) -> Result<&BStr, name::Error> {
- crate::tagname(path)?;
+ crate::tag::name(path)?;
if path[0] == b'/' {
return Err(name::Error::StartsWithSlash);
}
diff --git a/vendor/gix-validate/src/submodule.rs b/vendor/gix-validate/src/submodule.rs
new file mode 100644
index 000000000..6811f4ff2
--- /dev/null
+++ b/vendor/gix-validate/src/submodule.rs
@@ -0,0 +1,32 @@
+use bstr::{BStr, ByteSlice};
+
+///
+pub mod name {
+ /// The error used in [name()](super::name()).
+ #[derive(Debug, thiserror::Error)]
+ #[allow(missing_docs)]
+ pub enum Error {
+ #[error("Submodule names cannot be empty")]
+ Empty,
+ #[error("Submodules names must not contains '..'")]
+ ParentComponent,
+ }
+}
+
+/// Return the original `name` if it is valid, or the respective error indicating what was wrong with it.
+pub fn name(name: &BStr) -> Result<&BStr, name::Error> {
+ if name.is_empty() {
+ return Err(name::Error::Empty);
+ }
+ match name.find(b"..") {
+ Some(pos) => {
+ let &b = name.get(pos + 2).ok_or(name::Error::ParentComponent)?;
+ if b == b'/' || b == b'\\' {
+ Err(name::Error::ParentComponent)
+ } else {
+ Ok(name)
+ }
+ }
+ None => Ok(name),
+ }
+}