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