diff --git a/Cargo.lock b/Cargo.lock index 4e0c50902..d4917c704 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -387,9 +387,9 @@ dependencies = [ [[package]] name = "clap-markdown" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325f50228f76921784b6d9f2d62de6778d834483248eefecd27279174797e579" +checksum = "8ebc67e6266e14f8b31541c2f204724fa2ac7ad5c17d6f5908fbb92a60f42cff" dependencies = [ "clap", ] @@ -2363,7 +2363,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes 1.6.0", - "heck 0.5.0", + "heck 0.4.1", "itertools 0.12.1", "log", "multimap", diff --git a/Cargo.toml b/Cargo.toml index a40020d12..5ba11e3fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ clap = { version = "4.5.7", features = [ ] } clap_complete = "4.5.5" clap_complete_nushell = "4.5.2" -clap-markdown = "0.1.3" +clap-markdown = "0.1.4" clap_mangen = "0.2.10" chrono = { version = "0.4.38", default-features = false, features = [ "std", diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 60cb7e0f4..24ea68e83 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -149,30 +149,37 @@ To get started, see the tutorial at https://github.com/martinvonz/jj/blob/main/d ###### **Options:** * `-R`, `--repository ` — Path to repository to operate on + + By default, Jujutsu searches for the closest .jj/ directory in an ancestor of the current working directory. * `--ignore-working-copy` — Don't snapshot the working copy, and don't update it - Possible values: `true`, `false` + By default, Jujutsu snapshots the working copy at the beginning of every command. The working copy is also updated at the end of the command, if the command modified the working-copy commit (`@`). If you want to avoid snapshotting the working copy and instead see a possibly stale working copy commit, you can use `--ignore-working-copy`. This may be useful e.g. in a command prompt, especially if you have another process that commits the working copy. + Loading the repository at a specific operation with `--at-operation` implies `--ignore-working-copy`. * `--ignore-immutable` — Allow rewriting immutable commits - Possible values: `true`, `false` + By default, Jujutsu prevents rewriting commits in the configured set of immutable commits. This option disables that check and lets you rewrite any commit but the root commit. + This option only affects the check. It does not affect the `immutable_heads()` revset or the `immutable` template keyword. * `--at-operation ` — Operation to load the repo at + Operation to load the repo at. By default, Jujutsu loads the repo at the most recent operation. You can use `--at-op=` to see what the repo looked like at an earlier operation. For example `jj --at-op= st` will show you what `jj st` would have shown you when the given operation had just finished. + + Use `jj op log` to find the operation ID you want. Any unambiguous prefix of the operation ID is enough. + + When loading the repo at an earlier operation, the working copy will be ignored, as if `--ignore-working-copy` had been specified. + + It is possible to run mutating commands when loading the repo at an earlier operation. Doing that is equivalent to having run concurrent commands starting at the earlier operation. There's rarely a reason to do that, but it is possible. + Default value: `@` * `--debug` — Enable debug logging - - Possible values: `true`, `false` - * `--color ` — When to colorize output (always, never, debug, auto) * `--quiet` — Silence non-primary command output - Possible values: `true`, `false` + For example, `jj files` will still list files, but it won't tell you if the working copy was snapshotted or if descendants were rebased. + Warnings and errors will still be printed. * `--no-pager` — Disable the pager - - Possible values: `true`, `false` - * `--config-toml ` — Additional configuration options (can be repeated) @@ -197,10 +204,6 @@ If a working-copy commit gets abandoned, it will be given a new, empty commit. T * `-s`, `--summary` — Do not print every abandoned commit on a separate line - Possible values: `true`, `false` - -* `-r` — Ignored (but lets you pass `-r` for consistency with other commands) - ## `jj backout` @@ -267,9 +270,7 @@ Delete an existing branch and propagate the deletion to remotes on the next push * `` — The branches to delete -###### **Options:** - -* `--glob ` — Deprecated. Please prefix the pattern with `glob:` instead + By default, the specified name matches exactly. Use `glob:` prefix to select branches by wildcard pattern. For details, see https://github.com/martinvonz/jj/blob/main/docs/revsets.md#string-patterns. @@ -285,9 +286,7 @@ A forgotten branch will not impact remotes on future pushes. It will be recreate * `` — The branches to forget -###### **Options:** - -* `--glob ` — Deprecated. Please prefix the pattern with `glob:` instead + By default, the specified name matches exactly. Use `glob:` prefix to select branches by wildcard pattern. For details, see https://github.com/martinvonz/jj/blob/main/docs/revsets.md#string-patterns. @@ -305,23 +304,22 @@ For information about branches, see https://github.com/martinvonz/jj/blob/main/d * `` — Show branches whose local name matches + By default, the specified name matches exactly. Use `glob:` prefix to select branches by wildcard pattern. For details, see https://github.com/martinvonz/jj/blob/main/docs/revsets.md#string-patterns. + ###### **Options:** * `-a`, `--all-remotes` — Show all tracking and non-tracking remote branches including the ones whose targets are synchronized with the local branches - - Possible values: `true`, `false` - * `-t`, `--tracked` — Show remote tracked branches only. Omits local Git-tracking branches by default - - Possible values: `true`, `false` - * `-c`, `--conflicted` — Show conflicted branches only +* `-r`, `--revisions ` — Show branches whose local targets are in the given revisions. - Possible values: `true`, `false` - -* `-r`, `--revisions ` — Show branches whose local targets are in the given revisions + Note that `-r deleted_branch` will not work since `deleted_branch` wouldn't have a local target. * `-T`, `--template