-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent packaging a crate if any files are dirty #2781
Conversation
This commit alters Cargo's behavior to prevent publishing a crate by default if any files in that crate are determined to be dirty, that is either modified or not part of the working tree. This can prevent common mistakes like many listed in rust-lang#2063, and subsequently... Closes rust-lang#2063
r? @wycats (rust_highfive has picked a reviewer for you, use r? to override) |
r? @brson cc @sbeckeriv |
@bors r+ |
📌 Commit 088d14a has been approved by |
Prevent packaging a crate if any files are dirty This commit alters Cargo's behavior to prevent publishing a crate by default if any files in that crate are determined to be dirty, that is either modified or not part of the working tree. This can prevent common mistakes like many listed in #2063 and enables features like #841. Closes #1597 Closes #2063
☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64 |
How does this behave if there are dirty files, but the |
@badboy this only check that the files that Cargo thinks are part of a package are not dirty, so in that case it'd allow a publish because Cargo doesn't think they're included in the package. |
This commit alters Cargo's behavior to prevent publishing a crate by default if
any files in that crate are determined to be dirty, that is either modified or
not part of the working tree.
This can prevent common mistakes like many listed in #2063 and enables features like #841.
Closes #1597
Closes #2063