|
Thanks for your tip. I tried this (though I suspect not exhaustively), but it seems a bit tricky to adjust the patch. I mean, if I just do a "grep -v retain" on the output that diff generates then it's not going to match the to-be-replaced hunks anymore. I realized that I could do a "diff -c" and then filter for lines beginning with ! and containing my string "retain" using awk to keep them but just remove the leading !. But then there's gonna be a corresponding line in the new hunk which is marked with a !, and again, it's not going to match unless I manually count and remove the corresponding ! in the new hunk. This could also yield hunks which don't have any changes (I suppose that might not be a problem), but this is really a serious pain to implement.
Is there a way to generate a patch file that can be filtered easily?
|