Skip to content

On dirty tree, cargo fix should tell the user what changes would be applied #11182

Open
@epage

Description

@epage

Problem

The intention of requiring --allow-dirty is if the user might not like the edits, making it hard for the user to separate their changes from cargo fixs changes.

Right now, the user is out of luck for knowing if its safe, unless they want to commit.

With #6040, they could separately do a dry-run but that is still having to go through extra steps.

Proposed Solution

What if cargo fix, when detecting a dirty tree, acted as if --dry-run was passed in (without showing the "aborted due to dry-run" message) but still error out in the end with a message about the tree being dirty.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-fixS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions