Skip to content

Commit ee753cf

Browse files
committed
Update docs
1 parent 90dc055 commit ee753cf

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
1212

1313
- Add `--no-private` flag to exclude `publish = false` crates.
1414

15-
This flag is more powerful than [`--ignore-private` flag](https://github.com/taiki-e/cargo-hack#--ignore-private), which also prevents private crate from affecting dependency resolution.
15+
This flag is more powerful than [`--ignore-private` flag](https://github.com/taiki-e/cargo-hack#--ignore-private), because this also prevents private crates from affecting lockfile and metadata.
1616

1717
- Restore `Cargo.lock` after run to match behavior with [cargo-minimal-versions](https://github.com/taiki-e/cargo-minimal-versions) and [cargo-no-dev-deps](https://github.com/taiki-e/cargo-no-dev-deps), when `--no-dev-deps`, `--remove-dev-deps`, or `--no-private` is used.
1818

README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ OPTIONS:
143143
Equivalent to --no-dev-deps flag except for does not restore the original `Cargo.toml`
144144
after performed.
145145

146+
--no-private
147+
Perform without `publish = false` crates.
148+
146149
--ignore-private
147150
Skip to perform on `publish = false` packages.
148151

@@ -346,7 +349,14 @@ with `--no-dev-deps`.
346349
<!-- omit in toc -->
347350
### --ignore-private
348351

349-
Skip to perform on `publish = false` packages.
352+
Skip to perform on `publish = false` crates.
353+
354+
<!-- omit in toc -->
355+
### --no-private
356+
357+
Perform without `publish = false` crates. This is similar to `--ignore-private`, but is more powerful because this also prevents private crates from affecting lockfile and metadata.
358+
359+
Note: `--no-private` flag modifies `Cargo.toml` while cargo-hack is running and restores it when finished.
350360

351361
<!-- omit in toc -->
352362
### --ignore-unknown-features

src/cli.rs

+1
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ const HELP: &[HelpText<'_>] = &[
691691
after performed",
692692
&[],
693693
),
694+
("", "--no-private", "", "Perform without `publish = false` crates", &[]),
694695
("", "--ignore-private", "", "Skip to perform on `publish = false` packages", &[]),
695696
(
696697
"",

tests/long-help.txt

+3
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ OPTIONS:
114114
Equivalent to --no-dev-deps flag except for does not restore the original `Cargo.toml`
115115
after performed.
116116

117+
--no-private
118+
Perform without `publish = false` crates.
119+
117120
--ignore-private
118121
Skip to perform on `publish = false` packages.
119122

tests/short-help.txt

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ OPTIONS:
2828
--no-dev-deps Perform without dev-dependencies
2929
--remove-dev-deps Equivalent to --no-dev-deps flag except for does not
3030
restore the original `Cargo.toml` after performed
31+
--no-private Perform without `publish = false` crates
3132
--ignore-private Skip to perform on `publish = false` packages
3233
--ignore-unknown-features Skip passing --features flag to `cargo` if that feature
3334
does not exist in the package

0 commit comments

Comments
 (0)