Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

diff'ing diffs with diff?

Tags:

I need to know if the two patches are effectively the same.

I have an old patch file and new patch file created with the unix diff command. Just diff'ing the patches reports differences due to the timestamp when the patch was created.

Is there a way (with diff?) that can reliably tell me if the two patches are effectively the same?

like image 946
srking Avatar asked Jan 15 '10 03:01

srking


2 Answers

Use interdiff from patchutils.

like image 171
ephemient Avatar answered Sep 26 '22 03:09

ephemient


You could apply both patches to copies of the same source file and then use diff normally to check for differences in the results.

Patches represent changes to the input files, so two patches are the same if they have the same effect on the input files. Differences in patches are directly reflected in differences of the results of those patches.

Any differences between two patches that don't result in a difference in the result of those patches are irrelevant.

like image 5
sth Avatar answered Sep 26 '22 03:09

sth