Hello, the other day I was reviewing a patch that replaced a large chunk in a Makefile with completely different logic. No matter what diff algorithm and options I threw at it, the diff would always synchronise at the empty lines between individual targets and thus show the rewrite of a larger section as complete replacements of many smaller, but directly adjacent sections (only separated by a blank line). --break-rewrites would be nicely suited for this case, but once I dialed down the parameters enough for the option to apply at all, it showed the entire file as being replaced rather than just the section in between that actually changed. Is there a way to have --break-rewrites leave out the unchanged lines at beginning and end of the file? A combination of --break-rewrites and --inter-hunk-context that merges changes with less than the given number of unchanged lines between them into a single delete/insert change would be even better. But just ignoring the unchanged header and footer of a file for --break-rewrites would already go a long way. Sascha
Attachment:
pgpMfGp6QPocs.pgp
Description: PGP signature