[Webkit-unassigned] [Bug 48527] commit-log-editor uses full paths for section headers when using msysgit's Perl and multiple ChangeLogs have been edited

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 19 15:03:55 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=48527





--- Comment #15 from Adam Roben (aroben) <aroben at apple.com>  2011-01-19 15:03:55 PST ---
(From update of attachment 79423)
View in context: https://bugs.webkit.org/attachment.cgi?id=79423&action=review

>> Tools/Scripts/commit-log-editor:299
>> +        $ENV{$key} =~ s/^(\w):\//\/$1\//g;
> 
> Consider using a character other than "/" for the s/// operator here (like s###) so that you don't have to escape the '/' characters in the path:
> 
>     $ENV{$key} =~ s#^(\w):/#/$1/#g;
> 
> I don't think you want "\w" here since that will match any *word*.  If it's only one character and only a-z (or A-Z), I would use:
> 
>     $ENV{$key} =~ s#^([[:alpha:]]):/#/$1/#g;
> 
> Or this:
> 
>     $ENV{$key} =~ s#^([a-zA-Z]):/#/$1/#g;

\w only matches a single character. It matches a "word" character (alphanumeric or underscore). But you made me realize we shouldn't match numbers or underscore, so I'll go with [[:alpha:]].

I'll also use #.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list