twaugh / patchutils

Manipulate patch files
GNU General Public License v2.0
139 stars 22 forks source link

File permissions/flags are ignored by filterdiff #59

Open pbsds opened 1 year ago

pbsds commented 1 year ago

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

sergiomb2 commented 9 months ago

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"

pbsds commented 9 months ago

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.

sergiomb2 commented 9 months ago

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