diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
commit | c23a457e72abe608715ac76f076f47dc42af07a5 (patch) | |
tree | 2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/gix/src/object/tree/diff | |
parent | Releasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-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/src/object/tree/diff')
-rw-r--r-- | vendor/gix/src/object/tree/diff/for_each.rs | 5 | ||||
-rw-r--r-- | vendor/gix/src/object/tree/diff/mod.rs | 4 | ||||
-rw-r--r-- | vendor/gix/src/object/tree/diff/rewrites.rs | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/vendor/gix/src/object/tree/diff/for_each.rs b/vendor/gix/src/object/tree/diff/for_each.rs index a72033182..3932f9027 100644 --- a/vendor/gix/src/object/tree/diff/for_each.rs +++ b/vendor/gix/src/object/tree/diff/for_each.rs @@ -75,8 +75,9 @@ impl<'a, 'old> Platform<'a, 'old> { } Err(gix_diff::tree::changes::Error::Cancelled) => delegate .err - .map(|err| Err(Error::ForEach(Box::new(err)))) - .unwrap_or(Err(Error::Diff(gix_diff::tree::changes::Error::Cancelled))), + .map_or(Err(Error::Diff(gix_diff::tree::changes::Error::Cancelled)), |err| { + Err(Error::ForEach(Box::new(err))) + }), Err(err) => Err(err.into()), } } diff --git a/vendor/gix/src/object/tree/diff/mod.rs b/vendor/gix/src/object/tree/diff/mod.rs index 447eeaa84..5f7a041e4 100644 --- a/vendor/gix/src/object/tree/diff/mod.rs +++ b/vendor/gix/src/object/tree/diff/mod.rs @@ -34,6 +34,10 @@ impl<'repo> Tree<'repo> { /// /// It's highly recommended to set an object cache to avoid extracting the same object multiple times. /// By default, similar to `git diff`, rename tracking will be enabled if it is not configured. + /// + /// Note that if a clone with `--filter=blob=none` was created, rename tracking may fail as it might + /// try to access blobs to compute a similarity metric. Thus, it's more compatible to turn rewrite tracking off + /// using [`Platform::track_rewrites()`]. #[allow(clippy::result_large_err)] pub fn changes<'a>(&'a self) -> Result<Platform<'a, 'repo>, rewrites::Error> { Ok(Platform { diff --git a/vendor/gix/src/object/tree/diff/rewrites.rs b/vendor/gix/src/object/tree/diff/rewrites.rs index 1502048ec..e434726d9 100644 --- a/vendor/gix/src/object/tree/diff/rewrites.rs +++ b/vendor/gix/src/object/tree/diff/rewrites.rs @@ -80,7 +80,7 @@ impl Rewrites { let key = "diff.renames"; let copies = match config .boolean_by_key(key) - .map(|value| Diff::RENAMES.try_into_renames(value, || config.string_by_key(key))) + .map(|value| Diff::RENAMES.try_into_renames(value)) .transpose() .with_leniency(lenient)? { |