LKML Archive on
help / color / mirror / Atom feed
From: Joe Perches <>
To: Dan Carpenter <>
Cc: Wolfram Sang <>,,
Subject: Re: script for reviewing renames
Date: Sun, 06 Feb 2011 19:39:32 -0800	[thread overview]
Message-ID: <1297049972.17359.5.camel@Joe-Laptop> (raw)
In-Reply-To: <20110206122539.GB4384@bicker>

On Sun, 2011-02-06 at 15:25 +0300, Dan Carpenter wrote:
> Or if you have a camel case script that changes "ThisVariable" to
> "this_variable".  Then the command would be:
> git show c659c38 | ./ -ea '$_ = lc' -ea 's/_//g'
> Which changes everything to lower case and strips out all the
> underscores.  You might want to combine it with some other flags:
> git show c659c38 | ./ -nc \
> 	-e 's/TLanPrivateInfo/struct tlan_priv/' \
> 	-e 's/TLanList/struct tlan_list/' \
> 	-ea '$_ = lc' -ea 's/_//g'

Hi Dan.

I think you'll need to add '\b$1\b' to your tests
otherwise your first example will check things like
"TLanPrivateInfoType" as well.

> What I would like is if there was some way to ignore changes which just
> introduced new lines, but didn't affect runtime behavior.  I'm not sure
> how to do that.

Any object change will affect runtime behavior.

      reply	other threads:[~2011-02-07  3:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 10:08 script for reviewing renames Dan Carpenter
2011-02-03 10:22 ` Wolfram Sang
2011-02-03 10:35   ` Dan Carpenter
2011-02-03 10:50   ` Dan Carpenter
2011-02-06 12:25     ` Dan Carpenter
2011-02-07  3:39       ` Joe Perches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297049972.17359.5.camel@Joe-Laptop \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).