Is it possible to use the output of wdiff (per word diff) to patch a file?
I have a file with not only word changes but also added/removed newlines. I can use wdiff
to view the word changes. But can I apply these word changes back to the original?
I tried something like:
wdiff old_file new_file > test.patch
patch old_file test.patch
Apparently, this doesn't work (as the newlines are messed up). The output is:
patch: **** Only garbage was found in the patch input.
The question is:
Is there a variant of patch
or a similar program that can use the output of wdiff
(or similar word comparison programs) to patch the changes to the original file?
(That is, a wdiff/patch process that ignores all changes in newlines).