git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 7/7] cvsserver: Use the user part of the email in log and annotate results

From
Damien Diederen <dash@foobox.net>
Date
Mar 25, 2008, 13:58 UTC
Message-ID
<87myomykg1.fsf@keem.bcc>
In-Reply-To
<b77c1dce0803250239o249a9059sbaafccf9ddea5e22@mail.gmail.com>
Hi All,
"Rafael Garcia-Suarez" <rgarciasuarez@gmail.com> writes:
Show 19 quoted lines
> 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/
Previous: Rafael Garcia-SuarezNext: Junio C Hamano
Message 12 of 22 in “Enhance TkCVS interoperability”
  1. 0/7 Enhance TkCVS interoperabilityDamien Diederen, Mar 24, 2008
  2. 1/7 cvsserver: Respond to the 'editors' commandDamien Diederen, Mar 24, 2008
  3. Frank LichtenheldMar 25, 2008
  4. 2/7 cvsserver: Only print the file part of the filename in status headerDamien Diederen, Mar 24, 2008
  5. 3/7 cvsserver: Do not include status output for subdirectories if -l is passedDamien Diederen, Mar 24, 2008
  6. 4/7 cvsserver: Add a few tests for 'status' commandDamien Diederen, Mar 24, 2008
  7. 5/7 cvsserver: Implemented update -p (print to stdout)Damien Diederen, Mar 24, 2008
  8. 6/7 cvsserver: Added test for update -pDamien Diederen, Mar 24, 2008
  9. 7/7 cvsserver: Use the user part of the email in log and annotate resultsDamien Diederen, Mar 24, 2008
  10. Frank LichtenheldMar 25, 2008
  11. Rafael Garcia-SuarezMar 25, 2008
  12. Damien DiederenMar 25, 2008
  13. Junio C HamanoMar 25, 2008
  14. 0/7 Enhance TkCVS interoperabilityDamien Diederen, Mar 27, 2008
  15. Junio C HamanoMar 28, 2008
  16. 1/7 cvsserver: Respond to the 'editors' and 'watchers' commandsDamien Diederen, Mar 27, 2008
  17. 2/7 cvsserver: Only print the file part of the filename in status headerDamien Diederen, Mar 27, 2008
  18. 3/7 cvsserver: Do not include status output for subdirectories if -l is passedDamien Diederen, Mar 27, 2008
  19. 4/7 cvsserver: Add a few tests for 'status' commandDamien Diederen, Mar 27, 2008
  20. 5/7 cvsserver: Implement update -p (print to stdout)Damien Diederen, Mar 27, 2008
  21. 6/7 cvsserver: Add test for update -pDamien Diederen, Mar 27, 2008
  22. 7/7 cvsserver: Use the user part of the email in log and annotate resultsDamien Diederen, Mar 27, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.