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

Cargo happily publishes when a git submodule is dirty #3622

Closed
vks opened this issue Jan 31, 2017 · 1 comment · Fixed by #7245
Closed

Cargo happily publishes when a git submodule is dirty #3622

vks opened this issue Jan 31, 2017 · 1 comment · Fixed by #7245

Comments

@vks
Copy link

vks commented Jan 31, 2017

Cargo has a built-in check to avoid publishing when the working directory is dirty (to avoid publishing file unintentionally). However, this check does currently not work for git submodules.

@dwijnand
Copy link
Member

dwijnand commented Dec 9, 2018

I wonder if this continues to be true 2 years down the line.

bors added a commit that referenced this issue Aug 13, 2019
Check in package/publish if a git submodule is dirty.

This extends the "dirty" check during `cargo publish` to check files within a submodule.

It is a little crude, since it unconditionally tries to open every submodule even if it is not relevant to the current package. The performance doesn't seem too bad (~2s for rust-lang/rust with 16 submodules).

It's also a little lax, by ignoring uninitialized submodules. Presumably the verification build will fail if the submodule is not initialized. It could be more aggressive, by requiring all submodules to be initialized?

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

Successfully merging a pull request may close this issue.

3 participants