summaryrefslogtreecommitdiffstats
path: root/vendor/gix-filter
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/gix-filter
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-filter')
-rw-r--r--vendor/gix-filter/.cargo-checksum.json2
-rw-r--r--vendor/gix-filter/CHANGELOG.md50
-rw-r--r--vendor/gix-filter/Cargo.lock60
-rw-r--r--vendor/gix-filter/Cargo.toml10
-rw-r--r--vendor/gix-filter/src/eol/convert_to_git.rs2
-rw-r--r--vendor/gix-filter/src/pipeline/convert.rs29
-rw-r--r--vendor/gix-filter/src/pipeline/util.rs2
-rw-r--r--vendor/gix-filter/tests/pipeline/convert_to_git.rs14
8 files changed, 114 insertions, 55 deletions
diff --git a/vendor/gix-filter/.cargo-checksum.json b/vendor/gix-filter/.cargo-checksum.json
index 203b42b3a..710f52e3b 100644
--- a/vendor/gix-filter/.cargo-checksum.json
+++ b/vendor/gix-filter/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"840e33c40020b813371613365e13ef1dee679e9c644c812b5c983054c92ae061","Cargo.lock":"108da2aa8f8baac64c3686555565c795b39a2eb50a419bc734fdfe89dc026337","Cargo.toml":"03088c52929252a2faeb38667dad2b5f0106c973b3afc71ff672b1b23c3e62c0","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","examples/arrow.rs":"9dad54b7a3b3032560788209357b2f37e487899e46e521a345d30ec48e151b8f","src/driver/apply.rs":"71237764befa14039bc8001e61b3277f79b4100fc0d987127306699210f517e9","src/driver/delayed.rs":"990f52963dae9aef2c32a1f63fecfe5721022b432296770a871a779b43932e1b","src/driver/init.rs":"18220c5d5da678508352bcc78dab6551c14df75c943614951e5c00aecd0c692d","src/driver/mod.rs":"b43227e3c329db27d8aa121f4adc34e7ba6921db63e76534cf08fb73c5bc3d89","src/driver/process/client.rs":"3501764e9fa3eca5e038d956c207b90400539416f7eda634830ff032fe61dcf2","src/driver/process/mod.rs":"9eefffe43dbd5315441cd08cdb813d047e3d624d0840030ee7bb8b450d9d3cfc","src/driver/process/server.rs":"964acb09eb447c8129f25ba2a488b697b041828b5e130425ab7ae0425022b013","src/driver/shutdown.rs":"27002849563468693d98eb6f2788cec272b5c8915bb42a0fc00c4a92d3ccba72","src/eol/convert_to_git.rs":"e9c1865c3e5a788b2751b7188eedf7ac788f6cce23447e68044d2e383309f5e4","src/eol/convert_to_worktree.rs":"9a9c06b129c9f61d2aed9b7fa9224f7d31996712be81a119fe7f7d4422060e73","src/eol/mod.rs":"9bed52dcbbb4455ec7b1b0ff16ef158afcd063d6bb740d7d3690a4912f4d9e54","src/eol/utils.rs":"7afb1702f595e54a53bce55b3ac42ddcc494b193fb2d5f8adf29c6463c0717fd","src/ident.rs":"574bba21fc10c2e2c1847cc9bf32e03a469e22dd6b9c360196ffa66cf3f11c40","src/lib.rs":"4c8e58f6b0758e9f6442fc19652d4ddf6c366890b91a9b53a1be85869b5bff66","src/pipeline/convert.rs":"54c39d1f5a56e84b22f49876c5106e8760fedd528685879d63a9684f39d4a23e","src/pipeline/mod.rs":"8d008f4d83846c145a4188776c7df635707486ae6bd6f12f3850e5a418eeab52","src/pipeline/tests.rs":"57081ae094bb4384f8cc0f651f1b9def696a7c5416c9a7737bc19c9513c409eb","src/pipeline/util.rs":"79c38e60cd23e96e976c76b6674db9678ddff307934fe31292ac91d81417eae3","src/worktree/encode_to_git.rs":"e7ee1b2ea8f3c8b5a67b816c03d30de554d28e0c8a2ef7fb4a08a21877c4d29a","src/worktree/encode_to_worktree.rs":"5c6c07b0510467c5bc23ec2d6b0b9588fbe83033270e6b8eecb95ddd2faf0da4","src/worktree/encoding.rs":"f6be0f6de6016ea7e8dd66695ad5b33d273d911056726aef5937b8b724b35544","src/worktree/mod.rs":"49b88cc411797a7492ea8ff168cbfc2ccbfc4c20a0d50ad0c382f4b3f731f034","tests/driver/mod.rs":"5f5971585c723543c6027d9c88a9a5518d09107c79af2eadfe3c5248c05e9aff","tests/eol/convert_to_git.rs":"eab4d779cd5994dad2d8fee7e1cd07715c852ea8d4919d2acc15df44c4c5171c","tests/eol/convert_to_worktree.rs":"f60a67ce7d1ae89ebb9d12792f36ff69454b207ab19318a01a5533ece2a8cb2f","tests/eol/mod.rs":"443cdf101fb949f5a1fee83e3c47279258c39c0e808210fdac29322fb8930fa4","tests/filter.rs":"a239e58925089504903eb2d52ff617ca58eca42d80173045a0fbfb3a340e366c","tests/fixtures/baseline.sh":"8e9e2982b2050fa41c851811ff92b1920c431f05daccd6e05ef3fae5788f3abc","tests/fixtures/generated-archives/pipeline_repos.tar.xz":"756c232a96c52fe02bd9002b6813edccfea7c1889075946e2f490da8b058bb80","tests/fixtures/pipeline_repos.sh":"2a168ce8d09fdd5d03ca82deaf105e8dcc51831d9f71a065bc56e35b2f5e5e68","tests/ident/mod.rs":"dc4d68ab493e63abed0c171cccb823eb90981a9b51e7ba824bf1f1377388eead","tests/pipeline/convert_to_git.rs":"0038002616a772af4c37427f52ff3138024fe1f962a9564a964fe90043f64876","tests/pipeline/convert_to_worktree.rs":"76fe13e9df083b2d5830170d3aaf0feac7329cdddc9c7b4f10e855ad8cd84047","tests/pipeline/mod.rs":"4edc80271c76e59a53cf57d09ebba7be3ea2999a0128f39bcda2f972786bf204","tests/worktree/mod.rs":"0f1d7d4e9e8a8211a8107854903e4792b70bcad51427d308624f6d27a14a017c"},"package":"1be40d28cd41445bb6cd52c4d847d915900e5466f7433eaee6a9e0a3d1d88b08"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"932775fa0d68646cb5b8520590b7ac3af4b7d5e82f1050334bab143970d79cfc","Cargo.lock":"b69116ce660d74eb3e4305d8aeb893a7ce29ac91f06511043d80c29f0dd7a0e3","Cargo.toml":"d3a517da8bf1ff9643973f09fbf9945ff43b306599fbb49e2642fe8c7e1d29ad","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","examples/arrow.rs":"9dad54b7a3b3032560788209357b2f37e487899e46e521a345d30ec48e151b8f","src/driver/apply.rs":"71237764befa14039bc8001e61b3277f79b4100fc0d987127306699210f517e9","src/driver/delayed.rs":"990f52963dae9aef2c32a1f63fecfe5721022b432296770a871a779b43932e1b","src/driver/init.rs":"18220c5d5da678508352bcc78dab6551c14df75c943614951e5c00aecd0c692d","src/driver/mod.rs":"b43227e3c329db27d8aa121f4adc34e7ba6921db63e76534cf08fb73c5bc3d89","src/driver/process/client.rs":"3501764e9fa3eca5e038d956c207b90400539416f7eda634830ff032fe61dcf2","src/driver/process/mod.rs":"9eefffe43dbd5315441cd08cdb813d047e3d624d0840030ee7bb8b450d9d3cfc","src/driver/process/server.rs":"964acb09eb447c8129f25ba2a488b697b041828b5e130425ab7ae0425022b013","src/driver/shutdown.rs":"27002849563468693d98eb6f2788cec272b5c8915bb42a0fc00c4a92d3ccba72","src/eol/convert_to_git.rs":"6155ded8ea4b2de480f9cd4d40bc64238e35c405109f6ddf1f967eb2557f2d29","src/eol/convert_to_worktree.rs":"9a9c06b129c9f61d2aed9b7fa9224f7d31996712be81a119fe7f7d4422060e73","src/eol/mod.rs":"9bed52dcbbb4455ec7b1b0ff16ef158afcd063d6bb740d7d3690a4912f4d9e54","src/eol/utils.rs":"7afb1702f595e54a53bce55b3ac42ddcc494b193fb2d5f8adf29c6463c0717fd","src/ident.rs":"574bba21fc10c2e2c1847cc9bf32e03a469e22dd6b9c360196ffa66cf3f11c40","src/lib.rs":"4c8e58f6b0758e9f6442fc19652d4ddf6c366890b91a9b53a1be85869b5bff66","src/pipeline/convert.rs":"2d7b0c6baa92901c6b6b7c2ce9b2e1c0fa1eb8ec09f76714a0a01a0113d8165f","src/pipeline/mod.rs":"8d008f4d83846c145a4188776c7df635707486ae6bd6f12f3850e5a418eeab52","src/pipeline/tests.rs":"57081ae094bb4384f8cc0f651f1b9def696a7c5416c9a7737bc19c9513c409eb","src/pipeline/util.rs":"dc48f234895a234bb435ae2e1b3884cc4b7a931eb3aba56fc05051d963c943bb","src/worktree/encode_to_git.rs":"e7ee1b2ea8f3c8b5a67b816c03d30de554d28e0c8a2ef7fb4a08a21877c4d29a","src/worktree/encode_to_worktree.rs":"5c6c07b0510467c5bc23ec2d6b0b9588fbe83033270e6b8eecb95ddd2faf0da4","src/worktree/encoding.rs":"f6be0f6de6016ea7e8dd66695ad5b33d273d911056726aef5937b8b724b35544","src/worktree/mod.rs":"49b88cc411797a7492ea8ff168cbfc2ccbfc4c20a0d50ad0c382f4b3f731f034","tests/driver/mod.rs":"5f5971585c723543c6027d9c88a9a5518d09107c79af2eadfe3c5248c05e9aff","tests/eol/convert_to_git.rs":"eab4d779cd5994dad2d8fee7e1cd07715c852ea8d4919d2acc15df44c4c5171c","tests/eol/convert_to_worktree.rs":"f60a67ce7d1ae89ebb9d12792f36ff69454b207ab19318a01a5533ece2a8cb2f","tests/eol/mod.rs":"443cdf101fb949f5a1fee83e3c47279258c39c0e808210fdac29322fb8930fa4","tests/filter.rs":"a239e58925089504903eb2d52ff617ca58eca42d80173045a0fbfb3a340e366c","tests/fixtures/baseline.sh":"8e9e2982b2050fa41c851811ff92b1920c431f05daccd6e05ef3fae5788f3abc","tests/fixtures/generated-archives/pipeline_repos.tar.xz":"756c232a96c52fe02bd9002b6813edccfea7c1889075946e2f490da8b058bb80","tests/fixtures/pipeline_repos.sh":"2a168ce8d09fdd5d03ca82deaf105e8dcc51831d9f71a065bc56e35b2f5e5e68","tests/ident/mod.rs":"dc4d68ab493e63abed0c171cccb823eb90981a9b51e7ba824bf1f1377388eead","tests/pipeline/convert_to_git.rs":"8d64ed5445c6093d67c850526e18e0c51928ee35c6c4c8a384bd90cc719b38db","tests/pipeline/convert_to_worktree.rs":"76fe13e9df083b2d5830170d3aaf0feac7329cdddc9c7b4f10e855ad8cd84047","tests/pipeline/mod.rs":"4edc80271c76e59a53cf57d09ebba7be3ea2999a0128f39bcda2f972786bf204","tests/worktree/mod.rs":"0f1d7d4e9e8a8211a8107854903e4792b70bcad51427d308624f6d27a14a017c"},"package":"92f674d3fdb6b1987b04521ec9a5b7be8650671f2c4bbd17c3c81e2a364242ff"} \ No newline at end of file
diff --git a/vendor/gix-filter/CHANGELOG.md b/vendor/gix-filter/CHANGELOG.md
index 946c14d95..368d21716 100644
--- a/vendor/gix-filter/CHANGELOG.md
+++ b/vendor/gix-filter/CHANGELOG.md
@@ -5,6 +5,53 @@ 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.6.0 (2023-10-12)
+
+### Bug Fixes
+
+ - <csr-id-b5b50f8fdb781b7c9a2ff5c8b462940e5098a94d/> hanging `Read` implementation of `pipeline::convert::ToGitOutcome`.
+ This codepath was never tested and its function more subtle than one could have known.
+ Also fix incorrect configuration handling which could lead to binary files with `text=auto`
+ to be identified as text, which would then require conversion.
+
+### Bug Fixes (BREAKING)
+
+ - <csr-id-260c78191e88d2e2c744d85e6f75e7941c24ef43/> don't provide path to object-retrieval callback of `Pipeline::convert::to_git::IndexObjectFn()`.
+ It implies that one has to be ready to fetch any kind of path from the index, even though it's always the path to
+ the file that is currently converted.
+
+ Also fix a bug that could cause it to return input as unchanged even though it was read into a buffer already.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 6 commits contributed to the release over the course of 8 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
+
+### 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>
+
+ * **Uncategorized**
+ - Prepare changelogs prior to release ([`1347a54`](https://github.com/Byron/gitoxide/commit/1347a54f84599d8f0aa935d6e64b16c2298d25cf))
+ - Fix docs ([`995bc84`](https://github.com/Byron/gitoxide/commit/995bc840664cbd4aeb7f95592e3125dee63bdcd4))
+ - Thanks clippy ([`345712d`](https://github.com/Byron/gitoxide/commit/345712dcdfddcccc630bbfef2ed4f461b21550d3))
+ - Merge branch 'reset' ([`b842691`](https://github.com/Byron/gitoxide/commit/b8426919a491dc3a7df01ee3f258fc0d8a3a327c))
+ - Hanging `Read` implementation of `pipeline::convert::ToGitOutcome`. ([`b5b50f8`](https://github.com/Byron/gitoxide/commit/b5b50f8fdb781b7c9a2ff5c8b462940e5098a94d))
+ - Don't provide path to object-retrieval callback of `Pipeline::convert::to_git::IndexObjectFn()`. ([`260c781`](https://github.com/Byron/gitoxide/commit/260c78191e88d2e2c744d85e6f75e7941c24ef43))
+</details>
+
## 0.5.0 (2023-09-24)
A maintenance release without user-facing changes.
@@ -13,7 +60,7 @@ A maintenance release without user-facing changes.
<csr-read-only-do-not-edit/>
- - 1 commit contributed to the release.
+ - 2 commits contributed to the release.
- 16 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 +72,7 @@ A maintenance release without user-facing changes.
<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>
diff --git a/vendor/gix-filter/Cargo.lock b/vendor/gix-filter/Cargo.lock
index 9c70b109b..db4c91b82 100644
--- a/vendor/gix-filter/Cargo.lock
+++ b/vendor/gix-filter/Cargo.lock
@@ -35,12 +35,6 @@ dependencies = [
]
[[package]]
-name = "byteyarn"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7534301c0ea17abb4db06d75efc7b4b0fa360fce8e175a4330d721c71c942ff"
-
-[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -66,9 +60,9 @@ dependencies = [
[[package]]
name = "gix-actor"
-version = "0.27.0"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08c60e982c5290897122d4e2622447f014a2dadd5a18cb73d50bb91b31645e27"
+checksum = "948a5f9e43559d16faf583694f1c742eb401ce24ce8e6f2238caedea7486433c"
dependencies = [
"bstr",
"btoi",
@@ -80,16 +74,16 @@ dependencies = [
[[package]]
name = "gix-attributes"
-version = "0.19.0"
+version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2451665e70709ba4753b623ef97511ee98c4a73816b2c5b5df25678d607ed820"
+checksum = "dca120f0c6562d2d7cae467f2466e576d9f7f189beec2af2e026145107c729e2"
dependencies = [
"bstr",
- "byteyarn",
"gix-glob",
"gix-path",
"gix-quote",
"gix-trace",
+ "kstring",
"smallvec",
"thiserror",
"unicode-bom",
@@ -97,9 +91,9 @@ dependencies = [
[[package]]
name = "gix-command"
-version = "0.2.9"
+version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f28f654184b5f725c5737c7e4f466cbd8f0102ac352d5257eeab19647ee4256"
+checksum = "3c576cfbf577f72c097b5f88aedea502cd62952bdc1fb3adcab4531d5525a4c7"
dependencies = [
"bstr",
]
@@ -118,19 +112,20 @@ dependencies = [
[[package]]
name = "gix-features"
-version = "0.35.0"
+version = "0.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b9ff423ae4983f762659040d13dd7a5defbd54b6a04ac3cc7347741cec828cd"
+checksum = "51f4365ba17c4f218d7fd9ec102b8d2d3cb0ca200a835e81151ace7778aec827"
dependencies = [
"gix-hash",
"gix-trace",
"libc",
+ "prodash",
"sha1_smol",
]
[[package]]
name = "gix-filter"
-version = "0.5.0"
+version = "0.6.0"
dependencies = [
"bstr",
"encoding_rs",
@@ -149,9 +144,9 @@ dependencies = [
[[package]]
name = "gix-glob"
-version = "0.13.0"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9d76e85f11251dcf751d2c5e918a14f562db5be6f727fd24775245653e9b19d"
+checksum = "8fac08925dbc14d414bd02eb45ffb4cecd912d1fce3883f867bd0103c192d3e4"
dependencies = [
"bitflags",
"bstr",
@@ -161,9 +156,9 @@ dependencies = [
[[package]]
name = "gix-hash"
-version = "0.13.0"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ccf425543779cddaa4a7c62aba3fa9d90ea135b160be0a72dd93c063121ad4a"
+checksum = "1884c7b41ea0875217c1be9ce91322f90bde433e91d374d0e1276073a51ccc60"
dependencies = [
"faster-hex",
"thiserror",
@@ -171,9 +166,9 @@ dependencies = [
[[package]]
name = "gix-object"
-version = "0.37.0"
+version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e7e19616c67967374137bae83e950e9b518a9ea8a605069bd6716ada357fd6f"
+checksum = "740f2a44267f58770a1cb3a3d01d14e67b089c7136c48d4bddbb3cfd2bf86a51"
dependencies = [
"bstr",
"btoi",
@@ -255,6 +250,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
+name = "kstring"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec3066350882a1cd6d950d055997f379ac37fd39f81cd4d8ed186032eb3c5747"
+dependencies = [
+ "static_assertions",
+]
+
+[[package]]
name = "libc"
version = "0.2.147"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -300,6 +304,12 @@ dependencies = [
]
[[package]]
+name = "prodash"
+version = "26.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "794b5bf8e2d19b53dcdcec3e4bba628e20f5b6062503ba89281fa7037dd7bbcf"
+
+[[package]]
name = "quote"
version = "1.0.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -347,6 +357,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9"
[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
name = "syn"
version = "2.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/vendor/gix-filter/Cargo.toml b/vendor/gix-filter/Cargo.toml
index 3d8edccbe..cec28d7f2 100644
--- a/vendor/gix-filter/Cargo.toml
+++ b/vendor/gix-filter/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.65"
name = "gix-filter"
-version = "0.5.0"
+version = "0.6.0"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
description = "A crate of the gitoxide project implementing git filters"
license = "MIT OR Apache-2.0"
@@ -31,16 +31,16 @@ default-features = false
version = "0.8.32"
[dependencies.gix-attributes]
-version = "^0.19.0"
+version = "^0.20.0"
[dependencies.gix-command]
-version = "^0.2.9"
+version = "^0.2.10"
[dependencies.gix-hash]
-version = "^0.13.0"
+version = "^0.13.1"
[dependencies.gix-object]
-version = "^0.37.0"
+version = "^0.38.0"
[dependencies.gix-packetline]
version = "^0.16.6"
diff --git a/vendor/gix-filter/src/eol/convert_to_git.rs b/vendor/gix-filter/src/eol/convert_to_git.rs
index 1bd1e919f..94258ed9d 100644
--- a/vendor/gix-filter/src/eol/convert_to_git.rs
+++ b/vendor/gix-filter/src/eol/convert_to_git.rs
@@ -81,7 +81,7 @@ pub(crate) mod function {
return Ok(false);
}
- if let Some(()) = index_object(buf).map_err(|err| Error::FetchObjectFromIndex(err))? {
+ if let Some(()) = index_object(buf).map_err(Error::FetchObjectFromIndex)? {
let has_crlf_in_index = buf
.find_byte(b'\r')
.map(|_| Stats::from_bytes(buf))
diff --git a/vendor/gix-filter/src/pipeline/convert.rs b/vendor/gix-filter/src/pipeline/convert.rs
index 1294944cb..85f6a9b18 100644
--- a/vendor/gix-filter/src/pipeline/convert.rs
+++ b/vendor/gix-filter/src/pipeline/convert.rs
@@ -21,12 +21,9 @@ pub mod configuration {
///
pub mod to_git {
- use bstr::BStr;
-
- /// A function that writes a buffer like `fn(rela_path, &mut buf)` with by tes of an object in the index that is the one
- /// that should be converted.
+ /// A function that fills `buf` `fn(&mut buf)` with the data stored in the index of the file that should be converted.
pub type IndexObjectFn<'a> =
- dyn FnMut(&BStr, &mut Vec<u8>) -> Result<Option<()>, Box<dyn std::error::Error + Send + Sync>> + 'a;
+ dyn FnMut(&mut Vec<u8>) -> Result<Option<()>, Box<dyn std::error::Error + Send + Sync>> + 'a;
/// The error returned by [Pipeline::convert_to_git()][super::Pipeline::convert_to_git()].
#[derive(Debug, thiserror::Error)]
@@ -91,7 +88,7 @@ impl Pipeline {
self.options.eol_config,
)?;
- let mut changed = false;
+ let mut in_buffer = false;
// this is just an approximation, but it's as good as it gets without reading the actual input.
let would_convert_eol = eol::convert_to_git(
b"\r\n",
@@ -119,12 +116,13 @@ impl Pipeline {
}
self.bufs.clear();
read.read_to_end(&mut self.bufs.src)?;
- changed = true;
+ in_buffer = true;
}
}
- if !changed && (apply_ident_filter || encoding.is_some() || would_convert_eol) {
+ if !in_buffer && (apply_ident_filter || encoding.is_some() || would_convert_eol) {
self.bufs.clear();
src.read_to_end(&mut self.bufs.src)?;
+ in_buffer = true;
}
if let Some(encoding) = encoding {
@@ -139,28 +137,25 @@ impl Pipeline {
},
)?;
self.bufs.swap();
- changed = true;
}
if eol::convert_to_git(
&self.bufs.src,
digest,
&mut self.bufs.dest,
- &mut |buf| index_object(bstr_path.as_ref(), buf),
+ &mut |buf| index_object(buf),
eol::convert_to_git::Options {
round_trip_check: self.options.crlf_roundtrip_check.to_eol_roundtrip_check(rela_path),
config: self.options.eol_config,
},
)? {
self.bufs.swap();
- changed = true;
}
if apply_ident_filter && ident::undo(&self.bufs.src, &mut self.bufs.dest) {
self.bufs.swap();
- changed = true;
}
- Ok(if changed {
+ Ok(if in_buffer {
ToGitOutcome::Buffer(&self.bufs.src)
} else {
ToGitOutcome::Unchanged(src)
@@ -263,7 +258,7 @@ pub enum ToWorktreeOutcome<'input, 'pipeline> {
}
impl<'input, 'pipeline> ToWorktreeOutcome<'input, 'pipeline> {
- /// Return true if this outcome is delayed. In that case, one isn't allowed to use [`Read`][std::io::Read] or cause a panic.
+ /// Return true if this outcome is delayed. In that case, one isn't allowed to use [`Read`] or cause a panic.
pub fn is_delayed(&self) -> bool {
matches!(
self,
@@ -320,17 +315,17 @@ where
match self {
ToGitOutcome::Unchanged(r) => r.read(buf),
ToGitOutcome::Process(r) => r.read(buf),
- ToGitOutcome::Buffer(mut r) => r.read(buf),
+ ToGitOutcome::Buffer(r) => r.read(buf),
}
}
}
-impl<R> ToGitOutcome<'_, R>
+impl<'a, R> ToGitOutcome<'a, R>
where
R: std::io::Read,
{
/// If we contain a buffer, and not a stream, return it.
- pub fn as_bytes(&self) -> Option<&[u8]> {
+ pub fn as_bytes(&self) -> Option<&'a [u8]> {
match self {
ToGitOutcome::Unchanged(_) | ToGitOutcome::Process(_) => None,
ToGitOutcome::Buffer(b) => Some(b),
diff --git a/vendor/gix-filter/src/pipeline/util.rs b/vendor/gix-filter/src/pipeline/util.rs
index a92ac25ef..ab10db08e 100644
--- a/vendor/gix-filter/src/pipeline/util.rs
+++ b/vendor/gix-filter/src/pipeline/util.rs
@@ -170,7 +170,7 @@ impl<'driver> Configuration<'driver> {
let attr_digest = digest;
digest = match digest {
None => Some(config.auto_crlf.into()),
- Some(AttributesDigest::TextAuto) => Some(config.to_eol().into()),
+ Some(AttributesDigest::Text) => Some(config.to_eol().into()),
_ => digest,
};
diff --git a/vendor/gix-filter/tests/pipeline/convert_to_git.rs b/vendor/gix-filter/tests/pipeline/convert_to_git.rs
index 3a627f28d..cfa747e2b 100644
--- a/vendor/gix-filter/tests/pipeline/convert_to_git.rs
+++ b/vendor/gix-filter/tests/pipeline/convert_to_git.rs
@@ -1,6 +1,6 @@
use std::{io::Read, path::Path};
-use bstr::{BStr, ByteSlice};
+use bstr::ByteSlice;
use gix_filter::{eol, pipeline::CrlfRoundTripCheck};
use crate::{driver::apply::driver_with_process, pipeline::pipeline};
@@ -19,7 +19,7 @@ fn no_driver_but_filter_with_autocrlf() -> gix_testtools::Result {
)
})?;
- let out = pipe.convert_to_git(
+ let mut out = pipe.convert_to_git(
"hi\r\n".as_bytes(),
Path::new("any.txt"),
&mut |_path, _attrs| {},
@@ -31,6 +31,9 @@ fn no_driver_but_filter_with_autocrlf() -> gix_testtools::Result {
"hi\n",
"the read is read into memory if there is no driver"
);
+ let mut buf = Vec::new();
+ out.read_to_end(&mut buf)?;
+ assert_eq!(buf.as_bstr(), "hi\n", "we can consume the output");
Ok(())
}
@@ -132,14 +135,11 @@ fn no_filter_means_reader_is_returned_unchanged() -> gix_testtools::Result {
}
#[allow(clippy::ptr_arg)]
-fn no_call(_path: &BStr, _buf: &mut Vec<u8>) -> Result<Option<()>, Box<dyn std::error::Error + Send + Sync>> {
+fn no_call(_buf: &mut Vec<u8>) -> Result<Option<()>, Box<dyn std::error::Error + Send + Sync>> {
unreachable!("index function will not be called")
}
#[allow(clippy::ptr_arg)]
-fn no_object_in_index(
- _path: &BStr,
- _buf: &mut Vec<u8>,
-) -> Result<Option<()>, Box<dyn std::error::Error + Send + Sync>> {
+fn no_object_in_index(_buf: &mut Vec<u8>) -> Result<Option<()>, Box<dyn std::error::Error + Send + Sync>> {
Ok(None)
}