patchutils icon indicating copy to clipboard operation
patchutils copied to clipboard

File permissions/flags are ignored by filterdiff

Open pbsds opened this issue 1 year ago • 3 comments

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

pbsds avatar Nov 10 '23 00:11 pbsds

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"

sergiomb2 avatar Feb 06 '24 19:02 sergiomb2

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.

pbsds avatar Feb 06 '24 22:02 pbsds

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

sergiomb2 avatar Feb 07 '24 00:02 sergiomb2