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 — rk branches prune --quiet prints nothing when the clone is clean and never deletes — and it never blocks a pull. 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. No set -eu on purpose: the contract is exit 0 always, and the || : plus the final line hold it.
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.