Prevent packaging a crate if any files are dirty #2781

Merged
merged 1 commit into from Jun 11, 2016

Conversation

Projects
None yet
6 participants
@alexcrichton
Member

alexcrichton commented Jun 10, 2016

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

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

Closes #2063
@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Jun 10, 2016

r? @wycats

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

r? @wycats

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

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
Member

alexcrichton commented Jun 10, 2016

r? @brson

cc @sbeckeriv

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Jun 11, 2016

Contributor

@bors r+

Contributor

brson commented Jun 11, 2016

@bors r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jun 11, 2016

Contributor

📌 Commit 088d14a has been approved by brson

Contributor

bors commented Jun 11, 2016

📌 Commit 088d14a has been approved by brson

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jun 11, 2016

Contributor

⌛️ Testing commit 088d14a with merge ffa147d...

Contributor

bors commented Jun 11, 2016

⌛️ Testing commit 088d14a with merge ffa147d...

bors added a commit that referenced this pull request Jun 11, 2016

Auto merge of #2781 - alexcrichton:block-if-dirty, r=brson
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 bors merged commit 088d14a into rust-lang:master Jun 11, 2016

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build cancelled
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@badboy

This comment has been minimized.

Show comment
Hide comment
@badboy

badboy Jun 11, 2016

Member

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?

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 alexcrichton:block-if-dirty branch Jun 12, 2016

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Jun 12, 2016

Member

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

Member

alexcrichton commented Jun 12, 2016

@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