Skip to content
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

Merged
merged 1 commit into from
Jun 11, 2016

Conversation

alexcrichton
Copy link
Member

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

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
@rust-highfive
Copy link

r? @wycats

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

r? @brson

cc @sbeckeriv

@brson
Copy link
Contributor

brson commented Jun 11, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Jun 11, 2016

📌 Commit 088d14a has been approved by brson

@bors
Copy link
Contributor

bors commented Jun 11, 2016

⌛ Testing commit 088d14a with merge ffa147d...

bors added a commit that referenced this pull request Jun 11, 2016
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
@bors
Copy link
Contributor

bors commented Jun 11, 2016

@bors bors merged commit 088d14a into rust-lang:master Jun 11, 2016
@badboy
Copy link
Member

badboy commented Jun 11, 2016

How does this behave if there are dirty files, but the Cargo.toml has an explicit includes block, but the dirty files are not included?

@alexcrichton alexcrichton deleted the block-if-dirty branch June 12, 2016 10:17
@alexcrichton
Copy link
Member Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants