Skip to content

Add --irreversible-delete to git diff in patch-commit #5003

@webstrand

Description

@webstrand

Describe the user story

When deleting files from a package under pnpm patch it is not desirable to retain the full contents of the deleted file in the resulting patch file created by pnpm patch-commit it wastes repository space and can be confusing when fixing up a patch that failed to apply.

Describe the solution you'd like

Add --irreversible-delete to /packages/plugin-commands-patching/src/patchCommit.ts:64 so that the patches do no retain the full contents of the deleted file.

Describe the drawbacks of your solution

As far as I know, there are no drawbacks. The contents of any deleted file are retained by the package repository.

Describe alternatives you've considered

Manually editing the resulting patch files is finicky and it's easy to break the patches.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions