Skip to content

Commit

Permalink
docs: fixup to b318b2, 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.
  • Loading branch information
ilyagr committed Jan 30, 2024
1 parent 52c415e commit d08a6f3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 deletions.
4 changes: 2 additions & 2 deletions cli/src/commands/next.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use crate::ui::Ui;
/// The command moves you to the next child in a linear fashion.
///
///
/// ```
/// ```text
/// D D @
/// | |/
/// C @ => C
Expand All @@ -44,7 +44,7 @@ use crate::ui::Ui;
/// 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
11 changes: 4 additions & 7 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 @@ -72,8 +72,7 @@ use crate::ui::Ui;
/// 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 @@ -91,8 +90,7 @@ use crate::ui::Ui;
/// 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 @@ -106,8 +104,7 @@ use crate::ui::Ui;
/// 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
19 changes: 8 additions & 11 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ repository.
The command moves you to the next child in a linear fashion.
```
```text
D D @
| |/
C @ => C
Expand All @@ -1150,7 +1150,7 @@ If `--edit` is passed, it will move you directly to the child
revision.
```
```text
D D
| |
C C
Expand Down Expand Up @@ -1339,7 +1339,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 +1350,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 +1391,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 @@ -1417,8 +1417,7 @@ In other words, `jj rebase -b X -d Y` rebases commits in the revset
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 @@ -1436,8 +1435,7 @@ With `-r`, the command rebases only the specified revision onto the
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 @@ -1451,8 +1449,7 @@ Note that you can create a merge commit by repeating the `-d` argument.
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 d08a6f3

Please sign in to comment.