[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151029092210.GG7289@mwanda>
Date: Thu, 29 Oct 2015 12:22:10 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: devel@...verdev.osuosl.org
Cc: linux-kernel@...r.kernel.org
Subject: new version of the rename_rev.pl script
rename_rev.pl is a script to strip away the mechanical changes that we
often see in staging patches and leave just the interesting changes for
manual review.
There are two new features in this version of rename_rev.pl. The
-r <recipe> option let's you use some pre-written recipes. There are
two recipes there now, "NULL" and "bool". These are for changes where
people do:
- if (foo == NULL) {
+ if (foo) {
Or you can use "cat patch.txt | rename_rev.pl -r bool" for the changes
like:
- if (foo == true) {
+ if (foo) {
I am really worried about people reversing conditions when they write
these sorts of patches. Hopefully, people can add some more recipes
for:
- foo = 1 << 0;
+ foo = BIT(0);
And maybe:
- frob(&(foo.bar));
+ frob(&foo.bar);
The second change in this version of rename_rev.pl is that I have
introduced the -a option for auto. It's basically for when people deal
with CamelCase variables. It tries to determine automatically what
variables were renamed and filter those changes away. This is great
when you get a patch series of 80 patches that deal with CamelCase
variables.
regards,
dan carpenter
View attachment "rename_rev.pl" of type "text/x-perl" (10381 bytes)
Powered by blists - more mailing lists