Skip to main content

Module branch_reminder

Module branch_reminder 

Source
Expand description

The post-merge reminder hook rk setup step branch-reminder writes.

No git event fires when the forge squash-merges and deletes a branch; the nearest local event is the pull that fetches the result, which is a merge, so post-merge fires with the [gone] marker freshly true. The hook only reminds — the quiet prunes print nothing when the clone is clean and never delete — and it never blocks a pull. Each call is guarded by a capability probe on its own verb (rk <verb> --help), not by command -v rk: the probe answers the question the hook actually has — can this rk prune this resource? — so a missing binary, one too old for the verb, and one that renamed it all fail identically and print nothing, while the real invocations keep their stderr so a genuine refusal still reaches the operator. The body is a Rust const rather than a setup/<forge>/ script: it belongs to no forge, and the forge trees hold one script per forge step by the parity rule.

Enums§

HookState
What the hook file holds today.

Constants§

HOOK_BODY
The whole hook, byte for byte.
MARKER
The marker line a reminder hook carries; its absence makes a hook foreign, and a foreign hook is never written over.

Functions§

hook_path
Where git will look for the post-merge hook: rev-parse --git-path answers through gitfiles, linked worktrees, and core.hooksPath, and a relative answer is relative to the target it ran in.
observe_hook
Read the hook file and judge it against this binary’s body.