diff --git a/CHANGELOG.md b/CHANGELOG.md index 30d1d187ca..484596dd39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -150,6 +150,9 @@ changes. Two select improvements: below it, similar to a "scissor line" in git. When editing multiple commits, only ignore until the next `JJ: describe` line. +* The `--stat` option for `jj log`, `jj show` and `jj diff` now has a + short alias `-S` + ### Fixed bugs * The `$NO_COLOR` environment variable must now be non-empty to be respected. diff --git a/cli/src/diff_util.rs b/cli/src/diff_util.rs index da2cce4472..8faf01ce1c 100644 --- a/cli/src/diff_util.rs +++ b/cli/src/diff_util.rs @@ -92,7 +92,7 @@ pub struct DiffFormatArgs { #[arg(long, short)] pub summary: bool, /// Show a histogram of the changes - #[arg(long)] + #[arg(long, short = 'S')] pub stat: bool, /// For each path, show only its type before and after /// diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 0621078b4b..110d1c6f0b 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -695,7 +695,7 @@ With the `--from` and/or `--to` options, shows the difference from/to the given * `-f`, `--from ` — Show changes from this revision * `-t`, `--to ` — Show changes to this revision * `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted -* `--stat` — Show a histogram of the changes +* `-S`, `--stat` — Show a histogram of the changes * `--types` — For each path, show only its type before and after 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. @@ -806,7 +806,7 @@ Lists the previous commits which a change has pointed to. The current commit of If the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes. * `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted -* `--stat` — Show a histogram of the changes +* `-S`, `--stat` — Show a histogram of the changes * `--types` — For each path, show only its type before and after 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. @@ -1333,7 +1333,7 @@ This excludes changes from other commits by temporarily rebasing `--from` onto ` * `-f`, `--from ` — Show changes from this revision * `-t`, `--to ` — Show changes to this revision * `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted -* `--stat` — Show a histogram of the changes +* `-S`, `--stat` — Show a histogram of the changes * `--types` — For each path, show only its type before and after 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. @@ -1384,7 +1384,7 @@ The working-copy commit is indicated by a `@` symbol in the graph. Immutable rev If not specified, this defaults to the `templates.log` setting. * `-p`, `--patch` — Show patch * `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted -* `--stat` — Show a histogram of the changes +* `-S`, `--stat` — Show a histogram of the changes * `--types` — For each path, show only its type before and after 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. @@ -1531,7 +1531,7 @@ Compare changes to the repository between two operations If the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes. * `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted -* `--stat` — Show a histogram of the changes +* `-S`, `--stat` — Show a histogram of the changes * `--types` — For each path, show only its type before and after 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. @@ -1567,7 +1567,7 @@ Like other commands, `jj op log` snapshots the current working-copy changes and If the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes. * `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted -* `--stat` — Show a histogram of the changes +* `-S`, `--stat` — Show a histogram of the changes * `--types` — For each path, show only its type before and after 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. @@ -1633,7 +1633,7 @@ Show changes to the repository in an operation If the previous version has different parents, it will be temporarily rebased to the parents of the new version, so the diff is not contaminated by unrelated changes. * `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted -* `--stat` — Show a histogram of the changes +* `-S`, `--stat` — Show a histogram of the changes * `--types` — For each path, show only its type before and after 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. @@ -1966,7 +1966,7 @@ Show commit description and changes in a revision For the syntax, see https://jj-vcs.github.io/jj/latest/templates/ * `-s`, `--summary` — For each path, show only whether it was modified, added, or deleted -* `--stat` — Show a histogram of the changes +* `-S`, `--stat` — Show a histogram of the changes * `--types` — For each path, show only its type before and after 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.