Kaydet (Commit) f439d765 authored tarafından Korrawit Pruegsanusak's avatar Korrawit Pruegsanusak

lo-commit-stat: lowercase first char if the word contains only lowercase chars

For Example:
* ScConditionalFormat -> no change
* SVG -> no change
* WaE -> no change
* Some -> some

After this change, we now have to sort case-insensitively,
or the lines starting with uppercase will clog up together.

Change-Id: If08cbaa19e6f3496dd1f07920464d16140e2aa3a
üst 6858c3eb
...@@ -63,10 +63,12 @@ sub standardize_summary($) ...@@ -63,10 +63,12 @@ sub standardize_summary($)
$line =~ s/^\s*//; $line =~ s/^\s*//;
$line =~ s/\s*$//; $line =~ s/\s*$//;
# lower first letter # lower first letter if the word contains only lowercase letter
$line =~ m/(^.)/; if ( $line =~ m/(^.[a-z]+\b)/ ) {
my $first_char = lc($1); $line =~ m/(^.)/;
$line =~ s/^./$first_char/; my $first_char = lc($1);
$line =~ s/^./$first_char/;
}
# FIXME: remove do at the end of line # FIXME: remove do at the end of line
# remove bug numbers # remove bug numbers
...@@ -259,7 +261,7 @@ sub print_stat($$) ...@@ -259,7 +261,7 @@ sub print_stat($$)
my $old_summary=""; my $old_summary="";
my %authors = (); my %authors = ();
my %bugs = (); my %bugs = ();
foreach my $id ( sort { $pdata->{$piece}{$a}{'summary'} cmp $pdata->{$piece}{$b}{'summary'} } keys %{$pdata->{$piece}}) { foreach my $id ( sort { lc $pdata->{$piece}{$a}{'summary'} cmp lc $pdata->{$piece}{$b}{'summary'} } keys %{$pdata->{$piece}}) {
my $summary = $pdata->{$piece}{$id}{'summary'}; my $summary = $pdata->{$piece}{$id}{'summary'};
if ($summary ne $old_summary) { if ($summary ne $old_summary) {
print_summary_in_stat($old_summary, \$piece_title, \%bugs, \%authors, " + ", $log); print_summary_in_stat($old_summary, \$piece_title, \%bugs, \%authors, " + ", $log);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment