Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1258675

new version of the rename_rev.pl script

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject new version of the rename_rev.pl script
Date 2015-10-29 10:30 +0100
Message-ID <qoRGV-6NC-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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


Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

new version of the rename_rev.pl script Dan Carpenter <dan.carpenter@oracle.com> - 2015-10-29 10:30 +0100
  Re: new version of the rename_rev.pl script Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-10-29 11:40 +0100

csiph-web