diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:42 +0000 |
commit | cec1877e180393eba0f6ddb0cf97bf3a791631c7 (patch) | |
tree | 47b4dac2a9dd9a40c30c251b4d4a72d7ccf77e9f /vendor/gix-features | |
parent | Adding debian version 1.74.1+dfsg1-1. (diff) | |
download | rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.tar.xz rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-features')
-rw-r--r-- | vendor/gix-features/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/gix-features/CHANGELOG.md | 34 | ||||
-rw-r--r-- | vendor/gix-features/Cargo.toml | 4 | ||||
-rw-r--r-- | vendor/gix-features/src/hash.rs | 28 |
4 files changed, 56 insertions, 12 deletions
diff --git a/vendor/gix-features/.cargo-checksum.json b/vendor/gix-features/.cargo-checksum.json index 086fdc237..906c5fecc 100644 --- a/vendor/gix-features/.cargo-checksum.json +++ b/vendor/gix-features/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"ad033e719adbd1f2d77a83005e05e205ab72271ad0119d49743f6defee9da073","Cargo.toml":"3c40a4a3227333b290498f1d2b3ed975165704007f95f2dbdeefe75638a7761e","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","src/cache.rs":"0f66cbbe9f5808b21ee255e157a88e2cf7717427214a08b5b9b4f65e4153a617","src/decode.rs":"bf614320c6b69556da40d8412c73fb6a8648c80b7d75b9b2525eb62ac6c8d802","src/fs.rs":"cdcd94974e87e64e98d227876c57e4c198f7920538621b726c0d02466cbed691","src/hash.rs":"62a6c705a9dc7c03214f55bb0f9b2607dbecac5eed81b4883bc5d9970afdb072","src/interrupt.rs":"e2cc5cf58d596ffff9d6b91952a659e4cb7211cb62423b520737abe98a8c25de","src/io.rs":"031f3a9aefb8eff48b98d5794d9c5f277781a4e1ad6ba22f43d79f5ce5b70e14","src/lib.rs":"3b1c85dc37cfc3f1240b5bfe6ba1b0ad70361e3c4f992c1c06badf295bf2056a","src/parallel/eager_iter.rs":"6ab493e6d868c3ac64f4038934a6a71d0d0cbd6e52c4addeec54887aaeab9e8c","src/parallel/in_order.rs":"a1c8c2f6ee4a91d6103f3fc6f27525e309cccc49ffc661d1403dbcdc57d120ad","src/parallel/in_parallel.rs":"4a24250843a3eb0fabe272eeec53bfd5d2c838cdff9e66fb6827fd0c85b81e78","src/parallel/mod.rs":"87abd8147a53ec8d02defd9044e8e12c18fb018446a7cb98ec90cf2fb47133ed","src/parallel/reduce.rs":"3ed124c86af1860dbb07f01ad0249714955327c687bda7ee024cf3a3baf94186","src/parallel/serial.rs":"ee4ff7d6546dc8304e60df9b564d8540b173c093dc9cc78f0ef6caa902fafdd7","src/progress.rs":"1710618bece767f07c05da99a54d27d55a817e69f58a7fdb3b9caafd89f25252","src/threading.rs":"60ff581054d27a0d6ba3df1c14919966274c8f2853981886e3f75812e601fdc3","src/zlib/mod.rs":"720eebfa556bff56a9d90042d4c922f0be0259a9ff921b4f7edf1be0c09ae660","src/zlib/stream/deflate/mod.rs":"c712255c72fa74e2d79af27ad90905d3389e5f760c3f396d936f82906e7c1e14","src/zlib/stream/deflate/tests.rs":"c82d29bf27d1ba54cca4447a750bbaac94547a7ed4eb6e9a311600b8da9a63b8","src/zlib/stream/inflate.rs":"8bad4115c592310cf9f0053f635c8882a0d39e582119ac12dd321ac43d84d1a0","src/zlib/stream/mod.rs":"0af2967eb75a07308c789a4187490cc7c36693b7f7d8a4f7705f3b4b90568f6f","tests/features.rs":"573ade257c38b53430be7e724705e68f7cbca258413c11cd0eec64981c44d97f","tests/hash.rs":"d03f99e2ed1f00066e14212e7e65ee3ae076df42935d38c47d5a563b69367e8c","tests/parallel/in_order_iter.rs":"acd746c25929406748de5080b7ae5dcb2516269f037944d7aa84802520b885b4","tests/parallel/mod.rs":"798b36204033558adb16f44d494e893ea593ef92d09418f8b84ac7cb4cf278af","tests/parallel_shared.rs":"5d8dabaa42fce087e2ec57843cfe69f2be1ca2fa3518030b5a31aeaa706675e0","tests/parallel_shared_threaded.rs":"5d8dabaa42fce087e2ec57843cfe69f2be1ca2fa3518030b5a31aeaa706675e0","tests/parallel_threaded.rs":"02cfb39c7e81bca7e92a851c731e993cad13eff87ec1f8a228d74761ec964f7a","tests/pipe.rs":"ea9e429327dd86002c001f8fc069ac798bd7952ddf3f3b0dd24e3fa69d73c08b","tests/trace/mod.rs":"9896e8394068e99e460607d75291912f511479b223a4722389c26d23eb512d3c"},"package":"9b9ff423ae4983f762659040d13dd7a5defbd54b6a04ac3cc7347741cec828cd"}
\ No newline at end of file +{"files":{"CHANGELOG.md":"efc2c2a6729341c09c114b89b81b8e52040ac8fea98e599c32a439a4ca140f2b","Cargo.toml":"9360a9748c34b0e765fb676618096168346c6788f2dd22f4f1ac1162dd072003","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","src/cache.rs":"0f66cbbe9f5808b21ee255e157a88e2cf7717427214a08b5b9b4f65e4153a617","src/decode.rs":"bf614320c6b69556da40d8412c73fb6a8648c80b7d75b9b2525eb62ac6c8d802","src/fs.rs":"cdcd94974e87e64e98d227876c57e4c198f7920538621b726c0d02466cbed691","src/hash.rs":"3dd15036189e7691c3a55105df366a38893e29ccec97a7a653197fec9df75a35","src/interrupt.rs":"e2cc5cf58d596ffff9d6b91952a659e4cb7211cb62423b520737abe98a8c25de","src/io.rs":"031f3a9aefb8eff48b98d5794d9c5f277781a4e1ad6ba22f43d79f5ce5b70e14","src/lib.rs":"3b1c85dc37cfc3f1240b5bfe6ba1b0ad70361e3c4f992c1c06badf295bf2056a","src/parallel/eager_iter.rs":"6ab493e6d868c3ac64f4038934a6a71d0d0cbd6e52c4addeec54887aaeab9e8c","src/parallel/in_order.rs":"a1c8c2f6ee4a91d6103f3fc6f27525e309cccc49ffc661d1403dbcdc57d120ad","src/parallel/in_parallel.rs":"4a24250843a3eb0fabe272eeec53bfd5d2c838cdff9e66fb6827fd0c85b81e78","src/parallel/mod.rs":"87abd8147a53ec8d02defd9044e8e12c18fb018446a7cb98ec90cf2fb47133ed","src/parallel/reduce.rs":"3ed124c86af1860dbb07f01ad0249714955327c687bda7ee024cf3a3baf94186","src/parallel/serial.rs":"ee4ff7d6546dc8304e60df9b564d8540b173c093dc9cc78f0ef6caa902fafdd7","src/progress.rs":"1710618bece767f07c05da99a54d27d55a817e69f58a7fdb3b9caafd89f25252","src/threading.rs":"60ff581054d27a0d6ba3df1c14919966274c8f2853981886e3f75812e601fdc3","src/zlib/mod.rs":"720eebfa556bff56a9d90042d4c922f0be0259a9ff921b4f7edf1be0c09ae660","src/zlib/stream/deflate/mod.rs":"c712255c72fa74e2d79af27ad90905d3389e5f760c3f396d936f82906e7c1e14","src/zlib/stream/deflate/tests.rs":"c82d29bf27d1ba54cca4447a750bbaac94547a7ed4eb6e9a311600b8da9a63b8","src/zlib/stream/inflate.rs":"8bad4115c592310cf9f0053f635c8882a0d39e582119ac12dd321ac43d84d1a0","src/zlib/stream/mod.rs":"0af2967eb75a07308c789a4187490cc7c36693b7f7d8a4f7705f3b4b90568f6f","tests/features.rs":"573ade257c38b53430be7e724705e68f7cbca258413c11cd0eec64981c44d97f","tests/hash.rs":"d03f99e2ed1f00066e14212e7e65ee3ae076df42935d38c47d5a563b69367e8c","tests/parallel/in_order_iter.rs":"acd746c25929406748de5080b7ae5dcb2516269f037944d7aa84802520b885b4","tests/parallel/mod.rs":"798b36204033558adb16f44d494e893ea593ef92d09418f8b84ac7cb4cf278af","tests/parallel_shared.rs":"5d8dabaa42fce087e2ec57843cfe69f2be1ca2fa3518030b5a31aeaa706675e0","tests/parallel_shared_threaded.rs":"5d8dabaa42fce087e2ec57843cfe69f2be1ca2fa3518030b5a31aeaa706675e0","tests/parallel_threaded.rs":"02cfb39c7e81bca7e92a851c731e993cad13eff87ec1f8a228d74761ec964f7a","tests/pipe.rs":"ea9e429327dd86002c001f8fc069ac798bd7952ddf3f3b0dd24e3fa69d73c08b","tests/trace/mod.rs":"9896e8394068e99e460607d75291912f511479b223a4722389c26d23eb512d3c"},"package":"51f4365ba17c4f218d7fd9ec102b8d2d3cb0ca200a835e81151ace7778aec827"}
\ No newline at end of file diff --git a/vendor/gix-features/CHANGELOG.md b/vendor/gix-features/CHANGELOG.md index fa3adcfee..cef88480b 100644 --- a/vendor/gix-features/CHANGELOG.md +++ b/vendor/gix-features/CHANGELOG.md @@ -5,6 +5,36 @@ 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.36.0 (2023-10-12) + +### New Features (BREAKING) + + - <csr-id-4c03fdbc831349ea7f45b68331f554ade859abf5/> add `hash::bytes_with_header()`, also make it 32bit compatible. + That way it's possible to hash entire files as object. + Previously it wasn't possible to read more than u32::MAX bytes even + on 32 bit system even though we are streaming the data. + +### Commit Statistics + +<csr-read-only-do-not-edit/> + + - 3 commits contributed to the release over the course of 13 calendar days. + - 17 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** + - Prepare changelogs prior to release ([`1347a54`](https://github.com/Byron/gitoxide/commit/1347a54f84599d8f0aa935d6e64b16c2298d25cf)) + - Merge branch 'reset' ([`b842691`](https://github.com/Byron/gitoxide/commit/b8426919a491dc3a7df01ee3f258fc0d8a3a327c)) + - Add `hash::bytes_with_header()`, also make it 32bit compatible. ([`4c03fdb`](https://github.com/Byron/gitoxide/commit/4c03fdbc831349ea7f45b68331f554ade859abf5)) +</details> + ## 0.35.0 (2023-09-24) ### New Features @@ -27,7 +57,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `cargo-auditable` by default. Related issues: - https://github.com/NixOS/nixpkgs/issues/253911 -- https://github.com/rust-secure-code/cargo-auditable/issues/124 ### Bug Fixes (BREAKING) @@ -38,7 +67,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 <csr-read-only-do-not-edit/> - - 8 commits contributed to the release over the course of 15 calendar days. + - 9 commits contributed to the release over the course of 15 calendar days. - 16 days passed between releases. - 3 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -50,6 +79,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 <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)) - Merge branch 'reset' ([`54a8495`](https://github.com/Byron/gitoxide/commit/54a849545140f7f1c0c7564c418071c0a76a34e7)) - Add `threading::make_mut()` to allow obtaining a mutable reference to shared data. ([`5197196`](https://github.com/Byron/gitoxide/commit/51971969d2cf13587d4bfbd4cb047f2377b8bc0f)) diff --git a/vendor/gix-features/Cargo.toml b/vendor/gix-features/Cargo.toml index 114f245c1..3cbf222a7 100644 --- a/vendor/gix-features/Cargo.toml +++ b/vendor/gix-features/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.65" name = "gix-features" -version = "0.35.0" +version = "0.36.0" authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] description = "A crate to integrate various capabilities using compile-time feature flags" license = "MIT OR Apache-2.0" @@ -88,7 +88,7 @@ optional = true default-features = false [dependencies.gix-hash] -version = "^0.13.0" +version = "^0.13.1" [dependencies.gix-trace] version = "^0.1.3" diff --git a/vendor/gix-features/src/hash.rs b/vendor/gix-features/src/hash.rs index 435e018e9..33054a783 100644 --- a/vendor/gix-features/src/hash.rs +++ b/vendor/gix-features/src/hash.rs @@ -96,7 +96,7 @@ pub fn hasher(kind: gix_hash::Kind) -> Sha1 { #[cfg(all(feature = "progress", any(feature = "rustsha1", feature = "fast-sha1")))] pub fn bytes_of_file( path: &std::path::Path, - num_bytes_from_start: usize, + num_bytes_from_start: u64, kind: gix_hash::Kind, progress: &mut dyn crate::progress::Progress, should_interrupt: &std::sync::atomic::AtomicBool, @@ -110,28 +110,42 @@ pub fn bytes_of_file( ) } -/// Similar to [`bytes_of_file`], but operates on an already open file. +/// Similar to [`bytes_of_file`], but operates on a stream of bytes. #[cfg(all(feature = "progress", any(feature = "rustsha1", feature = "fast-sha1")))] pub fn bytes( read: &mut dyn std::io::Read, - num_bytes_from_start: usize, + num_bytes_from_start: u64, kind: gix_hash::Kind, progress: &mut dyn crate::progress::Progress, should_interrupt: &std::sync::atomic::AtomicBool, ) -> std::io::Result<gix_hash::ObjectId> { - let mut hasher = hasher(kind); + bytes_with_hasher(read, num_bytes_from_start, hasher(kind), progress, should_interrupt) +} + +/// Similar to [`bytes()`], but takes a `hasher` instead of a hash kind. +#[cfg(all(feature = "progress", any(feature = "rustsha1", feature = "fast-sha1")))] +pub fn bytes_with_hasher( + read: &mut dyn std::io::Read, + num_bytes_from_start: u64, + mut hasher: Sha1, + progress: &mut dyn crate::progress::Progress, + should_interrupt: &std::sync::atomic::AtomicBool, +) -> std::io::Result<gix_hash::ObjectId> { let start = std::time::Instant::now(); // init progress before the possibility for failure, as convenience in case people want to recover - progress.init(Some(num_bytes_from_start), crate::progress::bytes()); + progress.init( + Some(num_bytes_from_start as prodash::progress::Step), + crate::progress::bytes(), + ); const BUF_SIZE: usize = u16::MAX as usize; let mut buf = [0u8; BUF_SIZE]; let mut bytes_left = num_bytes_from_start; while bytes_left > 0 { - let out = &mut buf[..BUF_SIZE.min(bytes_left)]; + let out = &mut buf[..BUF_SIZE.min(bytes_left as usize)]; read.read_exact(out)?; - bytes_left -= out.len(); + bytes_left -= out.len() as u64; progress.inc_by(out.len()); hasher.update(out); if should_interrupt.load(std::sync::atomic::Ordering::SeqCst) { |