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
authored as blocks/post-merge-hook.sh and embedded verbatim: it
belongs to no forge, so it lives with the other host-written texts
rather than in a setup/<forge>/ tree, per
ADR-author-every-host-written-text-as-payload.
Enums§
- Hook
State - What the hook file holds today.
Constants§
- MARKER
- The marker line a reminder hook carries; its absence makes a hook foreign, and a foreign hook is never written over.
Functions§
- hook_
body - The whole hook, byte for byte:
blocks/post-merge-hook.shverbatim, final newline included. - 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.