diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 285afbbb5e9..e6827c49d11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,7 +150,7 @@ jobs: - name: "Install prerequisites" run: vcpkg install zlib:x64-windows-static-md - name: "Installation from crates.io: gitoxide" - run: cargo +${{ matrix.rust }} install --target ${{ matrix.target }} --target-dir install-artifacts --debug --force gitoxide + run: cargo +${{ matrix.rust }} install --target ${{ matrix.target }} --no-default-features --features max-pure --target-dir install-artifacts --debug --force gitoxide shell: msys2 {0} lint: diff --git a/gix/src/remote/connection/fetch/error.rs b/gix/src/remote/connection/fetch/error.rs index 5034dcb5d4e..29326b3a763 100644 --- a/gix/src/remote/connection/fetch/error.rs +++ b/gix/src/remote/connection/fetch/error.rs @@ -45,6 +45,8 @@ pub enum Error { RejectShallowRemote, #[error(transparent)] NegotiationAlgorithmConfig(#[from] config::key::GenericErrorWithValue), + #[error("Failed to read remaining bytes in stream")] + ReadRemainingBytes(#[source] std::io::Error), } impl gix_protocol::transport::IsSpuriousError for Error { diff --git a/gix/src/remote/connection/fetch/receive_pack.rs b/gix/src/remote/connection/fetch/receive_pack.rs index 7634b34cf32..e0231f51a0a 100644 --- a/gix/src/remote/connection/fetch/receive_pack.rs +++ b/gix/src/remote/connection/fetch/receive_pack.rs @@ -287,7 +287,7 @@ where #[cfg(not(feature = "async-network-client"))] let has_read_to_end = { rd.stopped_at().is_some() }; if !has_read_to_end { - std::io::copy(&mut rd, &mut std::io::sink()).unwrap(); + std::io::copy(&mut rd, &mut std::io::sink()).map_err(Error::ReadRemainingBytes)?; } #[cfg(feature = "async-network-client")] {