[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] commit-email.pl: support subject line based on log message

From: Blair Zajac <blair_at_orcaware.com>
Date: Mon, 31 Mar 2008 16:56:44 -0700

David Glasser wrote:
> On Mon, Mar 31, 2008 at 3:52 PM, Blair Zajac <blair_at_orcaware.com> wrote:
>> David Glasser wrote:
>> > 2008/3/28 Gregory Nathan Price <price_at_mit.edu>:
>> >> This adds to commit-email.pl a flag --summary,
>> >> which produces subject lines like
>> >> r123 - Stop frobbing the veeblenitzer
>> >> instead of the familiar
>> >> r123 - in src/veeble: . nitzed
>> >> , copying the first line of the log message into the subject line.
>> >>
>> >> [[[
>> >> * tools/hook-scripts/commit-email.pl.in
>> >> Support --summary for taking subject line from log message.
>> >>
>> >> Patch by: Greg Price <price_at_mit.edu>
>> >> ]]]
>> >>
>> >> I've generally preferred this form of subject line in the small
>> >> projects I've worked on, and would be very pleased to get it with
>> >> a flag rather than patching commit-email.pl every time.
>> >
>> > Looks reasonable to me. However, instead of:
>> >
>> > chop(my $summary = $log[0]);
>> >
>> > how about
>> >
>> > my $summary = @log ? $log[0] : '';
>> > chop $summary;
>>
>> Or
>>
>> <bikeshed>
>> my $summary = @log ? chomp($log[0]) : '';
>> </bikeshed>
>
> chomp is probably better than chop, but modifying $log[0] sounds bad to me.

Ahh, I forgot that chomp modifies its argument.

Happy to stay away from perl :)

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-01 01:57:18 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.