Check the `atomic-binding ` hint in a commit message against a binding. Hints route lookup only (RFC §5.2, §5.4) and are never identity — but a hint that names a *different* binding is a forgery signal and fails closed when the binding is being verified.
(
commit_message: &str,
binding: &GitStateBinding,
)
| 134 | /// but a hint that names a *different* binding is a forgery signal and fails |
| 135 | /// closed when the binding is being verified. |
| 136 | pub fn verify_binding_hint( |
| 137 | commit_message: &str, |
| 138 | binding: &GitStateBinding, |
| 139 | ) -> Result<(), BindingVerificationError> { |
| 140 | match binding_hint_mismatches_commit(commit_message, &binding.id()) { |
| 141 | Ok(()) => Ok(()), |
| 142 | Err(error) => Err(error), |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | /// Parse the `atomic-binding <hex>` hints in a commit message and compare to |
| 147 | /// `binding_id`. Absence of a hint is not an error (hints are hints); any |