Expand description
Library entrypoint shared by the jj-hooks and jj-hp binaries.
Both binaries are identical — jj-hp is just a shorter name that’s
easier to type and that we route the jj push alias through.
Modules§
- bookmark_
updates - cli
- clap argument structs for the
jj-hooksbinary. - completions
- Shell completion support.
- error
- hooks
- Per-bookmark hook execution pipeline.
- init
jj-hooks init— interactive setup for the user-level config.- jj
- Subprocess wrapper around the
jjCLI plus utilities for locating the primary git directory that a (primary or secondary) workspace is colocated with. - push
- Push pipeline: dry-run parse → per-bookmark hook → push or abort.
- push_
tags jj-hp push-tags— push jj tags to a git remote.- runner
- Hook runner backends.
- setup
- Pre-hook setup steps run inside the ephemeral worktree.
- worktree
- Ephemeral git worktree used to run hooks at a target commit without
disturbing the user’s working copy or polluting the shared
.git/index.
Functions§
- run
- Parse CLI args, dispatch to a subcommand, and return the process exit
code. Both
bin/jj-hooksandbin/jj-hpare trivial wrappers around this function. - run_
for_ revset - Run the configured hook runner against a jj revset, the same way
jj-hp run [REVSET]does. Exposed as a library entrypoint so other tools (e.g.jj-gt) can gate their own pipelines on the same hook machinery without shelling out to thejj-hpbinary. - run_
for_ revset_ outcome - Structured variant of
run_for_revset— returnsOk(None)for an empty revset, otherwise the per-updatehooks::HookOutcome.