MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / reject_duplicate_git_ref_names

Function reject_duplicate_git_ref_names

atomic-core/src/operation/mod.rs:958–965  ·  view source on GitHub ↗
(values: &[GitRefObservation])

Source from the content-addressed store, hash-verified

956}
957
958fn reject_duplicate_git_ref_names(values: &[GitRefObservation]) -> Result<(), OperationCodecError> {
959 if values.windows(2).any(|pair| pair[0].name == pair[1].name) {
960 return Err(OperationCodecError::new(
961 "Git ref observations contain duplicate names",
962 ));
963 }
964 Ok(())
965}
966
967fn hex_bytes(bytes: &[u8]) -> String {
968 const HEX: &[u8; 16] = b"0123456789abcdef";

Callers 1

canonicalizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected