Skip to main content

GIT_OID_VERSION

Constant GIT_OID_VERSION 

Source
pub const GIT_OID_VERSION: u32 = 3;
Expand description

Bumped 1 → 2 when the key became order-preserving. A v1 section holds the same bytes in the same places but sorted on a different key, so a v2 reader walking it would return wrong rows rather than fail — which is why the reader below requires an exact match instead of <=.

Bumped 2 → 3 when byte 14 stopped being reserved and became header_len. A v2 section has 0 there, which a v3 reader would read as a zero-length header and then walk the magic as keys, so again: exact match, not <=.