Skip to content

Commit 1ccbdae

Browse files
committed
doc(yank): add section headers
1 parent 33dfd3d commit 1ccbdae

File tree

4 files changed

+67
-51
lines changed

4 files changed

+67
-51
lines changed

src/doc/man/cargo-yank.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ The yank command removes a previously published crate's version from the
1515
server's index. This command does not delete any data, and the crate will
1616
still be available for download via the registry's download link.
1717

18-
Crates should only be yanked in exceptional circumstances, for example, license/copyright issues, accidental
19-
inclusion of [PII](https://en.wikipedia.org/wiki/Personal_data), credentials, etc... In the case of security
20-
vulnerabilities, [RustSec](https://rustsec.org/) is typically a less disruptive mechanism to inform users
21-
and encourage them to upgrade, and avoids the possibility of significant downstream disruption irrespective
22-
of susceptibility to the vulnerability in question.
23-
2418
Cargo will not use a yanked version for any new project or checkout without a
2519
pre-existing lockfile, and will generate an error if there are no longer
2620
any compatible versions for your crate.
2721

22+
This command requires you to be authenticated with either the `--token` option
23+
or using {{man "cargo-login" 1}}.
24+
25+
If the crate name is not specified, it will use the package name from the
26+
current directory.
27+
28+
### How yank works
29+
2830
For example, the `foo` crate published version `0.22.0` and another crate `bar`
2931
declared a dependency on version `foo = 0.22`. Now `foo` releases a new, but
3032
not semver compatible, version `0.23.0`, and finds a critical issue with `0.22.0`.
@@ -46,14 +48,18 @@ following a given release being yanked:
4648
| `0.22.1` | Use either `0.22.0` or `0.22.2` | Use `0.22.0` | Use `0.23.0` |
4749
| `0.23.0` | Use either `0.22.0`, `0.21.0` or `0.22.2` | Use `0.22.0` | **Return Error** |
4850

49-
A common workflow is to yank a crate having already published a semver compatible version,
50-
to reduce the probability of preventing dependent crates from compiling.
51+
### When to yank
5152

52-
This command requires you to be authenticated with either the `--token` option
53-
or using {{man "cargo-login" 1}}.
53+
Crates should only be yanked in exceptional circumstances, for example,
54+
license/copyright issues, accidental inclusion of
55+
[PII](https://en.wikipedia.org/wiki/Personal_data), credentials, etc...
56+
In the case of security vulnerabilities, [RustSec](https://rustsec.org/) is
57+
typically a less disruptive mechanism to inform users and encourage them to
58+
upgrade, and avoids the possibility of significant downstream disruption
59+
irrespective of susceptibility to the vulnerability in question.
5460

55-
If the crate name is not specified, it will use the package name from the
56-
current directory.
61+
A common workflow is to yank a crate having already published a semver compatible version,
62+
to reduce the probability of preventing dependent crates from compiling.
5763

5864
## OPTIONS
5965

src/doc/man/generated_txt/cargo-yank.txt

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,17 @@ DESCRIPTION
1313
crate will still be available for download via the registry’s download
1414
link.
1515

16-
Crates should only be yanked in exceptional circumstances, for example,
17-
license/copyright issues, accidental inclusion of PII
18-
<https://en.wikipedia.org/wiki/Personal_data>, credentials, etc... In
19-
the case of security vulnerabilities, RustSec <https://rustsec.org/> is
20-
typically a less disruptive mechanism to inform users and encourage them
21-
to upgrade, and avoids the possibility of significant downstream
22-
disruption irrespective of susceptibility to the vulnerability in
23-
question.
24-
2516
Cargo will not use a yanked version for any new project or checkout
2617
without a pre-existing lockfile, and will generate an error if there are
2718
no longer any compatible versions for your crate.
2819

20+
This command requires you to be authenticated with either the --token
21+
option or using cargo-login(1).
22+
23+
If the crate name is not specified, it will use the package name from
24+
the current directory.
25+
26+
How yank works
2927
For example, the foo crate published version 0.22.0 and another crate
3028
bar declared a dependency on version foo = 0.22. Now foo releases a new,
3129
but not semver compatible, version 0.23.0, and finds a critical issue
@@ -55,16 +53,20 @@ DESCRIPTION
5553
| | 0.21.0 or 0.22.2 | 0.22.0 | Error |
5654
+-----------------------+-----------------------+-----------+----------+
5755

56+
When to yank
57+
Crates should only be yanked in exceptional circumstances, for example,
58+
license/copyright issues, accidental inclusion of PII
59+
<https://en.wikipedia.org/wiki/Personal_data>, credentials, etc… In
60+
the case of security vulnerabilities, RustSec <https://rustsec.org/> is
61+
typically a less disruptive mechanism to inform users and encourage them
62+
to upgrade, and avoids the possibility of significant downstream
63+
disruption irrespective of susceptibility to the vulnerability in
64+
question.
65+
5866
A common workflow is to yank a crate having already published a semver
5967
compatible version, to reduce the probability of preventing dependent
6068
crates from compiling.
6169

62-
This command requires you to be authenticated with either the --token
63-
option or using cargo-login(1).
64-
65-
If the crate name is not specified, it will use the package name from
66-
the current directory.
67-
6870
OPTIONS
6971
Yank Options
7072
--vers version, --version version

src/doc/src/commands/cargo-yank.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ The yank command removes a previously published crate's version from the
1515
server's index. This command does not delete any data, and the crate will
1616
still be available for download via the registry's download link.
1717

18-
Crates should only be yanked in exceptional circumstances, for example, license/copyright issues, accidental
19-
inclusion of [PII](https://en.wikipedia.org/wiki/Personal_data), credentials, etc... In the case of security
20-
vulnerabilities, [RustSec](https://rustsec.org/) is typically a less disruptive mechanism to inform users
21-
and encourage them to upgrade, and avoids the possibility of significant downstream disruption irrespective
22-
of susceptibility to the vulnerability in question.
23-
2418
Cargo will not use a yanked version for any new project or checkout without a
2519
pre-existing lockfile, and will generate an error if there are no longer
2620
any compatible versions for your crate.
2721

22+
This command requires you to be authenticated with either the `--token` option
23+
or using [cargo-login(1)](cargo-login.html).
24+
25+
If the crate name is not specified, it will use the package name from the
26+
current directory.
27+
28+
### How yank works
29+
2830
For example, the `foo` crate published version `0.22.0` and another crate `bar`
2931
declared a dependency on version `foo = 0.22`. Now `foo` releases a new, but
3032
not semver compatible, version `0.23.0`, and finds a critical issue with `0.22.0`.
@@ -46,14 +48,18 @@ following a given release being yanked:
4648
| `0.22.1` | Use either `0.22.0` or `0.22.2` | Use `0.22.0` | Use `0.23.0` |
4749
| `0.23.0` | Use either `0.22.0`, `0.21.0` or `0.22.2` | Use `0.22.0` | **Return Error** |
4850

49-
A common workflow is to yank a crate having already published a semver compatible version,
50-
to reduce the probability of preventing dependent crates from compiling.
51+
### When to yank
5152

52-
This command requires you to be authenticated with either the `--token` option
53-
or using [cargo-login(1)](cargo-login.html).
53+
Crates should only be yanked in exceptional circumstances, for example,
54+
license/copyright issues, accidental inclusion of
55+
[PII](https://en.wikipedia.org/wiki/Personal_data), credentials, etc...
56+
In the case of security vulnerabilities, [RustSec](https://rustsec.org/) is
57+
typically a less disruptive mechanism to inform users and encourage them to
58+
upgrade, and avoids the possibility of significant downstream disruption
59+
irrespective of susceptibility to the vulnerability in question.
5460

55-
If the crate name is not specified, it will use the package name from the
56-
current directory.
61+
A common workflow is to yank a crate having already published a semver compatible version,
62+
to reduce the probability of preventing dependent crates from compiling.
5763

5864
## OPTIONS
5965

src/etc/man/cargo-yank.1

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ The yank command removes a previously published crate\[cq]s version from the
1414
server\[cq]s index. This command does not delete any data, and the crate will
1515
still be available for download via the registry\[cq]s download link.
1616
.sp
17-
Crates should only be yanked in exceptional circumstances, for example, license/copyright issues, accidental
18-
inclusion of \fIPII\fR <https://en.wikipedia.org/wiki/Personal_data>, credentials, etc... In the case of security
19-
vulnerabilities, \fIRustSec\fR <https://rustsec.org/> is typically a less disruptive mechanism to inform users
20-
and encourage them to upgrade, and avoids the possibility of significant downstream disruption irrespective
21-
of susceptibility to the vulnerability in question.
22-
.sp
2317
Cargo will not use a yanked version for any new project or checkout without a
2418
pre\-existing lockfile, and will generate an error if there are no longer
2519
any compatible versions for your crate.
2620
.sp
21+
This command requires you to be authenticated with either the \fB\-\-token\fR option
22+
or using \fBcargo\-login\fR(1).
23+
.sp
24+
If the crate name is not specified, it will use the package name from the
25+
current directory.
26+
.SS "How yank works"
2727
For example, the \fBfoo\fR crate published version \fB0.22.0\fR and another crate \fBbar\fR
2828
declared a dependency on version \fBfoo = 0.22\fR\&. Now \fBfoo\fR releases a new, but
2929
not semver compatible, version \fB0.23.0\fR, and finds a critical issue with \fB0.22.0\fR\&.
@@ -80,15 +80,17 @@ T}:T{
8080
T}
8181
.TE
8282
.sp
83+
.SS "When to yank"
84+
Crates should only be yanked in exceptional circumstances, for example,
85+
license/copyright issues, accidental inclusion of
86+
\fIPII\fR <https://en.wikipedia.org/wiki/Personal_data>, credentials, etc\[u2026]
87+
In the case of security vulnerabilities, \fIRustSec\fR <https://rustsec.org/> is
88+
typically a less disruptive mechanism to inform users and encourage them to
89+
upgrade, and avoids the possibility of significant downstream disruption
90+
irrespective of susceptibility to the vulnerability in question.
8391
.sp
8492
A common workflow is to yank a crate having already published a semver compatible version,
8593
to reduce the probability of preventing dependent crates from compiling.
86-
.sp
87-
This command requires you to be authenticated with either the \fB\-\-token\fR option
88-
or using \fBcargo\-login\fR(1).
89-
.sp
90-
If the crate name is not specified, it will use the package name from the
91-
current directory.
9294
.SH "OPTIONS"
9395
.SS "Yank Options"
9496
.sp

0 commit comments

Comments
 (0)