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§
- Hook
State - What the hook file holds today.
Constants§
- HOOK_
BODY - The whole hook, byte for byte. No
set -euon 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-pathanswers through gitfiles, linked worktrees, andcore.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.