docs: fixup to b318b200, mark code blocks in help as text

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.
This commit is contained in:
Ilya Grigoriev 2024-01-30 14:59:31 -08:00
parent 52c415eaf4
commit 96d0e776ad
4 changed files with 16 additions and 24 deletions

View file

@ -27,11 +27,9 @@ 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
@ -39,12 +37,10 @@ use crate::ui::Ui;
/// B B
/// ```
///
///
/// If `--edit` is passed, it will move you directly to the child
/// revision.
///
///
/// ```
/// ```text
/// D D
/// | |
/// C C

View file

@ -25,7 +25,7 @@ use crate::ui::Ui;
///
/// The command moves you to the parent in a linear fashion.
///
/// ```
/// ```text
/// D @ D
/// |/ |
/// A => A @
@ -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 => @

View file

@ -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'
@ -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'
@ -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
@ -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 |

View file

@ -1133,11 +1133,9 @@ 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
@ -1145,12 +1143,10 @@ C @ => C
B B
```
If `--edit` is passed, it will move you directly to the child
revision.
```
```text
D D
| |
C C
@ -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 @
@ -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 => @
@ -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'
@ -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'
@ -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
@ -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 |