Expand description
Hash utilities for Git objects with selectable algorithms (SHA-1 and SHA-256). Hash kind is stored thread-locally; set once at startup to match your repository format. Defaults to SHA-1.
Structs§
- Hash
Kind Guard - A guard to reset the hash kind after the test
Enums§
- Archived
Hash Kind - An archived
HashKind - Archived
Object Hash - An archived
ObjectHash - Hash
Kind - Supported hash algorithms for object IDs (selector only, no data attached). Used to configure which hash algorithm to use globally (thread-local). Defaults to SHA-1.
- Hash
Kind Resolver - The resolver for an archived
HashKind - Object
Hash - Concrete object ID value carrying the bytes for the selected algorithm (SHA-1 or SHA-256). Used for Git object hashes. Supports conversion to/from hex strings, byte slices, and stream reading.
- Object
Hash Resolver - The resolver for an archived
ObjectHash
Functions§
- get_
hash_ kind - Retrieves the hash kind for the current thread.
- set_
hash_ kind - Set the thread-local hash kind (configure once at startup to match repo format).
- set_
hash_ kind_ for_ test - Sets the hash kind for the current thread and returns a guard to reset it later.