Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1258675 > unrolled thread
| Started by | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| First post | 2015-10-29 10:30 +0100 |
| Last post | 2015-10-29 11:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
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
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2015-10-29 10:30 +0100 |
| Subject | new version of the rename_rev.pl script |
| Message-ID | <qoRGV-6NC-1@gated-at.bofh.it> |
[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
[toc] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-10-29 11:40 +0100 |
| Message-ID | <qoSMF-7ry-3@gated-at.bofh.it> |
| In reply to | #1258675 |
On Thu, Oct 29, 2015 at 12:22:10PM +0300, Dan Carpenter wrote: > 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. Thanks Dan. This CamelCase feature will be a life saver. I hope you remember few days back we had a looooong series of renames, though that was not CamelCase. But i just checked and your script works in normal variable rename also (state => cur_state). Thanks again for sharing. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web