Skip to content

Commit 6708d70

Browse files
committed
Auto merge of #4298 - behnam:ignore, r=alexcrichton
[src/doc/manifest] Add section on Migrating to `gitignore`-like pattern matching Tracking issue: #4268
2 parents ffab519 + 69c74aa commit 6708d70

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/doc/manifest.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,20 @@ necessary source files may not be included.
8181

8282
[globs]: http://doc.rust-lang.org/glob/glob/struct.Pattern.html
8383

84+
### Migrating to `gitignore`-like pattern matching
85+
86+
The current interpretation of these configs is based on UNIX Globs, as
87+
implemented in the [`glob` crate](https://crates.io/crates/glob). We want
88+
Cargo's `include` and `exclude` configs to work as similar to `gitignore` as
89+
possible. [The `gitignore` specification](https://git-scm.com/docs/gitignore) is
90+
also based on Globs, but has a bunch of additional features that enable easier
91+
pattern writing and more control. Therefore, we are migrating the interpretation
92+
for the rules of these configs to use the [`ignore`
93+
crate](https://crates.io/crates/ignore), and treat them each rule as a single
94+
line in a `gitignore` file. See [the tracking
95+
issue](https://github.com/rust-lang/cargo/issues/4268) for more details on the
96+
migration.
97+
8498
## The `publish` field (optional)
8599

86100
The `publish` field can be used to prevent a package from being published to a

0 commit comments

Comments
 (0)