Skip to content

Commit

Permalink
docs: fixup to b318b20, mark code blocks as text
Browse files Browse the repository at this point in the history
This prevents rust doctests from trying to compile the code blocks.

I don't think we use doctests much or at all, but I'd like
`cargo insta test --test-runner nextest --accept --workspace`
to pass.

Unfortunately, this affects the output of `jj help` as well, but I
can't think of a workaround for that.
  • Loading branch information
ilyagr committed Jan 30, 2024
1 parent 52c415e commit dcbab9b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
8 changes: 2 additions & 6 deletions cli/src/commands/next.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,20 @@ use crate::ui::Ui;
/// Move the current working copy commit to the next child revision in the
/// repository.
///
///
/// The command moves you to the next child in a linear fashion.
///
///
/// ```
/// ```text
/// D D @
/// | |/
/// C @ => C
/// |/ |
/// B B
/// ```
///
///
/// If `--edit` is passed, it will move you directly to the child
/// revision.
///
///
/// ```
/// ```text
/// D D
/// | |
/// C C
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/prev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::ui::Ui;
///
/// The command moves you to the parent in a linear fashion.
///
/// ```
/// ```text
/// D @ D
/// |/ |
/// A => A @
Expand All @@ -36,7 +36,7 @@ use crate::ui::Ui;
/// If `--edit` is passed, it will move the working copy commit
/// directly to the parent.
///
/// ```
/// ```text
/// D @ D
/// |/ |
/// C => @
Expand Down
8 changes: 4 additions & 4 deletions cli/src/commands/rebase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use crate::ui::Ui;
/// your history like this (letters followed by an apostrophe are post-rebase
/// versions):
///
/// ```
/// ```text
/// O N'
/// | |
/// | N M'
Expand All @@ -73,7 +73,7 @@ use crate::ui::Ui;
/// -d O` would transform your history like this (because `L` and `M` are on the
/// same "branch", relative to the destination):
///
/// ```
/// ```text
/// O N'
/// | |
/// | N M'
Expand All @@ -92,7 +92,7 @@ use crate::ui::Ui;
/// onto the specified revision's parent(s). For example, `jj rebase -r K -d M`
/// would transform your history like this:
///
/// ```
/// ```text
/// M K'
/// | |
/// | L M
Expand All @@ -107,7 +107,7 @@ use crate::ui::Ui;
/// order to work (in addition to its current parent K), you can run `jj rebase
/// -s L -d K -d M`:
///
/// ```
/// ```text
/// M L'
/// | |\
/// | L M |
Expand Down
20 changes: 8 additions & 12 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -1133,24 +1133,20 @@ For more information, see https://github.com/martinvonz/jj/blob/main/docs/workin
Move the current working copy commit to the next child revision in the
repository.
The command moves you to the next child in a linear fashion.
```
```text
D D @
| |/
C @ => C
|/ |
B B
```
If `--edit` is passed, it will move you directly to the child
revision.
```
```text
D D
| |
C C
Expand Down Expand Up @@ -1339,7 +1335,7 @@ Move the working copy commit to the parent of the current revision.
The command moves you to the parent in a linear fashion.
```
```text
D @ D
|/ |
A => A @
Expand All @@ -1350,7 +1346,7 @@ B B
If `--edit` is passed, it will move the working copy commit
directly to the parent.
```
```text
D @ D
|/ |
C => @
Expand Down Expand Up @@ -1391,7 +1387,7 @@ onto the destination. For example, `jj rebase -s M -d O` would transform
your history like this (letters followed by an apostrophe are post-rebase
versions):
```
```text
O N'
| |
| N M'
Expand All @@ -1418,7 +1414,7 @@ single root). For example, either `jj rebase -b L -d O` or `jj rebase -b M
-d O` would transform your history like this (because `L` and `M` are on the
same "branch", relative to the destination):
```
```text
O N'
| |
| N M'
Expand All @@ -1437,7 +1433,7 @@ destination. Any "hole" left behind will be filled by rebasing descendants
onto the specified revision's parent(s). For example, `jj rebase -r K -d M`
would transform your history like this:
```
```text
M K'
| |
| L M
Expand All @@ -1452,7 +1448,7 @@ For example, if you realize that commit L actually depends on commit M in
order to work (in addition to its current parent K), you can run `jj rebase
-s L -d K -d M`:
```
```text
M L'
| |\
| L M |
Expand Down

0 comments on commit dcbab9b

Please sign in to comment.