pub enum Command {
Push {
advance_bookmarks: bool,
stage: StageArg,
push: PushArgs,
dry_run: bool,
no_retry_after_fixup: bool,
},
Run {
stage: StageArg,
revset: String,
no_retry_after_fixup: bool,
all_files: bool,
},
PushTags {
tags: Vec<String>,
all: bool,
force: bool,
dry_run: bool,
remote: String,
},
Init,
Completions {
shell: Shell,
},
}Variants§
Push
Run hooks then push. Mirrors the flags jj git push accepts; any
flags we don’t model can be passed through after --.
Fields
advance_bookmarks: boolAdvance the local bookmark to the fixup commit when hooks modify
files. Reads jj-hooks.advance-bookmarks config when not given.
no_retry_after_fixup: boolDisable the post-fixup retry. By default, when hooks fail AND produce a fixup commit, jj-hooks re-runs the hook backend against the fixup; if the re-run is clean, the push proceeds and a warning is printed. Pass this flag to restore pre-0.3.0 behavior (any failure aborts immediately).
Run
Run hooks against a revset without pushing.
Fields
all_files: boolRun hooks against every tracked file, ignoring the revset’s
diff range. Each runner’s own equivalent flag is used:
--all-files for pre-commit/prek/lefthook, --glob '*' for
hk (its own -a/--all doesn’t actually override stage-hook
ref bounds in v1.45.0). Useful when you want to lint
everything once (e.g. after a refactor that touched a lot)
without crafting a revset that happens to cover every gated
step. The setup pipeline still runs; the runner just sees no
--from-ref/--to-ref.
PushTags
Push jj tags to a git remote. jj has no native jj git push --tag,
so this exports refs to the colocated git repo and shells out to
git push refs/tags/<tag> for each requested tag.
Fields
Tag name(s) to push. Mutually exclusive with --all.
Init
Interactive setup: install jj push alias and configure defaults.
Completions
Print a shell completion script. Pipe into your shell rc, e.g.
eval "$(jj-hp completions zsh)".
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand