Skip to content

Commit

Permalink
cli: sort operation subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
yuja committed Jun 22, 2024
1 parent 6b25320 commit cdc56fa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cli/src/commands/operation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ use crate::ui::Ui;
pub enum OperationCommand {
Abandon(OperationAbandonArgs),
Log(OperationLogArgs),
Undo(OperationUndoArgs),
Restore(OperationRestoreArgs),
Undo(OperationUndoArgs),
}

pub fn cmd_operation(
Expand Down
32 changes: 16 additions & 16 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ This document contains the help content for the `jj` command-line program.
* [`jj operation`↴](#jj-operation)
* [`jj operation abandon`↴](#jj-operation-abandon)
* [`jj operation log`↴](#jj-operation-log)
* [`jj operation undo`↴](#jj-operation-undo)
* [`jj operation restore`↴](#jj-operation-restore)
* [`jj operation undo`↴](#jj-operation-undo)
* [`jj parallelize`↴](#jj-parallelize)
* [`jj prev`↴](#jj-prev)
* [`jj rebase`↴](#jj-rebase)
Expand Down Expand Up @@ -1217,8 +1217,8 @@ For information about the operation log, see https://github.com/martinvonz/jj/bl
* `abandon` — Abandon operation history
* `log` — Show the operation log
* `undo` — Create a new operation that undoes an earlier operation
* `restore` — Create a new operation that restores the repo to an earlier state
* `undo` — Create a new operation that undoes an earlier operation
Expand Down Expand Up @@ -1256,21 +1256,19 @@ Show the operation log
## `jj operation undo`
## `jj operation restore`
Create a new operation that undoes an earlier operation
Create a new operation that restores the repo to an earlier state
This undoes an individual operation by applying the inverse of the operation.
This restores the repo to the state at the specified operation, effectively undoing all later operations. It does so by creating a new operation.
**Usage:** `jj operation undo [OPTIONS] [OPERATION]`
**Usage:** `jj operation restore [OPTIONS] <OPERATION>`
###### **Arguments:**
* `<OPERATION>` — The operation to undo
Use `jj op log` to find an operation to undo.
* `<OPERATION>` — The operation to restore to
Default value: `@`
Use `jj op log` to find an operation to restore to. Use e.g. `jj --at-op=<operation ID> log` before restoring to an operation to see the state of the repo at that operation.
###### **Options:**
Expand All @@ -1289,19 +1287,21 @@ This undoes an individual operation by applying the inverse of the operation.
## `jj operation restore`
## `jj operation undo`
Create a new operation that restores the repo to an earlier state
Create a new operation that undoes an earlier operation
This restores the repo to the state at the specified operation, effectively undoing all later operations. It does so by creating a new operation.
This undoes an individual operation by applying the inverse of the operation.
**Usage:** `jj operation restore [OPTIONS] <OPERATION>`
**Usage:** `jj operation undo [OPTIONS] [OPERATION]`
###### **Arguments:**
* `<OPERATION>` — The operation to restore to
* `<OPERATION>` — The operation to undo
Use `jj op log` to find an operation to restore to. Use e.g. `jj --at-op=<operation ID> log` before restoring to an operation to see the state of the repo at that operation.
Use `jj op log` to find an operation to undo.
Default value: `@`
###### **Options:**
Expand Down

0 comments on commit cdc56fa

Please sign in to comment.