vendor/gix-parallel — gix-parallel 0.50.1 plus ONE fix
This directory is third-party code. It is gix-parallel 0.50.1 as published on crates.io, with a behavioural change to one function in one file and nothing else. LICENSE-MIT and LICENSE-APACHE come with it unmodified; gunnar's own licence is the same pair.
| file | what differs from crates.io 0.50.1 |
src/reduce.rs |
fix 2, below: the only change to source |
Cargo.toml |
the comment above name, the description, /PATCH.md in include, the detached [workspace] table |
PATCH.md |
this file (not upstream) |
Why it moved here (2026-10-31, row GIX-090)
gix 0.90 (GHSA-q54r-jf2p-rfr2 is fixed there) split gix-features: its parallel module is the crate gix-parallel and its progress trait is in gix-utils. Nothing in the 0.90 graph depends on gix-features any more, so the fork that lived in vendor/gix-features (gix-features 0.50.0 plus fix 2) is rebased onto gix-parallel 0.50.1 and the [patch.crates-io] entries name gix-parallel.
Fix 2: Stepwise at one thread (gitoxide issue 2881, not upstream)
in_parallel_if already stays on the calling thread when one thread is asked for. Stepwise::new, the other half of the same pipeline, spawned num_threads(thread_limit) consumers plus an input feeder unconditionally, so thread_limit: Some(1) yielded two spawned threads (MEASURED with strace -f -c -e trace=clone3 over one gix_pack::data::output::entry::iter_from_counts call: 2 clone3 per call). Every served object then crossed two channels between two cores. The fix adds Source::Inline: at one thread the input is consumed on the calling thread inside next(); the threaded path is unchanged. gunnar's serve path passes thread_limit: Some(1), so stock gix-pack must pick this copy up, which is why it is a PATH patch under the stock name, not a rename.
The diff against stock 0.50.1 is the fix-2 diff the gix-features fork carried, with the module paths of the new crate (crate::num_threads, not crate::parallel::num_threads) and upstream's gix_trace::in_thread around the threaded path's spawns kept.
Rebasing
When a newer gix-parallel is published, copy it here, re-apply the src/reduce.rs diff (diff -u ~/.cargo/registry/src/index.crates.io-*/gix-parallel-<v>/src/reduce.rs vendor/gix-parallel/src/reduce.rs), keep name = "gix-parallel" and the version equal to the published one, and diff -rq against the registry copy must show only src/reduce.rs and the manifest. Delete this directory and every gix-parallel patch entry the day fix 2 ships upstream.