-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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-fix: --allow-dirty to imply --allow-staged? #14176
Comments
I can't speak too much to this as personally I'm not thrilled with the |
I still think it's worthwhile to make this simple change, and I don't have anything to add to the arguments for it. I think it's now up to you to drive the acceptance process forward. If you don't want to accept this change, then please close the issue instead of leaving it hanging indefinitely. |
Keep in mind that we have over 500 issues that need triage and over 100 asking for team input. |
To myself I understand and agree that If I were there in the discussion, I would suggest people to create a temporary commit and run One concern is that the proposal is, again, a breaking change for a pretty odd use case: Only allowing dirty unstaged changes but not staged. I cannot tell who ever wants that though. |
This comment has been minimized.
This comment has been minimized.
While we do have problems with the huge backlog, I think whoever comes and contributes reasonably should get some rewards. To me, it is a way to prevent the project from drowning in issue backlog and still get helps from old and new friends. I may be wrong but this proposal seems small enough, so I'll give it a nudge and start an async FCP. No pressure though. @rfcbot fcp merge This proposes Arguments:
Counterarguments:
|
Team member @weihanglo has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Problem
cargo fix
/clippy --fix
don't modify git's staging area, so the requirement to specify--allow-staged
if there are any staged files is very cautious. Technically the staged files are not stored directly in the working directory, and can't be overwritten by the fix commands.OTOH "dirty" state is much more volatile, and potentially has file changes in the working directory that haven't been saved anywhere, and which could be irreversibly lost when files are modified. This makes
--allow-dirty
a much stronger option that implies the local state is unimportant and can be lost.This makes use of
--allow-dirty
without--allow-staged
a weird edge case. It says the local changes are unimportant and can be overwritten even if they're unrecoverable, except being extra cautious about existence of local changes that are safe, and won't be overwritten. It's like having a--force-overwrite
flag, but requiring--allow-not-forced-non-overwrite
flag too.Proposed Solution
Having to add both
--allow-dirty --allow-staged
flags to thefix
commands is verbose and a bit tedious to type. The extra--allow-staged
flag could be avoided if the more destructive--allow-dirty
also implied the lesser--allow-staged
. Alternatively, maybe there could be a single option like--force
/-f
that implies both.Notes
No response
The text was updated successfully, but these errors were encountered: