diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:25:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:25:56 +0000 |
commit | 018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch) | |
tree | a835ebdf2088ef88fa681f8fad45f09922c1ae9a /vendor/gix-submodule | |
parent | Adding debian version 1.75.0+dfsg1-5. (diff) | |
download | rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-submodule')
-rw-r--r-- | vendor/gix-submodule/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/gix-submodule/CHANGELOG.md | 204 | ||||
-rw-r--r-- | vendor/gix-submodule/Cargo.toml | 16 | ||||
-rw-r--r-- | vendor/gix-submodule/LICENSE-MIT | 2 | ||||
-rw-r--r-- | vendor/gix-submodule/tests/file/baseline.rs | 80 | ||||
-rw-r--r-- | vendor/gix-submodule/tests/file/mod.rs | 453 | ||||
-rwxr-xr-x | vendor/gix-submodule/tests/fixtures/basic.sh | 48 | ||||
-rw-r--r-- | vendor/gix-submodule/tests/fixtures/generated-archives/basic.tar.xz | bin | 32472 -> 0 bytes | |||
-rw-r--r-- | vendor/gix-submodule/tests/submodule.rs | 3 |
9 files changed, 11 insertions, 797 deletions
diff --git a/vendor/gix-submodule/.cargo-checksum.json b/vendor/gix-submodule/.cargo-checksum.json index 72c1e3993..677571ce7 100644 --- a/vendor/gix-submodule/.cargo-checksum.json +++ b/vendor/gix-submodule/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"d0e4158ec6a71783e7e2b37449b2fcc873610eb58715a44bd473eeb901da8e22","Cargo.toml":"b7d40e0d304ddf3e001ebf490a5a9a217de9daf08d99be2306f65faa02e12830","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","src/access.rs":"162ad231287795c40681f47eb516b91c706215687ea7ed7d7a98b762feb46d8c","src/config.rs":"2062c34f82e42517ac0d8d2d564643883249f6f44b5e8cc49f00f085ce66b31d","src/is_active_platform.rs":"fa89ba25ae7cde8f0b04bb032a27ad22919aeea7d285c003355cd9ea0d980157","src/lib.rs":"a896e4f0188322673835674b49be1b013f4aefa997fe25f34ad8d4fcc9c8d850","tests/file/baseline.rs":"8d80db5bdfcb0625153617c39fdada700921487a083391822dec4363c33fadb4","tests/file/mod.rs":"aa7b943bf8518e79df663e0de32b0266ac00bae2aa9f9c7653cf6745031a14a1","tests/fixtures/basic.sh":"22a14fd8fac3377b9a7653f60348ba0906777b2ecc23405c4b604c4834e7eec4","tests/fixtures/generated-archives/basic.tar.xz":"f1213af1023577c8c59e1a065530785e28ee10e4e04f731597aebc6a63e3dc86","tests/submodule.rs":"e42d1f34b35a3230f29ae4f04524c113b5059aa5753bbee1818e245888457ddd"},"package":"bba78c8d12aa24370178453ec3a472ff08dfaa657d116229f57f2c9cd469a1c2"}
\ No newline at end of file +{"files":{"Cargo.toml":"94bfcdf210ec5e080ffb962e199bdb3ea37b9d0f0a1f79efdc83279797716ee1","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"6f610e51b59dfbcbee281f58cc6d963bf716199dc7384dbaa94ccc3a6e343ce6","src/access.rs":"162ad231287795c40681f47eb516b91c706215687ea7ed7d7a98b762feb46d8c","src/config.rs":"2062c34f82e42517ac0d8d2d564643883249f6f44b5e8cc49f00f085ce66b31d","src/is_active_platform.rs":"fa89ba25ae7cde8f0b04bb032a27ad22919aeea7d285c003355cd9ea0d980157","src/lib.rs":"a896e4f0188322673835674b49be1b013f4aefa997fe25f34ad8d4fcc9c8d850"},"package":"02a3d7f60a95bdcaeb8981663c99d1c9f4de42aab1169524c949e948989809f9"}
\ No newline at end of file diff --git a/vendor/gix-submodule/CHANGELOG.md b/vendor/gix-submodule/CHANGELOG.md deleted file mode 100644 index 3bfdabc18..000000000 --- a/vendor/gix-submodule/CHANGELOG.md +++ /dev/null @@ -1,204 +0,0 @@ -# Changelog - -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.5.0 (2023-10-12) - -A maintenance release without user-facing changes. - -### Commit Statistics - -<csr-read-only-do-not-edit/> - - - 2 commits contributed to the release. - - 17 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-hash v0.13.1, gix-features v0.36.0, gix-actor v0.28.0, gix-object v0.38.0, gix-glob v0.14.0, gix-attributes v0.20.0, gix-command v0.2.10, gix-filter v0.6.0, gix-fs v0.8.0, gix-commitgraph v0.22.0, gix-revwalk v0.9.0, gix-traverse v0.34.0, gix-worktree-stream v0.6.0, gix-archive v0.6.0, gix-tempfile v11.0.0, gix-lock v11.0.0, gix-ref v0.38.0, gix-config v0.31.0, gix-url v0.25.0, gix-credentials v0.21.0, gix-diff v0.37.0, gix-discover v0.26.0, gix-ignore v0.9.0, gix-index v0.26.0, gix-mailmap v0.20.0, gix-negotiate v0.9.0, gix-pack v0.44.0, gix-odb v0.54.0, gix-pathspec v0.4.0, gix-packetline v0.16.7, gix-transport v0.37.0, gix-protocol v0.41.0, gix-revision v0.23.0, gix-refspec v0.19.0, gix-worktree v0.27.0, gix-status v0.2.0, gix-submodule v0.5.0, gix-worktree-state v0.4.0, gix v0.55.0, safety bump 37 crates ([`68e5432`](https://github.com/Byron/gitoxide/commit/68e54326e527a55dd5b5079921fc251615833040)) - - Prepare changelogs prior to release ([`1347a54`](https://github.com/Byron/gitoxide/commit/1347a54f84599d8f0aa935d6e64b16c2298d25cf)) -</details> - -## 0.4.0 (2023-09-24) - -A maintenance release without user-facing changes. - -### Commit Statistics - -<csr-read-only-do-not-edit/> - - - 2 commits contributed to the release. - - 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-features v0.35.0, gix-actor v0.27.0, gix-object v0.37.0, gix-glob v0.13.0, gix-attributes v0.19.0, gix-filter v0.5.0, gix-fs v0.7.0, gix-commitgraph v0.21.0, gix-revwalk v0.8.0, gix-traverse v0.33.0, gix-worktree-stream v0.5.0, gix-archive v0.5.0, gix-tempfile v10.0.0, gix-lock v10.0.0, gix-ref v0.37.0, gix-config v0.30.0, gix-url v0.24.0, gix-credentials v0.20.0, gix-diff v0.36.0, gix-discover v0.25.0, gix-ignore v0.8.0, gix-index v0.25.0, gix-mailmap v0.19.0, gix-negotiate v0.8.0, gix-pack v0.43.0, gix-odb v0.53.0, gix-pathspec v0.3.0, gix-transport v0.37.0, gix-protocol v0.40.0, gix-revision v0.22.0, gix-refspec v0.18.0, gix-status v0.1.0, gix-submodule v0.4.0, gix-worktree v0.26.0, gix-worktree-state v0.3.0, gix v0.54.0, gitoxide-core v0.32.0, gitoxide v0.30.0, safety bump 37 crates ([`7891fb1`](https://github.com/Byron/gitoxide/commit/7891fb17348ec2f4c997665f9a25be36e2713da4)) - - Prepare changelogs prior to release ([`8a60d5b`](https://github.com/Byron/gitoxide/commit/8a60d5b80877c213c3b646d3061e8a33e0e433ec)) -</details> - -## 0.3.0 (2023-09-08) - -### Bug Fixes (BREAKING) - - - <csr-id-072ee32f693a31161cd6a843da6582d13efbb20b/> use `dyn` trait where possible. - This reduces compile time due to avoiding duplication. - - <csr-id-25c5bcebd4dbc4ac189d8af044ed0352c6188ce8/> `IsActivePlatform::is_active()` now only considers the URL in passed configuration - Previously, it would consider the presence of `url` in the `.gitmodules` file as well, which is - not the way git does it. - -### Commit Statistics - -<csr-read-only-do-not-edit/> - - - 10 commits contributed to the release over the course of 17 calendar days. - - 17 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** - - Release gix-transport v0.36.0, gix-protocol v0.39.0, gix-revision v0.21.0, gix-refspec v0.17.0, gix-submodule v0.3.0, gix-worktree v0.25.0, gix-worktree-state v0.2.0, gix v0.53.0 ([`1ff3064`](https://github.com/Byron/gitoxide/commit/1ff30641b8724efd6699d8bef5c71d28454e98b9)) - - Release gix-date v0.8.0, gix-hash v0.13.0, gix-features v0.34.0, gix-actor v0.26.0, gix-object v0.36.0, gix-path v0.10.0, gix-glob v0.12.0, gix-attributes v0.18.0, gix-packetline-blocking v0.16.6, gix-filter v0.4.0, gix-fs v0.6.0, gix-commitgraph v0.20.0, gix-hashtable v0.4.0, gix-revwalk v0.7.0, gix-traverse v0.32.0, gix-worktree-stream v0.4.0, gix-archive v0.4.0, gix-config-value v0.14.0, gix-tempfile v9.0.0, gix-lock v9.0.0, gix-ref v0.36.0, gix-sec v0.10.0, gix-config v0.29.0, gix-prompt v0.7.0, gix-url v0.23.0, gix-credentials v0.19.0, gix-diff v0.35.0, gix-discover v0.24.0, gix-ignore v0.7.0, gix-index v0.24.0, gix-macros v0.1.0, gix-mailmap v0.18.0, gix-negotiate v0.7.0, gix-pack v0.42.0, gix-odb v0.52.0, gix-pathspec v0.2.0, gix-packetline v0.16.6, gix-transport v0.36.0, gix-protocol v0.39.0, gix-revision v0.21.0, gix-refspec v0.17.0, gix-submodule v0.3.0, gix-worktree v0.25.0, gix-worktree-state v0.2.0, gix v0.53.0, safety bump 39 crates ([`8bd0456`](https://github.com/Byron/gitoxide/commit/8bd045676bb2cdc02624ab93e73ff8518064ca38)) - - Prepare changelogs for release ([`375db06`](https://github.com/Byron/gitoxide/commit/375db06a8442378c3f7a922fae38e2a6694d9d04)) - - Merge branch 'optimizations' ([`6135a5e`](https://github.com/Byron/gitoxide/commit/6135a5ea8709646f01da62939a59dd3a9750e007)) - - Add example that tries to trip someone who reads something from the index ([`b35e544`](https://github.com/Byron/gitoxide/commit/b35e544383b9a7571961ff0628ca8db1b232bf52)) - - Merge branch `dyn`ification ([`f658fcc`](https://github.com/Byron/gitoxide/commit/f658fcc52dc2200ae34ca53dc10be97fb9012057)) - - Use `dyn` trait where possible. ([`072ee32`](https://github.com/Byron/gitoxide/commit/072ee32f693a31161cd6a843da6582d13efbb20b)) - - Merge branch 'adjustments-for-cargo' ([`b7560a2`](https://github.com/Byron/gitoxide/commit/b7560a2445b62f888bf5aa2ba4c5a47ae037cb23)) - - `IsActivePlatform::is_active()` now only considers the URL in passed configuration ([`25c5bce`](https://github.com/Byron/gitoxide/commit/25c5bcebd4dbc4ac189d8af044ed0352c6188ce8)) - - Merge branch 'gix-submodule' ([`363ee77`](https://github.com/Byron/gitoxide/commit/363ee77400805f473c9ad66eadad9214e7ab66f4)) -</details> - -## 0.2.0 (2023-08-22) - -<csr-id-229bd4899213f749a7cc124aa2b82a1368fba40f/> - -### Chore - - - <csr-id-229bd4899213f749a7cc124aa2b82a1368fba40f/> don't call crate 'WIP' in manifest anymore. - -### New Features - - - <csr-id-af1cab31fd5ead445c988cce058c136c81229ad1/> TBD a way to learn if submodules are active efficiently - -### Bug Fixes - - - <csr-id-e0d9b09d02f88536b93ab6a31fddf9483881c5c1/> `Modules::is_active()` now counts everything that doesn't match `submodule.active` (if present) as inactive. - - <csr-id-8172f0e0f19e84fdaedceb87399f3fab4a1eb563/> Assure `gix-submodule` works with Rust 1.65. - The previous version of this loop, possibly preferable, ran into - a borrow-check issue that was no more from Rust 1.70 onwards. - -### New Features (BREAKING) - - - <csr-id-3503f4948b42854256c9e8d8336ebe222fee980b/> remove `File::names_and_active_state()` in favor of `File::is_active_platform()`. - With this platform it's possible to make repeated checks to see if a named submodule is active. - - <csr-id-4a443e453285095daccdca0fed9e8486ce7892ab/> make API less error prone by enforcing overrides at instantiation time. - It's made so that overrides can still be applied at a later point. - -### Commit Statistics - -<csr-read-only-do-not-edit/> - - - 13 commits contributed to the release over the course of 4 calendar days. - - 15 days passed between releases. - - 6 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-url v0.22.0, gix-credentials v0.18.0, gix-diff v0.34.0, gix-discover v0.23.0, gix-ignore v0.6.0, gix-bitmap v0.2.7, gix-index v0.22.0, gix-mailmap v0.17.0, gix-negotiate v0.6.0, gix-pack v0.41.0, gix-odb v0.51.0, gix-pathspec v0.1.0, gix-packetline v0.16.5, gix-transport v0.35.0, gix-protocol v0.38.0, gix-revision v0.20.0, gix-refspec v0.16.0, gix-submodule v0.2.0, gix-worktree v0.24.0, gix-worktree-state v0.1.0, gix v0.52.0, gitoxide-core v0.31.0, gitoxide v0.29.0 ([`6c62e74`](https://github.com/Byron/gitoxide/commit/6c62e748240ac0980fc23fdf30f8477dea8b9bc3)) - - Release gix-date v0.7.3, gix-hash v0.12.0, gix-features v0.33.0, gix-actor v0.25.0, gix-object v0.35.0, gix-path v0.9.0, gix-glob v0.11.0, gix-quote v0.4.7, gix-attributes v0.17.0, gix-command v0.2.9, gix-packetline-blocking v0.16.5, gix-filter v0.3.0, gix-fs v0.5.0, gix-commitgraph v0.19.0, gix-hashtable v0.3.0, gix-revwalk v0.6.0, gix-traverse v0.31.0, gix-worktree-stream v0.3.0, gix-archive v0.3.0, gix-config-value v0.13.0, gix-tempfile v8.0.0, gix-lock v8.0.0, gix-ref v0.35.0, gix-sec v0.9.0, gix-config v0.28.0, gix-prompt v0.6.0, gix-url v0.22.0, gix-credentials v0.18.0, gix-diff v0.34.0, gix-discover v0.23.0, gix-ignore v0.6.0, gix-bitmap v0.2.7, gix-index v0.22.0, gix-mailmap v0.17.0, gix-negotiate v0.6.0, gix-pack v0.41.0, gix-odb v0.51.0, gix-pathspec v0.1.0, gix-packetline v0.16.5, gix-transport v0.35.0, gix-protocol v0.38.0, gix-revision v0.20.0, gix-refspec v0.16.0, gix-submodule v0.2.0, gix-worktree v0.24.0, gix-worktree-state v0.1.0, gix v0.52.0, gitoxide-core v0.31.0, gitoxide v0.29.0, safety bump 41 crates ([`30b2761`](https://github.com/Byron/gitoxide/commit/30b27615047692d3ced1b2d9c2ac15a80f79fbee)) - - Update changelogs prior to release ([`f23ea88`](https://github.com/Byron/gitoxide/commit/f23ea8828f2d9ba7559973daca388c9591bcc5fc)) - - Merge branch 'gix-submodule' ([`8f3f358`](https://github.com/Byron/gitoxide/commit/8f3f358800f1fe77d7ba7ebd396a90b692d3c0c1)) - - `Modules::is_active()` now counts everything that doesn't match `submodule.active` (if present) as inactive. ([`e0d9b09`](https://github.com/Byron/gitoxide/commit/e0d9b09d02f88536b93ab6a31fddf9483881c5c1)) - - Just fmt ([`0d258f4`](https://github.com/Byron/gitoxide/commit/0d258f40afcd848509e2b0c7c264e9f346ed1726)) - - Merge branch 'submodule-in-gix' ([`36f7b78`](https://github.com/Byron/gitoxide/commit/36f7b783c67b8a087076a130f5ee9b90b23bc3cc)) - - Remove `File::names_and_active_state()` in favor of `File::is_active_platform()`. ([`3503f49`](https://github.com/Byron/gitoxide/commit/3503f4948b42854256c9e8d8336ebe222fee980b)) - - Make API less error prone by enforcing overrides at instantiation time. ([`4a443e4`](https://github.com/Byron/gitoxide/commit/4a443e453285095daccdca0fed9e8486ce7892ab)) - - Assure `gix-submodule` works with Rust 1.65. ([`8172f0e`](https://github.com/Byron/gitoxide/commit/8172f0e0f19e84fdaedceb87399f3fab4a1eb563)) - - Don't call crate 'WIP' in manifest anymore. ([`229bd48`](https://github.com/Byron/gitoxide/commit/229bd4899213f749a7cc124aa2b82a1368fba40f)) - - Merge branch 'submodule-active' ([`a3afaa4`](https://github.com/Byron/gitoxide/commit/a3afaa42741616a0f1abeef9b54557e7c2b800cb)) - - TBD a way to learn if submodules are active efficiently ([`af1cab3`](https://github.com/Byron/gitoxide/commit/af1cab31fd5ead445c988cce058c136c81229ad1)) -</details> - -## 0.1.0 (2023-08-07) - -<csr-id-f7f136dbe4f86e7dee1d54835c420ec07c96cd78/> -<csr-id-533e887e80c5f7ede8392884562e1c5ba56fb9a8/> -<csr-id-3d8fa8fef9800b1576beab8a5bc39b821157a5ed/> - -The initial release. - -### Commit Statistics - -<csr-read-only-do-not-edit/> - - - 27 commits contributed to the release over the course of 518 calendar days. - - 3 commits were understood as [conventional](https://www.conventionalcommits.org). - - 2 unique issues were worked on: [#301](https://github.com/Byron/gitoxide/issues/301), [#691](https://github.com/Byron/gitoxide/issues/691) - -### Commit Details - -<csr-read-only-do-not-edit/> - -<details><summary>view details</summary> - - * **[#301](https://github.com/Byron/gitoxide/issues/301)** - - Prepare changelog ([`010ab15`](https://github.com/Byron/gitoxide/commit/010ab1542ec447bb2b825335dab322c5bb21a1aa)) - - Add stub for git-submodule ([`3f9bcd8`](https://github.com/Byron/gitoxide/commit/3f9bcd8a0608dbdc5673da055c65d9dc995f03f1)) - * **[#691](https://github.com/Byron/gitoxide/issues/691)** - - Set `rust-version` to 1.64 ([`55066ce`](https://github.com/Byron/gitoxide/commit/55066ce5fd71209abb5d84da2998b903504584bb)) - * **Uncategorized** - - Release gix-glob v0.10.2, gix-date v0.7.2, gix-validate v0.8.0, gix-object v0.34.0, gix-ref v0.34.0, gix-config v0.27.0, gix-commitgraph v0.18.2, gix-revwalk v0.5.0, gix-revision v0.19.0, gix-refspec v0.15.0, gix-submodule v0.1.0, safety bump 18 crates ([`4604f83`](https://github.com/Byron/gitoxide/commit/4604f83ef238dc07c85aaeae097399b67f3cfd0c)) - - Finailize `gix-submodule` changelog ([`cbe8e62`](https://github.com/Byron/gitoxide/commit/cbe8e622b306d072fa8e7f5bf25dc596810a48d2)) - - Set `gix-submodule` to version 0.1.0 ([`931fd1e`](https://github.com/Byron/gitoxide/commit/931fd1ec4416aa4869f097b1a3a2e82744da4c21)) - - 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)) - - `.gitmodule` file abstraction ([`6a2e6a4`](https://github.com/Byron/gitoxide/commit/6a2e6a436f76c8bbf2487f9967413a51356667a0)) - - Update license field following SPDX 2.1 license expression standard ([`9064ea3`](https://github.com/Byron/gitoxide/commit/9064ea31fae4dc59a56bdd3a06c0ddc990ee689e)) - - Merge branch 'corpus' ([`aa16c8c`](https://github.com/Byron/gitoxide/commit/aa16c8ce91452a3e3063cf1cf0240b6014c4743f)) - - Change MSRV to 1.65 ([`4f635fc`](https://github.com/Byron/gitoxide/commit/4f635fc4429350bae2582d25de86429969d28f30)) - - Merge branch 'main' into auto-clippy ([`3ef5c90`](https://github.com/Byron/gitoxide/commit/3ef5c90aebce23385815f1df674c1d28d58b4b0d)) - - Merge branch 'blinxen/main' ([`9375cd7`](https://github.com/Byron/gitoxide/commit/9375cd75b01aa22a0e2eed6305fe45fabfd6c1ac)) - - Include license files in all crates ([`facaaf6`](https://github.com/Byron/gitoxide/commit/facaaf633f01c857dcf2572c6dbe0a92b7105c1c)) - - Merge branch 'rename-crates' into inform-about-gix-rename ([`c9275b9`](https://github.com/Byron/gitoxide/commit/c9275b99ea43949306d93775d9d78c98fb86cfb1)) - - Adjust to renaming of `git-submodule` to `gix-submodule` ([`2c4a2d0`](https://github.com/Byron/gitoxide/commit/2c4a2d0113d5e60c50d2d72a1ff1cdf3e8ae77af)) - - Rename `git-submodule` to `gix-submodule` ([`d9a84a2`](https://github.com/Byron/gitoxide/commit/d9a84a2a4f5ca9b62857379135ac6be742363156)) - - Merge branch 'main' into http-config ([`bcd9654`](https://github.com/Byron/gitoxide/commit/bcd9654e56169799eb706646da6ee1f4ef2021a9)) - - Merge branch 'version2021' ([`0e4462d`](https://github.com/Byron/gitoxide/commit/0e4462df7a5166fe85c23a779462cdca8ee013e8)) - - Upgrade edition to 2021 in most crates. ([`3d8fa8f`](https://github.com/Byron/gitoxide/commit/3d8fa8fef9800b1576beab8a5bc39b821157a5ed)) - - Merge branch 'main' into index-from-tree ([`bc64b96`](https://github.com/Byron/gitoxide/commit/bc64b96a2ec781c72d1d4daad38aa7fb8b74f99b)) - - Merge branch 'main' into remote-ls-refs ([`e2ee3de`](https://github.com/Byron/gitoxide/commit/e2ee3ded97e5c449933712883535b30d151c7c78)) - - Merge branch 'docsrs-show-features' ([`31c2351`](https://github.com/Byron/gitoxide/commit/31c235140cad212d16a56195763fbddd971d87ce)) - - Uniformize deny attributes ([`f7f136d`](https://github.com/Byron/gitoxide/commit/f7f136dbe4f86e7dee1d54835c420ec07c96cd78)) - - Remove default link to cargo doc everywhere ([`533e887`](https://github.com/Byron/gitoxide/commit/533e887e80c5f7ede8392884562e1c5ba56fb9a8)) - - Release git-submodule v0.0.0 ([`d16821a`](https://github.com/Byron/gitoxide/commit/d16821a20d8446004d4a4e0f52fd50ba68e95eb1)) -</details> - diff --git a/vendor/gix-submodule/Cargo.toml b/vendor/gix-submodule/Cargo.toml index 6f31ca684..e6bfda8be 100644 --- a/vendor/gix-submodule/Cargo.toml +++ b/vendor/gix-submodule/Cargo.toml @@ -13,8 +13,12 @@ edition = "2021" rust-version = "1.65" name = "gix-submodule" -version = "0.5.0" +version = "0.6.0" authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] +include = [ + "src/**/*", + "LICENSE-*", +] description = "A crate of the gitoxide project dealing git submodules" license = "MIT OR Apache-2.0" repository = "https://github.com/Byron/gitoxide" @@ -27,19 +31,19 @@ version = "1.5.0" default-features = false [dependencies.gix-config] -version = "^0.31.0" +version = "^0.32.0" [dependencies.gix-path] -version = "^0.10.0" +version = "^0.10.1" [dependencies.gix-pathspec] -version = "^0.4.0" +version = "^0.4.1" [dependencies.gix-refspec] -version = "^0.19.0" +version = "^0.20.0" [dependencies.gix-url] -version = "^0.25.0" +version = "^0.25.2" [dependencies.thiserror] version = "1.0.44" diff --git a/vendor/gix-submodule/LICENSE-MIT b/vendor/gix-submodule/LICENSE-MIT index b58e818f1..97c2fa7d8 100644 --- a/vendor/gix-submodule/LICENSE-MIT +++ b/vendor/gix-submodule/LICENSE-MIT @@ -1,5 +1,3 @@ -MIT License - Copyright (c) 2018-2021 Sebastian Thiel, and [contributors](https://github.com/byron/gitoxide/contributors). Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/vendor/gix-submodule/tests/file/baseline.rs b/vendor/gix-submodule/tests/file/baseline.rs deleted file mode 100644 index dc71ed3ab..000000000 --- a/vendor/gix-submodule/tests/file/baseline.rs +++ /dev/null @@ -1,80 +0,0 @@ -use std::{ffi::OsStr, path::PathBuf}; - -use bstr::ByteSlice; -use gix_features::fs::walkdir::Parallelism; - -#[test] -fn common_values_and_names_by_path() -> crate::Result { - let modules = module_files() - .map(|(path, stripped)| { - gix_submodule::File::from_bytes(&std::fs::read(path).unwrap(), stripped, &Default::default()) - }) - .collect::<Result<Vec<_>, _>>()?; - - assert_eq!( - modules - .iter() - .map(|m| { m.config_path().expect("present").to_owned() }) - .collect::<Vec<_>>(), - [ - "empty-clone/.gitmodules", - "multiple/.gitmodules", - "not-a-submodule/.gitmodules", - "recursive-clone/.gitmodules", - "recursive-clone/submodule/.gitmodules", - "relative-clone/.gitmodules", - "relative-clone/submodule/.gitmodules", - "super/.gitmodules", - "super/submodule/.gitmodules", - "super-clone/.gitmodules", - "super-clone/submodule/.gitmodules", - "top-only-clone/.gitmodules" - ] - .into_iter() - .map(PathBuf::from) - .collect::<Vec<_>>(), - "config_path() yields the path provided when instantiating (for .gitmodules), and not the path of a submodule." - ); - - assert_eq!( - { - let mut v = modules.iter().flat_map(gix_submodule::File::names).collect::<Vec<_>>(); - v.sort(); - v.dedup(); - v - }, - [".a/..c", "a/b", "a/d\\", "a\\e", "submodule"] - .into_iter() - .map(|n| n.as_bytes().as_bstr()) - .collect::<Vec<_>>(), - "names can be iterated" - ); - - for module in &modules { - for name in module.names() { - let path = module.path(name)?; - assert_eq!(module.name_by_path(path.as_ref()).expect("found"), name); - } - } - Ok(()) -} - -fn module_files() -> impl Iterator<Item = (PathBuf, PathBuf)> { - let dir = gix_testtools::scripted_fixture_read_only("basic.sh").expect("valid fixture"); - gix_features::fs::walkdir_sorted_new(&dir, Parallelism::Serial) - .follow_links(false) - .into_iter() - .filter_map(move |entry| { - let entry = entry.unwrap(); - (entry.file_name() == OsStr::new(".gitmodules")).then(|| { - ( - entry.path().to_owned(), - entry - .path() - .strip_prefix(&dir) - .expect("can only provide sub-dirs") - .to_owned(), - ) - }) - }) -} diff --git a/vendor/gix-submodule/tests/file/mod.rs b/vendor/gix-submodule/tests/file/mod.rs deleted file mode 100644 index cecb7b759..000000000 --- a/vendor/gix-submodule/tests/file/mod.rs +++ /dev/null @@ -1,453 +0,0 @@ -fn submodule(bytes: &str) -> gix_submodule::File { - gix_submodule::File::from_bytes(bytes.as_bytes(), None, &Default::default()).expect("valid module") -} - -mod is_active_platform { - use std::str::FromStr; - - fn module_file(name: &str) -> crate::Result<gix_submodule::File> { - let modules = gix_testtools::scripted_fixture_read_only("basic.sh")? - .join(name) - .join(".gitmodules"); - Ok(gix_submodule::File::from_bytes( - std::fs::read(&modules)?.as_slice(), - modules, - &Default::default(), - )?) - } - - use bstr::{BStr, ByteSlice}; - - fn multi_modules() -> crate::Result<gix_submodule::File> { - module_file("multiple") - } - - fn assume_valid_active_state<'a>( - module: &'a gix_submodule::File, - config: &'a gix_config::File<'static>, - defaults: gix_pathspec::Defaults, - ) -> crate::Result<Vec<(&'a str, bool)>> { - assume_valid_active_state_with_attrs(module, config, defaults, |_, _, _, _| { - unreachable!("shouldn't be called") - }) - } - - fn assume_valid_active_state_with_attrs<'a>( - module: &'a gix_submodule::File, - config: &'a gix_config::File<'static>, - defaults: gix_pathspec::Defaults, - mut attributes: impl FnMut( - &BStr, - gix_pathspec::attributes::glob::pattern::Case, - bool, - &mut gix_pathspec::attributes::search::Outcome, - ) -> bool - + 'a, - ) -> crate::Result<Vec<(&'a str, bool)>> { - let mut platform = module.is_active_platform(config, defaults)?; - Ok(module - .names() - .map(|name| { - ( - name.to_str().expect("valid"), - platform.is_active(config, name, &mut attributes).expect("valid"), - ) - }) - .collect()) - } - - #[test] - fn without_submodule_in_index() -> crate::Result { - let module = module_file("not-a-submodule")?; - assert_eq!( - module.names().map(ToOwned::to_owned).collect::<Vec<_>>(), - ["submodule"], - "entries can be read" - ); - Ok(()) - } - - #[test] - fn without_any_additional_settings_all_are_inactive_if_they_have_a_url() -> crate::Result { - let module = multi_modules()?; - assert_eq!( - assume_valid_active_state(&module, &Default::default(), Default::default())?, - &[ - ("submodule", false), - ("a/b", false), - (".a/..c", false), - ("a/d\\", false), - ("a\\e", false) - ] - ); - Ok(()) - } - - #[test] - fn submodules_with_active_config_are_considered_active_or_inactive() -> crate::Result { - let module = multi_modules()?; - assert_eq!( - assume_valid_active_state( - &module, - &gix_config::File::from_str( - "[submodule.submodule]\n active = 0\n url = set \n[submodule \"a/b\"]\n active = false \n url = set \n[submodule \".a/..c\"] active = 1" - )?, - Default::default() - )?, - &[ - ("submodule", false), - ("a/b", false), - (".a/..c", true), - ("a/d\\", false), - ("a\\e", false) - ] - ); - Ok(()) - } - - #[test] - fn submodules_with_active_config_override_pathspecs() -> crate::Result { - let module = multi_modules()?; - assert_eq!( - assume_valid_active_state( - &module, - &gix_config::File::from_str( - "[submodule.submodule]\n active = 0\n[submodule]\n active = *\n[submodule]\n active = :!a*" - )?, - Default::default() - )?, - &[ - ("submodule", false), - ("a/b", false), - (".a/..c", true), - ("a/d\\", false), - ("a\\e", false) - ] - ); - Ok(()) - } - - #[test] - fn pathspecs_matter_even_if_they_do_not_match() -> crate::Result { - let module = multi_modules()?; - assert_eq!( - assume_valid_active_state( - &module, - &gix_config::File::from_str("[submodule]\n active = submodule ")?, - Default::default() - )?, - &[ - ("submodule", true), - ("a/b", false), - (".a/..c", false), - ("a/d\\", false), - ("a\\e", false) - ] - ); - assert_eq!( - assume_valid_active_state( - &module, - &gix_config::File::from_str("[submodule]\n active = :!submodule ")?, - Default::default() - )?, - &[ - ("submodule", false), - ("a/b", true), - (".a/..c", true), - ("a/d\\", true), - ("a\\e", true) - ] - ); - Ok(()) - } -} - -mod path { - use gix_submodule::config::path::Error; - - use crate::file::submodule; - - fn submodule_path(value: &str) -> Error { - let module = submodule(&format!("[submodule.a]\npath = {value}")); - module.path("a".into()).unwrap_err() - } - - #[test] - fn valid() -> crate::Result { - let module = submodule("[submodule.a]\n path = relative/path/submodule"); - assert_eq!(module.path("a".into())?.as_ref(), "relative/path/submodule"); - Ok(()) - } - - #[test] - fn validate_upon_retrieval() { - assert!(matches!( - submodule_path(if cfg!(windows) { - "c:\\\\hello" - } else { - "/definitely/absolute\\\\" - }), - Error::Absolute { .. } - )); - assert!(matches!(submodule_path(""), Error::Missing { .. })); - assert!(matches!(submodule_path("../attack"), Error::OutsideOfWorktree { .. })); - - { - let module = submodule("[submodule.a]\n path"); - assert!(matches!(module.path("a".into()).unwrap_err(), Error::Missing { .. })); - } - - { - let module = submodule("[submodule.a]\n"); - assert!(matches!(module.path("a".into()).unwrap_err(), Error::Missing { .. })); - } - } -} - -mod url { - use gix_submodule::config::url::Error; - - use crate::file::submodule; - - fn submodule_url(value: &str) -> Error { - let module = submodule(&format!("[submodule.a]\nurl = {value}")); - module.url("a".into()).unwrap_err() - } - - #[test] - fn valid() -> crate::Result { - let module = submodule("[submodule.a]\n url = path-to-repo"); - assert_eq!(module.url("a".into())?.to_bstring(), "path-to-repo"); - Ok(()) - } - - #[test] - fn validate_upon_retrieval() { - assert!(matches!(submodule_url(""), Error::Missing { .. })); - { - let module = submodule("[submodule.a]\n url"); - assert!(matches!(module.url("a".into()).unwrap_err(), Error::Missing { .. })); - } - - { - let module = submodule("[submodule.a]\n"); - assert!(matches!(module.url("a".into()).unwrap_err(), Error::Missing { .. })); - } - - assert!(matches!(submodule_url("file://"), Error::Parse { .. })); - } -} - -mod update { - use std::str::FromStr; - - use gix_submodule::config::{update::Error, Update}; - - use crate::file::submodule; - - fn submodule_update(value: &str) -> Error { - let module = submodule(&format!("[submodule.a]\nupdate = {value}")); - module.update("a".into()).unwrap_err() - } - - #[test] - fn default() { - assert_eq!(Update::default(), Update::Checkout, "as defined in the docs"); - } - - #[test] - fn valid() -> crate::Result { - for (valid, expected) in [ - ("checkout", Update::Checkout), - ("rebase", Update::Rebase), - ("merge", Update::Merge), - ("none", Update::None), - ] { - let module = submodule(&format!("[submodule.a]\n update = {valid}")); - assert_eq!(module.update("a".into())?.expect("present"), expected); - } - Ok(()) - } - - #[test] - fn valid_in_overrides() -> crate::Result { - let mut module = submodule("[submodule.a]\n update = merge"); - let repo_config = gix_config::File::from_str("[submodule.a]\n update = !dangerous")?; - let prev_names = module.names().map(ToOwned::to_owned).collect::<Vec<_>>(); - module.append_submodule_overrides(&repo_config); - - assert_eq!( - module.update("a".into())?.expect("present"), - Update::Command("dangerous".into()), - "overridden values are picked up and make commands possible - these are local" - ); - assert_eq!( - module.names().map(ToOwned::to_owned).collect::<Vec<_>>(), - prev_names, - "Appending more configuration sections doesn't affect name listing" - ); - Ok(()) - } - - #[test] - fn validate_upon_retrieval() { - assert!(matches!(submodule_update(""), Error::Invalid { .. })); - assert!(matches!(submodule_update("bogus"), Error::Invalid { .. })); - assert!( - matches!( - submodule_update("!dangerous"), - Error::CommandForbiddenInModulesConfiguration { .. } - ), - "forbidden unless it's an override" - ); - } -} - -mod fetch_recurse { - use gix_submodule::config::FetchRecurse; - - use crate::file::submodule; - - #[test] - fn default() { - assert_eq!( - FetchRecurse::default(), - FetchRecurse::OnDemand, - "as defined in git codebase actually" - ); - } - - #[test] - fn valid() -> crate::Result { - for (valid, expected) in [ - ("yes", FetchRecurse::Always), - ("true", FetchRecurse::Always), - ("", FetchRecurse::Never), - ("no", FetchRecurse::Never), - ("false", FetchRecurse::Never), - ("on-demand", FetchRecurse::OnDemand), - ] { - let module = submodule(&format!("[submodule.a]\n fetchRecurseSubmodules = {valid}")); - assert_eq!(module.fetch_recurse("a".into())?.expect("present"), expected); - } - let module = submodule("[submodule.a]\n fetchRecurseSubmodules"); - assert_eq!( - module.fetch_recurse("a".into())?.expect("present"), - FetchRecurse::Always, - "no value means true, which means to always recurse" - ); - Ok(()) - } - - #[test] - fn validate_upon_retrieval() -> crate::Result { - for invalid in ["foo", "ney", "On-demand"] { - let module = submodule(&format!("[submodule.a]\n fetchRecurseSubmodules = \"{invalid}\"")); - assert!(module.fetch_recurse("a".into()).is_err()); - } - Ok(()) - } -} - -mod ignore { - use gix_submodule::config::Ignore; - - use crate::file::submodule; - - #[test] - fn default() { - assert_eq!(Ignore::default(), Ignore::None, "as defined in the docs"); - } - - #[test] - fn valid() -> crate::Result { - for (valid, expected) in [ - ("all", Ignore::All), - ("dirty", Ignore::Dirty), - ("untracked", Ignore::Untracked), - ("none", Ignore::None), - ] { - let module = submodule(&format!("[submodule.a]\n ignore = {valid}")); - assert_eq!(module.ignore("a".into())?.expect("present"), expected); - } - let module = submodule("[submodule.a]\n ignore"); - assert!( - module.ignore("a".into())?.is_none(), - "no value is interpreted as non-existing string, hence the caller will see None" - ); - Ok(()) - } - - #[test] - fn validate_upon_retrieval() -> crate::Result { - for invalid in ["All", ""] { - let module = submodule(&format!("[submodule.a]\n ignore = \"{invalid}\"")); - assert!(module.ignore("a".into()).is_err()); - } - Ok(()) - } -} - -mod branch { - use gix_submodule::config::Branch; - - use crate::file::submodule; - - #[test] - fn valid() -> crate::Result { - for (valid, expected) in [ - (".", Branch::CurrentInSuperproject), - ("", Branch::Name("HEAD".into())), - ("master", Branch::Name("master".into())), - ("feature/a", Branch::Name("feature/a".into())), - ( - "abcde12345abcde12345abcde12345abcde12345", - Branch::Name("abcde12345abcde12345abcde12345abcde12345".into()), - ), - ] { - let module = submodule(&format!("[submodule.a]\n branch = {valid}")); - assert_eq!(module.branch("a".into())?.expect("present"), expected); - } - let module = submodule("[submodule.a]\n branch"); - assert!( - module.branch("a".into())?.is_none(), - "no value implies it's not set, but the caller will then default" - ); - Ok(()) - } - - #[test] - fn validate_upon_retrieval() -> crate::Result { - let module = submodule("[submodule.a]\n branch = /invalid"); - assert!(module.branch("a".into()).is_err()); - Ok(()) - } -} - -#[test] -fn shallow() -> crate::Result { - let module = submodule("[submodule.a]\n shallow"); - assert_eq!( - module.shallow("a".into())?, - Some(true), - "shallow is a simple boolean without anything special (yet)" - ); - Ok(()) -} - -mod append_submodule_overrides { - use std::str::FromStr; - - use crate::file::submodule; - - #[test] - fn last_of_multiple_values_wins() -> crate::Result { - let mut module = submodule("[submodule.a] url = from-module"); - let repo_config = - gix_config::File::from_str("[submodule.a]\n url = a\n url = b\n ignore = x\n [submodule.a]\n url = c\n[submodule.b] url = not-relevant")?; - module.append_submodule_overrides(&repo_config); - Ok(()) - } -} - -mod baseline; diff --git a/vendor/gix-submodule/tests/fixtures/basic.sh b/vendor/gix-submodule/tests/fixtures/basic.sh deleted file mode 100755 index 203e6afde..000000000 --- a/vendor/gix-submodule/tests/fixtures/basic.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -set -eu -o pipefail - -set -x -git init -touch empty && git add empty -git commit -m upstream -git clone . super -git clone super multiple -(cd multiple - git submodule add ../multiple submodule - git submodule add ../multiple a/b - git submodule add --name .a/..c ../multiple a\\c - git submodule add --name a/d\\ ../multiple a/d\\ - git submodule add --name a\\e ../multiple a/e/ - git commit -m "subsubmodule-a" -) - -(cd super - git submodule add ../multiple submodule - git commit -m "submodule" -) -git clone super super-clone -(cd super-clone - git submodule update --init --recursive -) -git clone super empty-clone -(cd empty-clone - git submodule init -) -git clone super top-only-clone -git clone super relative-clone -(cd relative-clone - git submodule update --init --recursive -) -git clone super recursive-clone -(cd recursive-clone - git submodule update --init --recursive -) - -git clone super not-a-submodule -(cd not-a-submodule - cp .gitmodules modules.bak - git rm submodule - echo fake > submodule - mv modules.bak .gitmodules - git add submodule && git commit -m "no submodule in index and commit, but in configuration" -) diff --git a/vendor/gix-submodule/tests/fixtures/generated-archives/basic.tar.xz b/vendor/gix-submodule/tests/fixtures/generated-archives/basic.tar.xz Binary files differdeleted file mode 100644 index d483db5e7..000000000 --- a/vendor/gix-submodule/tests/fixtures/generated-archives/basic.tar.xz +++ /dev/null diff --git a/vendor/gix-submodule/tests/submodule.rs b/vendor/gix-submodule/tests/submodule.rs deleted file mode 100644 index 75144b10c..000000000 --- a/vendor/gix-submodule/tests/submodule.rs +++ /dev/null @@ -1,3 +0,0 @@ -use gix_testtools::Result; - -mod file; |