Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* Templates now support a `.split(separator, [limit])` method on strings to
split a string into a list of substrings.

* `jj log -G` is now available as a short form of `jj log --no-graph`.
* `-G` is now available as a short form of `--no-graph` in `jj log`, `jj evolog`,
`jj op log`, `jj op show` and `jj op diff`.

* `jj metaedit` now accepts `-m`/`--message` option to non-interactively update
the change description.
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/evolog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub(crate) struct EvologArgs {
#[arg(long)]
reversed: bool,
/// Don't show the graph, show a flat list of revisions
#[arg(long)]
#[arg(long, short = 'G')]
no_graph: bool,
/// Render each revision using the given template
///
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/operation/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub struct OperationDiffArgs {
)]
to: Option<String>,
/// Don't show the graph, show a flat list of modified changes
#[arg(long)]
#[arg(long, short = 'G')]
no_graph: bool,
/// Show patch of modifications to changes
///
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/operation/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub struct OperationLogArgs {
#[arg(long)]
reversed: bool,
/// Don't show the graph, show a flat list of operations
#[arg(long)]
#[arg(long, short = 'G')]
no_graph: bool,
/// Render each operation using the given template
///
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/operation/show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub struct OperationShowArgs {
#[arg(default_value = "@", add = ArgValueCandidates::new(complete::operations))]
operation: String,
/// Don't show the graph, show a flat list of modified changes
#[arg(long)]
#[arg(long, short = 'G')]
no_graph: bool,
/// Render the operation using the given template
///
Expand Down
8 changes: 4 additions & 4 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ Lists the previous commits which a change has pointed to. The current commit of

Applied after revisions are reordered topologically, but before being reversed.
* `--reversed` — Show revisions in the opposite order (older revisions first)
* `--no-graph` — Don't show the graph, show a flat list of revisions
* `-G`, `--no-graph` — Don't show the graph, show a flat list of revisions
* `-T`, `--template <TEMPLATE>` — Render each revision using the given template

All 0-argument methods of the [`CommitEvolutionEntry` type] are available as keywords in the template expression. See [`jj help -k templates`] for more information.
Expand Down Expand Up @@ -1921,7 +1921,7 @@ Compare changes to the repository between two operations
* `--operation <OPERATION>` [alias: `op`] — Show repository changes in this operation, compared to its parent
* `-f`, `--from <FROM>` — Show repository changes from this operation
* `-t`, `--to <TO>` — Show repository changes to this operation
* `--no-graph` — Don't show the graph, show a flat list of modified changes
* `-G`, `--no-graph` — Don't show the graph, show a flat list of modified changes
* `-p`, `--patch` — Show patch of modifications to changes

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.
Expand Down Expand Up @@ -1958,7 +1958,7 @@ Like other commands, `jj op log` snapshots the current working-copy changes and

Applied after operations are reordered topologically, but before being reversed.
* `--reversed` — Show operations in the opposite order (older operations first)
* `--no-graph` — Don't show the graph, show a flat list of operations
* `-G`, `--no-graph` — Don't show the graph, show a flat list of operations
* `-T`, `--template <TEMPLATE>` — Render each operation using the given template

You can specify arbitrary template expressions using the [built-in keywords]. See [`jj help -k templates`] for more information.
Expand Down Expand Up @@ -2067,7 +2067,7 @@ Show changes to the repository in an operation

###### **Options:**

* `--no-graph` — Don't show the graph, show a flat list of modified changes
* `-G`, `--no-graph` — Don't show the graph, show a flat list of modified changes
* `-T`, `--template <TEMPLATE>` — Render the operation using the given template

You can specify arbitrary template expressions using the [built-in keywords]. See [`jj help -k templates`] for more information.
Expand Down
48 changes: 48 additions & 0 deletions cli/tests/test_operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,37 @@ fn test_op_diff_sibling() {
- qpvuntsm hidden b1ca67e2 (empty) B
[EOF]
");

// no graph
let output = work_dir.run_jj([
"op",
"diff",
"--at-op",
p2_op_id,
"--from",
p2_op_id,
"--to",
p1_op_id,
"--summary",
"--no-graph",
]);
insta::assert_snapshot!(output, @r"
From operation: 252ff3a5a0e6 (2001-02-03 08:05:12) describe commit e8849ae12c709f2321908879bc724fdb2ab8a781
To operation: 7bba3a63b73b (2001-02-03 08:05:11) new empty commit

Changed commits:
- qpvuntsm hidden b1ca67e2 (empty) B
+ mzvwutvl 08c63613 (empty) A
+ zsuskuln 47b9525e A.2
A file2
+ kkmpptxz 6c70a4f7 A.1
A file1

Changed working copy default@:
+ mzvwutvl 08c63613 (empty) A
- qpvuntsm hidden b1ca67e2 (empty) B
[EOF]
");
}

#[test]
Expand Down Expand Up @@ -2560,6 +2591,23 @@ fn test_op_show() {
- tracked kulxwnxm e1a239a5 Commit 5
[EOF]
");

// Showing a given operation, without graph
let output = work_dir.run_jj(["op", "show", "--no-graph", "8727dbd86fa3"]);
insta::assert_snapshot!(output, @r"
8727dbd86fa3 [email protected] 2001-02-03 04:05:27.000 +07:00 - 2001-02-03 04:05:27.000 +07:00
new empty commit
args: jj new bookmark-1@origin -m 'new commit'

Changed commits:
+ tlkvzzqu 8f340dd7 (empty) new commit
- qpvuntsm hidden e8849ae1 (empty) (no description set)

Changed working copy default@:
+ tlkvzzqu 8f340dd7 (empty) new commit
- qpvuntsm hidden e8849ae1 (empty) (no description set)
[EOF]
");
}

#[test]
Expand Down