git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
To: Junio C Hamano <junkio@cox.net>
Cc: "Randal L. Schwartz" <merlyn@stonehenge.com>, git@vger.kernel.org
Subject: Re: Diffs from CVS keyword expansion
Date: Tue, 5 Dec 2006 21:30:52 +0100	[thread overview]
Message-ID: <200612052130.52247.robin.rosenberg.lists@dewire.com> (raw)
In-Reply-To: <7v64cqglsm.fsf@assigned-by-dhcp.cox.net>

tisdag 05 december 2006 20:55 skrev Junio C Hamano:
> merlyn@stonehenge.com (Randal L. Schwartz) writes:
> >>>>>> "Uwe" == Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de>
> >>>>>> writes:
> >
> > Uwe> 	#! /bin/sh
> > Uwe> 	exec perl -i -p -e 's/\$(Id|Revision):.*?\$/\$$1: \$/' "$@";
> >
> > Ow.  My eyes hurt from that.  How about we rewrite that as a native Perl
> > script:
> >
> >     #!/usr/bin/perl
> >     $^I = ""; # this is -i
> >     while (<>) {
> >       s/\$(Id|Revision):.*?\$/\$$1: \$/;
> >       print;
> >     }
>
> That's kinda surprising coming from the resident Perl guru.
>
> I am so used to the command line "-i -p" that I did not even
> know what $^I does, and I would have lost without your "# this
> is -i" comment.  That alone makes the Uwe's one more readable
> for me ;-).
May I suggest a compromise? : 

#!/usr/bin/perl -i -p
s/\$(Id|Revision):.*?\$/\$$1: \$/;


      reply	other threads:[~2006-12-05 20:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-01  3:56 Diffs from CVS keyword expansion Jon Smirl
2006-12-01  7:06 ` Juergen Ruehle
2006-12-01  7:44   ` Linus Torvalds
2006-12-01 15:33     ` Jon Smirl
2006-12-05 12:14 ` Uwe Kleine-Koenig
2006-12-05 19:45   ` Randal L. Schwartz
2006-12-05 19:48     ` Johannes Schindelin
2006-12-06 10:05       ` Uwe Kleine-Koenig
2006-12-06 10:08         ` Randal L. Schwartz
2006-12-05 19:55     ` Junio C Hamano
2006-12-05 20:30       ` Robin Rosenberg [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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=200612052130.52247.robin.rosenberg.lists@dewire.com \
    --to=robin.rosenberg.lists@dewire.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=merlyn@stonehenge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).