diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /vendor/gix/src/repository/object.rs | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix/src/repository/object.rs')
-rw-r--r-- | vendor/gix/src/repository/object.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vendor/gix/src/repository/object.rs b/vendor/gix/src/repository/object.rs index 0b894939f..77f188bad 100644 --- a/vendor/gix/src/repository/object.rs +++ b/vendor/gix/src/repository/object.rs @@ -3,7 +3,8 @@ use std::{convert::TryInto, ops::DerefMut}; use gix_hash::ObjectId; use gix_macros::momo; -use gix_odb::{Find, FindExt, Header, HeaderExt, Write}; +use gix_object::{Exists, Find, FindExt}; +use gix_odb::{Header, HeaderExt, Write}; use gix_ref::{ transaction::{LogChange, PreviousValue, RefLog}, FullName, @@ -70,7 +71,7 @@ impl crate::Repository { if id == ObjectId::empty_tree(self.object_hash()) { true } else { - self.objects.contains(id) + self.objects.exists(id) } } @@ -140,7 +141,7 @@ impl crate::Repository { fn write_object_inner(&self, buf: &[u8], kind: gix_object::Kind) -> Result<Id<'_>, object::write::Error> { let oid = gix_object::compute_hash(self.object_hash(), kind, buf); - if self.objects.contains(&oid) { + if self.objects.exists(&oid) { return Ok(oid.attach(self)); } @@ -158,7 +159,7 @@ impl crate::Repository { pub fn write_blob(&self, bytes: impl AsRef<[u8]>) -> Result<Id<'_>, object::write::Error> { let bytes = bytes.as_ref(); let oid = gix_object::compute_hash(self.object_hash(), gix_object::Kind::Blob, bytes); - if self.objects.contains(&oid) { + if self.objects.exists(&oid) { return Ok(oid.attach(self)); } self.objects @@ -185,7 +186,7 @@ impl crate::Repository { fn write_blob_stream_inner(&self, buf: &[u8]) -> Result<Id<'_>, object::write::Error> { let oid = gix_object::compute_hash(self.object_hash(), gix_object::Kind::Blob, buf); - if self.objects.contains(&oid) { + if self.objects.exists(&oid) { return Ok(oid.attach(self)); } |