Module branchless::commands::hooks
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.
Re-exports
pub use crate::core::rewrite::rewrite_hooks::hook_drop_commit_if_empty;
pub use crate::core::rewrite::rewrite_hooks::hook_post_rewrite;
pub use crate::core::rewrite::rewrite_hooks::hook_register_extra_post_rewrite_hook;
pub use crate::core::rewrite::rewrite_hooks::hook_skip_upstream_applied_commit;
Functions
Handle Git’s post-checkout
hook.
Handle Git’s post-commit
hook.
Handle Git’s post-merge
hook. It seems that Git doesn’t invoke the
post-commit
hook after a merge commit, so we need to handle this case
explicitly with another hook.
Handle Git’s reference-transaction
hook.