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

Function verify_binding_hint

atomic-repository/src/git_binding/verify.rs:136–144  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

134/// but a hint that names a *different* binding is a forgery signal and fails
135/// closed when the binding is being verified.
136pub 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

Calls 2

idMethod · 0.45