Skip to content

Commit 9a91531

Browse files
authored
Documentation: Clarified negating VCS excluded files (#10442)
1 parent 01955bb commit 9a91531

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

docs/pyproject.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,6 @@ You can explicitly specify to Poetry that a set of globs should be ignored or in
645645
The globs specified in the exclude field identify a set of files that are not included when a package is built.
646646
`include` has priority over `exclude`.
647647

648-
If a VCS is being used for a package, the exclude field will be seeded with the VCS’ ignore settings (`.gitignore` for git, for example).
649-
650-
{{% note %}}
651-
Explicitly declaring entries in `include` will negate VCS' ignore settings.
652-
{{% /note %}}
653-
654648
You can also specify the formats for which these patterns have to be included, as shown here:
655649

656650
```toml
@@ -672,6 +666,11 @@ Pay attention to include top level files and directories with common names like
672666
`CHANGELOG.md`, `LICENSE`, `tests` or `docs` only in sdists and **not** in wheels.
673667
{{% /warning %}}
674668

669+
If a VCS is being used for a package, the exclude field will be seeded with the VCS’ ignore settings (`.gitignore` for git, for example).
670+
671+
{{% note %}}
672+
VCS ignore settings can be negated by adding entries in `include`; be sure to explicitly set the `format` as above.
673+
{{% /note %}}
675674

676675
### dependencies and dependency groups
677676

0 commit comments

Comments
 (0)