Expand description
Object-id hashing, file checksums, and hash algorithm selection.
Re-exports§
pub use parallel::hash_objects_parallel;pub use parallel::index_parallelism_from_config;pub use parallel::par_hash_with;pub use parallel::parallel_hash_worthwhile;pub use parallel::try_par_hash_with;pub use parallel::try_par_hash_with_force;pub use parallel::ParallelHashError;pub use parallel::Parallelism;pub use parallel::PAR_HASH_MIN_ITEMS;pub use parallel::PAR_HASH_MIN_TOTAL_BYTES;
Structs§
- Hashing
Writer - A writer that forwards bytes to an inner sink while accumulating a checksum.
- Object
Payload Hasher - Incremental Git object-id hash (header plus payload chunks).
- Trailer
Mismatch - Checksum at the end of
bytesdid not match a digest of the leading body.
Enums§
- Backend
- Which implementation the
sha1/sha2dependency selects foralgoon this CPU. - Checksum
Hasher - Incremental hasher for Git file checksums (pack/index/MIDX/commit-graph trailers).
- Object
Hasher - Incremental hasher for Git’s supported object-id algorithms.
Constants§
- PAR_
HASH_ MIN_ ITEMS - Minimum item count before parallel helpers use more than one thread.
- PAR_
HASH_ MIN_ TOTAL_ BYTES - Minimum total payload bytes (summed over items) for parallel hashing.
Functions§
- backend
- Report the hashing backend used for object-id digests on this CPU.
- hash_
object - Hash canonical Git store bytes for
kindanddata. - hash_
objects_ parallel - Hash Git objects in parallel, preserving input order.
- par_
hash_ with - Run
foveritemswith up tothreadsworkers, preserving order. - parallel_
hash_ worthwhile - Returns true when parallel hashing is expected to beat a serial loop.
- try_
par_ hash_ with - Fallible variant of
par_hash_with. - try_
par_ hash_ with_ force - Like
try_par_hash_with, but ignores batch thresholds. - verify_
trailer - Verify that
bytesends with the hash of the preceding body.