diff --git a/git-odb/src/pack/data/decoded.rs b/git-odb/src/pack/data/decoded.rs index b57d9a05921..6e842f5b566 100644 --- a/git-odb/src/pack/data/decoded.rs +++ b/git-odb/src/pack/data/decoded.rs @@ -76,11 +76,11 @@ fn leb64decode(d: &[u8]) -> (u64, usize) { fn streaming_leb64decode(mut r: impl io::Read) -> Result<(u64, usize), io::Error> { let mut b = [0u8; 1]; let mut i = 0; - r.read(&mut b)?; + r.read_exact(&mut b)?; i += 1; let mut value = b[0] as u64 & 0x7f; while b[0] & 0x80 != 0 { - r.read(&mut b)?; + r.read_exact(&mut b)?; i += 1; value += 1; value = (value << 7) + (b[0] as u64 & 0x7f) diff --git a/git-odb/src/pack/index/verify/indexed.rs b/git-odb/src/pack/index/verify/indexed.rs index 1e0bf939c23..a6d0c591b75 100644 --- a/git-odb/src/pack/index/verify/indexed.rs +++ b/git-odb/src/pack/index/verify/indexed.rs @@ -21,6 +21,7 @@ impl index::File { let r = io::BufReader::new(fs::File::open(pack.path()).map_err(|err| Error::Io(err, pack.path().into(), "open"))?); pack::graph::DeltaTree::from_sorted_offsets(self.sorted_offsets().into_iter(), r, indexing_progress)?; + unimplemented!() } } diff --git a/gitoxide-core/src/lib.rs b/gitoxide-core/src/lib.rs index af99d6aa0cc..fcd6bd6010a 100644 --- a/gitoxide-core/src/lib.rs +++ b/gitoxide-core/src/lib.rs @@ -163,7 +163,7 @@ where let idx = git_odb::pack::index::File::at(path).with_context(|| "Could not open pack index file")?; let packfile_path = path.with_extension("pack"); let pack = git_odb::pack::data::File::at(&packfile_path) - .or_else(|e| { + .map_err(|e| { writeln!( err, "Could not find matching pack file at '{}' - only index file will be verified, error was: {}", @@ -171,7 +171,7 @@ where e ) .ok(); - Err(e) + e }) .ok(); let cache = || -> EitherCache { diff --git a/src/plumbing/lean.rs b/src/plumbing/lean.rs index 9f6192855ae..bd70ac935d6 100644 --- a/src/plumbing/lean.rs +++ b/src/plumbing/lean.rs @@ -118,7 +118,7 @@ pub fn main() -> Result<()> { } else { None }, - algorithm: algorithm.unwrap_or(core::VerifyAlgorithm::Lookup).into(), + algorithm: algorithm.unwrap_or(core::VerifyAlgorithm::Lookup), thread_limit, mode: match (decode, re_encode) { (true, false) => core::VerifyMode::Sha1CRC32Decode, diff --git a/src/plumbing/pretty.rs b/src/plumbing/pretty.rs index ae1d0692290..418884372f0 100644 --- a/src/plumbing/pretty.rs +++ b/src/plumbing/pretty.rs @@ -208,7 +208,7 @@ pub fn main() -> Result<()> { core::Context { output_statistics, thread_limit, - algorithm: algorithm.into(), + algorithm, mode, out, err,