On 08/29/10 23:32, Piotr Stefaniak wrote:
> I needed an option to ignore changes in comments, so I made a patch
> and it seems to work. If it's ok, please apply it to the main source.
> The patch was made against diff 3.0.9-53de.

I have my doubts about this one.  For one thing, it doesn't
parse ANSI C comments correctly, for example:

        /* This is a valid C comment.  What sort of $...@!??/
           idiot committee designed this syntax?  */

is a valid ANSI C comment.  More generally, some C compilers
ignore white space at ends of lines and others don't, and this
affects backslash-newline processing and therefore affects the
boundaries of comments.  My kneejerk reaction is that this is
a specialized swamp that diffutils should steer clear of.

It might be useful to have a more-general filtering option,
which allows users to specify arbitrary filters (as processes)
on the input files, before "diff" does its work.  Then, you could
write your own process to remove comments.

Reply via email to