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

Function stdin_dispatcher_script

atomic-cli/src/commands/git/hooks.rs:323–329  ·  view source on GitHub ↗

Script for the stdin-reading advisory dispatchers (`post-rewrite`, `reference-transaction`). Stdin is forwarded so Git's evidence lines reach the journal; every failure stays advisory. Git passes the `reference-transaction` state as `argv[1]` (review blocker 5): when `forward_state_arg` is set, `"$1"` is forwarded as the subcommand's state argument. `post-rewrite` takes no argv.

(
    binary: &Path,
    subcommand: &str,
    forward_state_arg: bool,
)

Source from the content-addressed store, hash-verified

321/// 5): when `forward_state_arg` is set, `"$1"` is forwarded as the
322/// subcommand's state argument. `post-rewrite` takes no argv.
323fn stdin_dispatcher_script(
324 binary: &Path,
325 subcommand: &str,
326 forward_state_arg: bool,
327) -> io::Result<String> {
328 stdin_dispatcher_script_ext(binary, subcommand, forward_state_arg, false)
329}
330
331/// Variant with exit-code control: advisory dispatchers end with `|| true`
332/// (RFC §11.1: hooks never block), while the CB-12B `pre-push` dispatcher

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected