Skip to main content

compose_hooks

Function compose_hooks 

Source
pub fn compose_hooks(template: &str, guard: Option<&str>) -> String
Expand description

The hook block from its authored template, with the worktree mode’s guard entry where guard carries one.

Some is the worktree mode: the block carries the location guard and names the sweep-skip pair. None is the branches mode: no guard entry at all, never an entry that reads local state to decide whether to enforce. The one branch grammar substitutes from BRANCH_GRAMMAR. Markers included, without a trailing newline and with its scope token unrendered.