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

Handle git deleted files with dirty worktree. #9645

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jul 2, 2021

When listing git files for things like cargo package, it was including unstaged deleted files. This is because the file is still in the index, so it was included in the list. cargo package --allow-dirty would then fail with a confusing "file not found" error.

This fixes it by keeping a set of deleted files, and skipping those. This allows cargo package --allow-dirty to work.

Closes #9580

@rust-highfive
Copy link

r? @Eh2406

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 2, 2021
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jul 2, 2021

📌 Commit 97a1350 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 2, 2021
@bors
Copy link
Contributor

bors commented Jul 2, 2021

⌛ Testing commit 97a1350 with merge b747054...

@bors
Copy link
Contributor

bors commented Jul 2, 2021

☀️ Test successful - checks-actions
Approved by: alexcrichton
Pushing b747054 to master...

@bors bors merged commit b747054 into rust-lang:master Jul 2, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 3, 2021
Update cargo

5 commits in 4952979031e2cf1d901c817a32e25a156a19db4c..3ebb5f15a940810f250b68821149387af583a79e
2021-07-01 01:14:50 +0000 to 2021-07-02 20:35:38 +0000
- Adjust the edition2021 resolver diff report. (rust-lang/cargo#9649)
- Include the linker in the fingerprint. (rust-lang/cargo#9647)
- Temporarily disable windows env test. (rust-lang/cargo#9646)
- Handle git deleted files with dirty worktree. (rust-lang/cargo#9645)
- Adjust error message with offline and frozen. (rust-lang/cargo#9644)
@ehuss ehuss added this to the 1.55.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo package --allow-dirty fails for not recognizing deleted un-staged files in git repo
5 participants