Whether a Git-ref effect lease value equals the parsed OID (an all-zero OID matches the absent lease, matching Git's zero-OID ref conventions).
(value: &EffectValue, oid: &GitObjectId)
| 711 | /// Whether a Git-ref effect lease value equals the parsed OID (an all-zero |
| 712 | /// OID matches the absent lease, matching Git's zero-OID ref conventions). |
| 713 | pub fn effect_lease_matches_oid(value: &EffectValue, oid: &GitObjectId) -> bool { |
| 714 | match value { |
| 715 | EffectValue::GitRef(GitRefTarget::Direct(target)) => target == oid, |
| 716 | EffectValue::Absent => oid.as_bytes().iter().all(|byte| *byte == 0), |
| 717 | _ => false, |
| 718 | } |
| 719 | } |
| 720 | |
| 721 | /// One immutable Git-reference observation, sorted by ref name in an operation. |
| 722 | #[derive(Debug, Clone, PartialEq, Eq)] |
no test coverage detected