From 779272c105d6e8cf55cfea025523021c3be2f132 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Wed, 18 Dec 2024 01:39:13 +0100 Subject: [PATCH] cli/src/diff_util.rs: fix typo in `diff --name-only` cli/tests/cli-reference@.md.snap: update snapshots Signed-off-by: Tim Janik --- cli/src/diff_util.rs | 2 +- cli/tests/cli-reference@.md.snap | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cli/src/diff_util.rs b/cli/src/diff_util.rs index 9fbffbca32..d4f0c63db8 100644 --- a/cli/src/diff_util.rs +++ b/cli/src/diff_util.rs @@ -106,7 +106,7 @@ pub struct DiffFormatArgs { /// For each path, show only its path /// /// Typically useful for shell commands like: - /// `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g` + /// `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g` #[arg(long)] pub name_only: bool, /// Show a Git-format diff diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index acb1e46dde..af478f4242 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -1,6 +1,7 @@ --- source: cli/tests/test_generate_md_cli_help.rs description: "AUTO-GENERATED FILE, DO NOT EDIT. This cli reference is generated by a test as an `insta` snapshot. MkDocs includes this snapshot from docs/cli-reference.md." +snapshot_kind: text --- @@ -703,7 +704,7 @@ With the `--from` and/or `--to` options, shows the difference from/to the given The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule. * `--name-only` — For each path, show only its path - Typically useful for shell commands like: `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g` + Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g` * `--git` — Show a Git-format diff * `--color-words` — Show a word-level diff with changes indicated only by color * `--tool ` — Generate diff by external command @@ -813,7 +814,7 @@ Lists the previous commits which a change has pointed to. The current commit of The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule. * `--name-only` — For each path, show only its path - Typically useful for shell commands like: `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g` + Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g` * `--git` — Show a Git-format diff * `--color-words` — Show a word-level diff with changes indicated only by color * `--tool ` — Generate diff by external command @@ -1338,7 +1339,7 @@ This excludes changes from other commits by temporarily rebasing `--from` onto ` The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule. * `--name-only` — For each path, show only its path - Typically useful for shell commands like: `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g` + Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g` * `--git` — Show a Git-format diff * `--color-words` — Show a word-level diff with changes indicated only by color * `--tool ` — Generate diff by external command @@ -1389,7 +1390,7 @@ The working-copy commit is indicated by a `@` symbol in the graph. Immutable rev The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule. * `--name-only` — For each path, show only its path - Typically useful for shell commands like: `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g` + Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g` * `--git` — Show a Git-format diff * `--color-words` — Show a word-level diff with changes indicated only by color * `--tool ` — Generate diff by external command @@ -1536,7 +1537,7 @@ Compare changes to the repository between two operations The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule. * `--name-only` — For each path, show only its path - Typically useful for shell commands like: `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g` + Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g` * `--git` — Show a Git-format diff * `--color-words` — Show a word-level diff with changes indicated only by color * `--tool ` — Generate diff by external command @@ -1572,7 +1573,7 @@ Like other commands, `jj op log` snapshots the current working-copy changes and The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule. * `--name-only` — For each path, show only its path - Typically useful for shell commands like: `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g` + Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g` * `--git` — Show a Git-format diff * `--color-words` — Show a word-level diff with changes indicated only by color * `--tool ` — Generate diff by external command @@ -1638,7 +1639,7 @@ Show changes to the repository in an operation The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule. * `--name-only` — For each path, show only its path - Typically useful for shell commands like: `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g` + Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g` * `--git` — Show a Git-format diff * `--color-words` — Show a word-level diff with changes indicated only by color * `--tool ` — Generate diff by external command @@ -1969,7 +1970,7 @@ Show commit description and changes in a revision The diff is shown as two letters. The first letter indicates the type before and the second letter indicates the type after. '-' indicates that the path was not present, 'F' represents a regular file, `L' represents a symlink, 'C' represents a conflict, and 'G' represents a Git submodule. * `--name-only` — For each path, show only its path - Typically useful for shell commands like: `jj diff -r @- --name_only | xargs perl -pi -e's/OLD/NEW/g` + Typically useful for shell commands like: `jj diff -r @- --name-only | xargs perl -pi -e's/OLD/NEW/g` * `--git` — Show a Git-format diff * `--color-words` — Show a word-level diff with changes indicated only by color * `--tool ` — Generate diff by external command