Skip to content

Add --allow-staged to cargo fix #5737

Closed
@alexcrichton

Description

@alexcrichton

In addition to cargo fix --allow-dirty, a user should also be able to pass --allow-staged that lets them run cargo-fix even if there are no unstaged changes1.

The rationale is that content that has been git added isn't actually in danger of being permanently eaten by a poor suggestion application, because you can git checkout -- . to back out the changes.


Originally reported as rust-lang/rustfix#127

Footnotes

  1. That's git terminology; it should behave similar similarly if Mercurial, Pijul, or Fossil have an analogue of Git's staging area—I'm not familiar

Metadata

Metadata

Assignees

Labels

C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-fix

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions