Expand description
Callbacks for Git hooks.
Git uses “hooks” to run user-defined scripts after certain events. We extensively use these hooks to track user activity and e.g. decide if a commit should be considered obsolete.
The hooks are installed by the branchless init command. This module
contains the implementations for the hooks.
Functions§
- command_
main hooksubcommand.- hook_
drop_ commit_ if_ empty - For rebases, detect empty commits (which have probably been applied
upstream) and write them to the
rewritten-listfile, so that they’re later passed to thepost-rewritehook. - hook_
post_ rewrite - Handle Git’s
post-rewritehook. - hook_
register_ extra_ post_ rewrite_ hook - Register extra cleanup actions for rebase.
- hook_
skip_ upstream_ applied_ commit - For rebases, if a commit is known to have been applied upstream, skip it without attempting to apply it.