Crate git_branchless_hook

Source
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
hook subcommand.
hook_drop_commit_if_empty
For rebases, detect empty commits (which have probably been applied upstream) and write them to the rewritten-list file, so that they’re later passed to the post-rewrite hook.
hook_post_rewrite
Handle Git’s post-rewrite hook.
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.