Skip to content

File permissions/flags are ignored by filterdiff #59

Closed

Description

@pbsds

It seems filterdiff ignores changes in file permissions, such as removal of the executable flag.

Repro:

curl 'https://github.com/NationalSecurityAgency/ghidra/commit/e2a945624b74e5d42dc85e9c1f992315dd154db1.patch' | filterdiff

Expected result

A diff

Actual result

Nothing

Activity

  1. sergiomb2 commented on Feb 6, 2024

    @sergiomb2
    Contributor

    is a feature not a bug "This way filterdiff can be used to clean up an existing diff file, removing redundant lines
    from the beginning (eg. the text from the mail body) or between the chunks (eg. in CVS diffs). To extract pure patch data"

  2. pbsds commented on Feb 6, 2024

    @pbsds
    Author

    Not considering file permission changes (nor renames? #22) a part of the "patch data" strikes me as kind of arbitrary, and is unfortunate since it breaks the assumption that a filtered diff would apply the same changes as the original diff.

  3. sergiomb2 commented on Feb 7, 2024

    @sergiomb2
    Contributor

    correct filterdiff clean renames and file permissions modifications from the patch , is a almost an duplicate issue of #22

  4. twaugh commented on Aug 27, 2025

    @twaugh
    Owner

    Please try the PR I just linked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions