summaryrefslogtreecommitdiffstats
path: root/vendor/gix-odb
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-odb
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-odb')
-rw-r--r--vendor/gix-odb/.cargo-checksum.json2
-rw-r--r--vendor/gix-odb/CHANGELOG.md36
-rw-r--r--vendor/gix-odb/Cargo.toml10
-rw-r--r--vendor/gix-odb/src/find.rs6
-rw-r--r--vendor/gix-odb/src/lib.rs2
-rw-r--r--vendor/gix-odb/src/sink.rs10
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/load_index.rs2
-rw-r--r--vendor/gix-odb/src/store_impls/loose/find.rs31
-rw-r--r--vendor/gix-odb/src/store_impls/loose/write.rs19
9 files changed, 75 insertions, 43 deletions
diff --git a/vendor/gix-odb/.cargo-checksum.json b/vendor/gix-odb/.cargo-checksum.json
index 6c557413d..deb54b22b 100644
--- a/vendor/gix-odb/.cargo-checksum.json
+++ b/vendor/gix-odb/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"342ad969a43d9a1950733b04aed37239fd72d33c8f399f2ebf64ca97fe75e023","Cargo.toml":"ff36058d885a5080a5da793cde1226e9e75a482240f2ace5d96930e8c66688a9","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","src/alternate/mod.rs":"18913fe47e6527f7bdcf251a794fda764f3ba750aa890b8ee4b35328f0f04c6a","src/alternate/parse.rs":"418f5c54d6293ceb886d44a3482dd3a2378d50031ff04186541c5e09be2eedcc","src/cache.rs":"02a4fcc9ab540799fc8529830738284f4cff0bbfebf4f336e5611b1206ed9ab6","src/find.rs":"96d3b0d53f17ddc829b915259c5da7ef91c23575f8578bbe1c7ecec88c959590","src/lib.rs":"84f2f19a5e3f43e04b1829bff265a22f414e2399e4e2af3930bfd7af042e6d9a","src/sink.rs":"bdefb41defd4c8b1b152772d927ae70c63af559ce5b52a8d0f41584954a53d66","src/store_impls/dynamic/access.rs":"524b85c6f523f24ba6c0a2abc5cb9555b535dd5d1ce4d42beedd2aae28e6d938","src/store_impls/dynamic/find.rs":"14cf1303704e5c4d426edf356c9e0003a4722f757fe01befe01f7781ee60b1e0","src/store_impls/dynamic/handle.rs":"9bc5a010125e3c38ca5f95b990b40e0e6a1f61885ed7b6e0578f813bd13c6dec","src/store_impls/dynamic/header.rs":"18632eeb39f1382bbd3a8c17fff9fa12084f6cd024675a63b1e21ee0ec5a80d1","src/store_impls/dynamic/init.rs":"f6c23c8f634d18f154bf4772531b2cd43737c195c844167025584af0a7dc79f6","src/store_impls/dynamic/iter.rs":"6473eb899855f7588482674b7561cdf444b0366d4af9e3b92831d0d8b090fff7","src/store_impls/dynamic/load_index.rs":"675cd09d46359a73e0e9f7ddac59e1bb3ca8500265eb495b649b88daa1610b92","src/store_impls/dynamic/load_one.rs":"fa0393f14a653d9116c7b470219175cccffa8bb2e981afc89d62a48778a6d825","src/store_impls/dynamic/metrics.rs":"ab54a9986a58e72301ed9a85155572e7a8e0df977177dc51491fc776883c4200","src/store_impls/dynamic/mod.rs":"5363636ea3ad3f63c66d5e34b9d750025058ce2ea14352ad518563c811f8dd3b","src/store_impls/dynamic/prefix.rs":"d6c0702a5dbc55b62d54fea24b6b00a7ec88fc76917dbf5901ce699a0902b9a5","src/store_impls/dynamic/structure.rs":"2231e15b6e26d398978f147875cbbd83c0704dd4449c75274c6bc1887b6149b4","src/store_impls/dynamic/types.rs":"98974099d9fbda59458b4db0b2dd46fd1e8c1a7bdef83ee68600f29c664227c5","src/store_impls/dynamic/verify.rs":"2a0fd7b54ec9ad1e8651769daffeba3b355993c2a0300f952748ddcf92247974","src/store_impls/dynamic/write.rs":"b83d47499e9fa07d8e45db8f1d78fd638c6b43defb28dc7372588ea21f1bb75f","src/store_impls/loose/find.rs":"1afcc151f989ecd3c6e5166e8fc8eef919ffdb18d2f0560bf4ae5d26d8291ae8","src/store_impls/loose/iter.rs":"52dd3df3148aa057efcbb2c86bb631834cbe9afdfb4a487fb6d1fe3e947b2c86","src/store_impls/loose/mod.rs":"9008a952ad41b7a9672028b6dd6d7fd613328694657f13e55ef078872ab8975e","src/store_impls/loose/verify.rs":"c4f2f6449b518ce36ee19b6500c08befd402056195f71a49f0a3a5869f42ead4","src/store_impls/loose/write.rs":"45240b4320ef95d4985247fec07e70f9faacc606ced23f3de1819ca8102e77b7","src/store_impls/mod.rs":"d5f123c2037dd5ee538721ad626aebf845d445d43438c3e10daac34d73fdc779","src/traits.rs":"3b12c04823e64db00bfa6490a9f538715c049ad6825f524c4ff5a52943f4ceb7"},"package":"8d6a392c6ba3a2f133cdc63120e9bc7aec81eef763db372c817de31febfe64bf"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"f7b8b76552dcc107a10a76e968438cf1e5a5338fbef62e16df23333a9e1a09c5","Cargo.toml":"bc5469a9cd2a459934907e0bb7b7f56aa2c00c710bd718d0db3543711b86c7af","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","src/alternate/mod.rs":"18913fe47e6527f7bdcf251a794fda764f3ba750aa890b8ee4b35328f0f04c6a","src/alternate/parse.rs":"418f5c54d6293ceb886d44a3482dd3a2378d50031ff04186541c5e09be2eedcc","src/cache.rs":"02a4fcc9ab540799fc8529830738284f4cff0bbfebf4f336e5611b1206ed9ab6","src/find.rs":"1778200423a1850b6449c935e7c05cbe97d000efb1b12403ee2459beac1d4914","src/lib.rs":"c729eeeeec5f8555c4f325246d1ac3d552fd34f1561231886a50cb2f5088a014","src/sink.rs":"e9d88f5f7e4938e0b9de50aed5258c938db24b0fcb8b686531ee4316cfcc90f8","src/store_impls/dynamic/access.rs":"524b85c6f523f24ba6c0a2abc5cb9555b535dd5d1ce4d42beedd2aae28e6d938","src/store_impls/dynamic/find.rs":"14cf1303704e5c4d426edf356c9e0003a4722f757fe01befe01f7781ee60b1e0","src/store_impls/dynamic/handle.rs":"9bc5a010125e3c38ca5f95b990b40e0e6a1f61885ed7b6e0578f813bd13c6dec","src/store_impls/dynamic/header.rs":"18632eeb39f1382bbd3a8c17fff9fa12084f6cd024675a63b1e21ee0ec5a80d1","src/store_impls/dynamic/init.rs":"f6c23c8f634d18f154bf4772531b2cd43737c195c844167025584af0a7dc79f6","src/store_impls/dynamic/iter.rs":"6473eb899855f7588482674b7561cdf444b0366d4af9e3b92831d0d8b090fff7","src/store_impls/dynamic/load_index.rs":"8e983b0d6d71782adf6f46677be02e231bd3a61a2da5438ca847bbb339cc335b","src/store_impls/dynamic/load_one.rs":"fa0393f14a653d9116c7b470219175cccffa8bb2e981afc89d62a48778a6d825","src/store_impls/dynamic/metrics.rs":"ab54a9986a58e72301ed9a85155572e7a8e0df977177dc51491fc776883c4200","src/store_impls/dynamic/mod.rs":"5363636ea3ad3f63c66d5e34b9d750025058ce2ea14352ad518563c811f8dd3b","src/store_impls/dynamic/prefix.rs":"d6c0702a5dbc55b62d54fea24b6b00a7ec88fc76917dbf5901ce699a0902b9a5","src/store_impls/dynamic/structure.rs":"2231e15b6e26d398978f147875cbbd83c0704dd4449c75274c6bc1887b6149b4","src/store_impls/dynamic/types.rs":"98974099d9fbda59458b4db0b2dd46fd1e8c1a7bdef83ee68600f29c664227c5","src/store_impls/dynamic/verify.rs":"2a0fd7b54ec9ad1e8651769daffeba3b355993c2a0300f952748ddcf92247974","src/store_impls/dynamic/write.rs":"b83d47499e9fa07d8e45db8f1d78fd638c6b43defb28dc7372588ea21f1bb75f","src/store_impls/loose/find.rs":"80afef4f2bb0aab237b4e780f121a4294527700a3e9313af3eaca6cc0ce6953b","src/store_impls/loose/iter.rs":"52dd3df3148aa057efcbb2c86bb631834cbe9afdfb4a487fb6d1fe3e947b2c86","src/store_impls/loose/mod.rs":"9008a952ad41b7a9672028b6dd6d7fd613328694657f13e55ef078872ab8975e","src/store_impls/loose/verify.rs":"c4f2f6449b518ce36ee19b6500c08befd402056195f71a49f0a3a5869f42ead4","src/store_impls/loose/write.rs":"ce18c92d56ea53c54c3298d63ad2327c57316ccba418c3a5a2ae4eda5967e5b0","src/store_impls/mod.rs":"d5f123c2037dd5ee538721ad626aebf845d445d43438c3e10daac34d73fdc779","src/traits.rs":"3b12c04823e64db00bfa6490a9f538715c049ad6825f524c4ff5a52943f4ceb7"},"package":"8630b56cb80d8fa684d383dad006a66401ee8314e12fbf0e566ddad8c115143b"} \ No newline at end of file
diff --git a/vendor/gix-odb/CHANGELOG.md b/vendor/gix-odb/CHANGELOG.md
index 0032f0d90..63f497c5d 100644
--- a/vendor/gix-odb/CHANGELOG.md
+++ b/vendor/gix-odb/CHANGELOG.md
@@ -5,6 +5,39 @@ 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.54.0 (2023-10-12)
+
+A maintenance release without user-facing changes.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 5 commits contributed to the release over the course of 8 calendar days.
+ - 17 days passed between releases.
+ - 0 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))
+ - Adapt to changes in `gix-object` ([`ffcb110`](https://github.com/Byron/gitoxide/commit/ffcb110135e4597d8953b97da3db9ecc3cf12e34))
+</details>
+
## 0.53.0 (2023-09-24)
A maintenance release without user-facing changes.
@@ -13,7 +46,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 +58,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-odb/Cargo.toml b/vendor/gix-odb/Cargo.toml
index cf5b98392..e5f0a6ce1 100644
--- a/vendor/gix-odb/Cargo.toml
+++ b/vendor/gix-odb/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.65"
name = "gix-odb"
-version = "0.53.0"
+version = "0.54.0"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
include = [
"src/**/*",
@@ -49,7 +49,7 @@ optional = true
version = "^0.8.0"
[dependencies.gix-features]
-version = "^0.35.0"
+version = "^0.36.0"
features = [
"rustsha1",
"walkdir",
@@ -58,13 +58,13 @@ features = [
]
[dependencies.gix-hash]
-version = "^0.13.0"
+version = "^0.13.1"
[dependencies.gix-object]
-version = "^0.37.0"
+version = "^0.38.0"
[dependencies.gix-pack]
-version = "^0.43.0"
+version = "^0.44.0"
default-features = false
[dependencies.gix-path]
diff --git a/vendor/gix-odb/src/find.rs b/vendor/gix-odb/src/find.rs
index bf807e27c..196845c4d 100644
--- a/vendor/gix-odb/src/find.rs
+++ b/vendor/gix-odb/src/find.rs
@@ -104,11 +104,11 @@ mod header {
}
}
- impl From<(usize, gix_object::Kind)> for Header {
- fn from((object_size, kind): (usize, gix_object::Kind)) -> Self {
+ impl From<(u64, gix_object::Kind)> for Header {
+ fn from((object_size, kind): (u64, gix_object::Kind)) -> Self {
Header::Loose {
kind,
- size: object_size as u64,
+ size: object_size,
}
}
}
diff --git a/vendor/gix-odb/src/lib.rs b/vendor/gix-odb/src/lib.rs
index 5aee76ca2..a6aa4caee 100644
--- a/vendor/gix-odb/src/lib.rs
+++ b/vendor/gix-odb/src/lib.rs
@@ -50,7 +50,7 @@ pub struct Cache<S> {
pub mod cache;
///
-/// It can optionally compress the content, similarly to what would happen when using a [`loose::Store`][crate::loose::Store].
+/// It can optionally compress the content, similarly to what would happen when using a [`loose::Store`].
///
#[derive(Clone)]
pub struct Sink {
diff --git a/vendor/gix-odb/src/sink.rs b/vendor/gix-odb/src/sink.rs
index f6334a51c..7784901a8 100644
--- a/vendor/gix-odb/src/sink.rs
+++ b/vendor/gix-odb/src/sink.rs
@@ -1,6 +1,5 @@
use std::{
cell::RefCell,
- convert::TryInto,
io::{self, Write},
};
@@ -24,11 +23,10 @@ impl crate::traits::Write for Sink {
fn write_stream(
&self,
kind: gix_object::Kind,
- size: u64,
+ mut size: u64,
from: &mut dyn io::Read,
) -> Result<gix_hash::ObjectId, crate::write::Error> {
- let mut size = size.try_into().expect("object size to fit into usize");
- let mut buf = [0u8; 8096];
+ let mut buf = [0u8; u16::MAX as usize];
let header = gix_object::encode::loose_header(kind, size);
let possibly_compress = |buf: &[u8]| -> io::Result<()> {
@@ -43,11 +41,11 @@ impl crate::traits::Write for Sink {
possibly_compress(&header).map_err(Box::new)?;
while size != 0 {
- let bytes = size.min(buf.len());
+ let bytes = (size as usize).min(buf.len());
from.read_exact(&mut buf[..bytes]).map_err(Box::new)?;
hasher.update(&buf[..bytes]);
possibly_compress(&buf[..bytes]).map_err(Box::new)?;
- size -= bytes;
+ size -= bytes as u64;
}
if let Some(compressor) = self.compressor.as_ref() {
let mut c = compressor.borrow_mut();
diff --git a/vendor/gix-odb/src/store_impls/dynamic/load_index.rs b/vendor/gix-odb/src/store_impls/dynamic/load_index.rs
index 4716a5806..a255f6c4b 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/load_index.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/load_index.rs
@@ -711,7 +711,7 @@ impl PartialEq<Self> for Either {
impl PartialOrd<Self> for Either {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
- self.path().partial_cmp(other.path())
+ Some(self.path().cmp(other.path()))
}
}
diff --git a/vendor/gix-odb/src/store_impls/loose/find.rs b/vendor/gix-odb/src/store_impls/loose/find.rs
index 91bf0ba87..4116a0453 100644
--- a/vendor/gix-odb/src/store_impls/loose/find.rs
+++ b/vendor/gix-odb/src/store_impls/loose/find.rs
@@ -14,13 +14,11 @@ pub enum Error {
path: PathBuf,
},
#[error("file at '{path}' showed invalid size of inflated data, expected {expected}, got {actual}")]
- SizeMismatch {
- actual: usize,
- expected: usize,
- path: PathBuf,
- },
+ SizeMismatch { actual: u64, expected: u64, path: PathBuf },
#[error(transparent)]
Decode(#[from] gix_object::decode::LooseHeaderDecodeError),
+ #[error("Cannot store {size} in memory as it's not representable")]
+ OutOfMemory { size: u64 },
#[error("Could not {action} data at '{path}'")]
Io {
source: std::io::Error,
@@ -137,7 +135,7 @@ impl Store {
/// Return only the decompressed size of the object and its kind without fully reading it into memory as tuple of `(size, kind)`.
/// Returns `None` if `id` does not exist in the database.
- pub fn try_header(&self, id: &gix_hash::oid) -> Result<Option<(usize, gix_object::Kind)>, Error> {
+ pub fn try_header(&self, id: &gix_hash::oid) -> Result<Option<(u64, gix_object::Kind)>, Error> {
const BUF_SIZE: usize = 256;
let mut buf = [0_u8; BUF_SIZE];
let path = hash_path(id, self.path.clone());
@@ -224,16 +222,17 @@ impl Store {
let decompressed_body_bytes_sans_header =
decompressed_start + header_size..decompressed_start + consumed_out;
- if consumed_out != size + header_size {
+ if consumed_out as u64 != size + header_size as u64 {
return Err(Error::SizeMismatch {
- expected: size + header_size,
- actual: consumed_out,
+ expected: size + header_size as u64,
+ actual: consumed_out as u64,
path,
});
}
buf.copy_within(decompressed_body_bytes_sans_header, 0);
} else {
- buf.resize(bytes_read + size + header_size, 0);
+ let new_len = bytes_read as u64 + size + header_size as u64;
+ buf.resize(new_len.try_into().map_err(|_| Error::OutOfMemory { size: new_len })?, 0);
{
let (input, output) = buf.split_at_mut(bytes_read);
let num_decompressed_bytes = zlib::stream::inflate::read(
@@ -246,17 +245,21 @@ impl Store {
action: "deflate",
path: path.to_owned(),
})?;
- if num_decompressed_bytes + consumed_out != size + header_size {
+ if num_decompressed_bytes as u64 + consumed_out as u64 != size + header_size as u64 {
return Err(Error::SizeMismatch {
- expected: size + header_size,
- actual: num_decompressed_bytes + consumed_out,
+ expected: size + header_size as u64,
+ actual: num_decompressed_bytes as u64 + consumed_out as u64,
path,
});
}
};
buf.copy_within(decompressed_start + header_size.., 0);
}
- buf.resize(size, 0);
+ buf.resize(
+ size.try_into()
+ .expect("BUG: here the size is already confirmed to fit into memory"),
+ 0,
+ );
Ok(gix_object::Data { kind, data: buf })
}
}
diff --git a/vendor/gix-odb/src/store_impls/loose/write.rs b/vendor/gix-odb/src/store_impls/loose/write.rs
index e537eda92..2cac12d18 100644
--- a/vendor/gix-odb/src/store_impls/loose/write.rs
+++ b/vendor/gix-odb/src/store_impls/loose/write.rs
@@ -1,4 +1,4 @@
-use std::{convert::TryInto, fs, io, io::Write, path::PathBuf};
+use std::{fs, io, io::Write, path::PathBuf};
use gix_features::{hash, zlib::stream::deflate};
use gix_object::WriteTo;
@@ -48,7 +48,7 @@ impl crate::traits::Write for Store {
/// This will cost at least 4 IO operations.
fn write_buf(&self, kind: gix_object::Kind, from: &[u8]) -> Result<gix_hash::ObjectId, crate::write::Error> {
let mut to = self.dest().map_err(Box::new)?;
- to.write_all(&gix_object::encode::loose_header(kind, from.len()))
+ to.write_all(&gix_object::encode::loose_header(kind, from.len() as u64))
.map_err(|err| Error::Io {
source: err,
message: "write header to tempfile in",
@@ -74,15 +74,12 @@ impl crate::traits::Write for Store {
mut from: &mut dyn io::Read,
) -> Result<gix_hash::ObjectId, crate::write::Error> {
let mut to = self.dest().map_err(Box::new)?;
- to.write_all(&gix_object::encode::loose_header(
- kind,
- size.try_into().expect("object size to fit into usize"),
- ))
- .map_err(|err| Error::Io {
- source: err,
- message: "write header to tempfile in",
- path: self.path.to_owned(),
- })?;
+ to.write_all(&gix_object::encode::loose_header(kind, size))
+ .map_err(|err| Error::Io {
+ source: err,
+ message: "write header to tempfile in",
+ path: self.path.to_owned(),
+ })?;
io::copy(&mut from, &mut to)
.map_err(|err| Error::Io {