bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Anything more powerful than diff's -I...?


From: Paul Smith
Subject: Anything more powerful than diff's -I...?
Date: Fri, 14 Sep 2007 14:22:52 -0400

The -I option for GNU diff is very cool, but it has one major
disadvantage: you can't use it to omit diffs where the difference is the
change itself, because the RE has to match BOTH the old and new lines.

For example, I've been going through some code getting it const-clean.
This consists of two parts: adding the "const" qualifier to lots of
lines, plus rearranging some bits of code sometimes where just marking
things "const" is not enough.

What I'd like to do is get a diff of all the changes EXCEPT the ones
where all I did was add "const" qualifiers: those are straightforward
and the compiler is enough for me to validate correctness there.  But, I
want someone to look at the other changes and verify that things seem OK
with them.

I had hoped to use -I but that won't work.

I guess I could do something like remove all the const's from the file
then compare that, and if it was the same I would skip it and if it was
different I could run diff on the original files.  That would at least
omit files where the only changes to the whole file were adding const.

Anyone have any better ideas, than just going through and extracting the
important stuff by hand?  Is there a more fancy comparison tool?  Doing
it by hand will be very painful since the diff file is pretty big!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]