Currently cargo package follows the following rules:
If include is not specified, then the following files will be excluded:
- If the package is not in a git repository, all “hidden” files starting with a dot will be skipped.
- If the package is in a git repository, any files that are ignored by the gitignore rules of the repository and global git configuration will be skipped.
This handling is arguably inconsistent and results in surprising behavior such as inclusion of .github/ folder for one-crate repositories (e.g. see here).
I suggest to remove the git exception and always exclude dotfiles which are not listed in the include field.
Previous IRLO discussion: https://internals.rust-lang.org/t/23700
Currently
cargo packagefollows the following rules:This handling is arguably inconsistent and results in surprising behavior such as inclusion of
.github/folder for one-crate repositories (e.g. see here).I suggest to remove the git exception and always exclude dotfiles which are not listed in the
includefield.Previous IRLO discussion: https://internals.rust-lang.org/t/23700