From: Damien Diederen <dash@foobox.net>
To: "Rafael Garcia-Suarez" <rgarciasuarez@gmail.com>
Cc: "Frank Lichtenheld" <frank@lichtenheld.de>,
"Martin Langhoff" <martin@catalyst.net.nz>,
git@vger.kernel.org, Damien Diederen <dash@foobox.net>
Subject: Re: [PATCH 7/7] cvsserver: Use the user part of the email in log and annotate results
Date: Tue, 25 Mar 2008 14:58:22 +0100 [thread overview]
Message-ID: <87myomykg1.fsf@keem.bcc> (raw)
In-Reply-To: b77c1dce0803250239o249a9059sbaafccf9ddea5e22@mail.gmail.com
Hi All,
"Rafael Garcia-Suarez" <rgarciasuarez@gmail.com> writes:
> On 25/03/2008, Frank Lichtenheld <frank@lichtenheld.de> wrote:
>> On Mon, Mar 24, 2008 at 11:50:55PM +0100, Damien Diederen wrote:
>> > +# Generate a CVS author name from Git author information, by taking
>> > +# the first eight characters of the user part of the email address.
>> > +sub cvs_author
>> > +{
>> > + my $author = shift;
>> > +
>> > + $author =~ s/.*<([^>]+)\@[^>]+>$/$1/;
>> > + $author =~ s/^(.{8}).*/$1/;
>>
>> IMHO substr($author, 0, 8) would be easier to read here. (It is also
>> much faster according to some quick benchmarks I just ran)
>
> While we're at nitpicking:
> Faster, shorter, and probably more robust if no @ appears in the email address:
>
> my $author_line = shift;
> (my $author) = $author_line =~ /<([^>@]{1,8})/;
Keep 'em coming :)
I agree with all suggestions so far; I will prepare a new series
addressing them (and including a minor documentation update) once the
thread has settled down a bit.
Damien
--
http://foobox.net/~dash/
next prev parent reply other threads:[~2008-03-25 13:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-24 22:48 [PATCH 0/7] Enhance TkCVS interoperability Damien Diederen
2008-03-24 22:48 ` [PATCH 1/7] cvsserver: Respond to the 'editors' command Damien Diederen
2008-03-25 9:03 ` Frank Lichtenheld
2008-03-24 22:49 ` [PATCH 2/7] cvsserver: Only print the file part of the filename in status header Damien Diederen
2008-03-24 22:49 ` [PATCH 3/7] cvsserver: Do not include status output for subdirectories if -l is passed Damien Diederen
2008-03-24 22:50 ` [PATCH 4/7] cvsserver: Add a few tests for 'status' command Damien Diederen
2008-03-24 22:50 ` [PATCH 5/7] cvsserver: Implemented update -p (print to stdout) Damien Diederen
2008-03-24 22:50 ` [PATCH 6/7] cvsserver: Added test for update -p Damien Diederen
2008-03-24 22:50 ` [PATCH 7/7] cvsserver: Use the user part of the email in log and annotate results Damien Diederen
2008-03-25 9:26 ` Frank Lichtenheld
2008-03-25 9:39 ` Rafael Garcia-Suarez
2008-03-25 13:58 ` Damien Diederen [this message]
2008-03-25 1:08 ` [PATCH 0/7] Enhance TkCVS interoperability Junio C Hamano
2008-03-27 22:17 ` [PATCH v2 " Damien Diederen
2008-03-28 7:52 ` Junio C Hamano
2008-03-27 22:17 ` [PATCH v2 1/7] cvsserver: Respond to the 'editors' and 'watchers' commands Damien Diederen
2008-03-27 22:17 ` [PATCH v2 2/7] cvsserver: Only print the file part of the filename in status header Damien Diederen
2008-03-27 22:17 ` [PATCH v2 3/7] cvsserver: Do not include status output for subdirectories if -l is passed Damien Diederen
2008-03-27 22:18 ` [PATCH v2 4/7] cvsserver: Add a few tests for 'status' command Damien Diederen
2008-03-27 22:18 ` [PATCH v2 5/7] cvsserver: Implement update -p (print to stdout) Damien Diederen
2008-03-27 22:18 ` [PATCH v2 6/7] cvsserver: Add test for update -p Damien Diederen
2008-03-27 22:18 ` [PATCH v2 7/7] cvsserver: Use the user part of the email in log and annotate results Damien Diederen
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=87myomykg1.fsf@keem.bcc \
--to=dash@foobox.net \
--cc=frank@lichtenheld.de \
--cc=git@vger.kernel.org \
--cc=martin@catalyst.net.nz \
--cc=rgarciasuarez@gmail.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).