[webkit-reviews] review granted: [Bug 48527] commit-log-editor uses full paths for section headers when using msysgit's Perl and multiple ChangeLogs have been edited : [Attachment 79423] Convert paths in environment variables back to msys-style inside commit-log-editor

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 19 14:54:40 PST 2011


David Kilzer (ddkilzer) <ddkilzer at webkit.org> has granted Adam Roben (aroben)
<aroben at apple.com>'s request for review:
Bug 48527: commit-log-editor uses full paths for section headers when using
msysgit's Perl and multiple ChangeLogs have been edited
https://bugs.webkit.org/show_bug.cgi?id=48527

Attachment 79423: Convert paths in environment variables back to msys-style
inside commit-log-editor
https://bugs.webkit.org/attachment.cgi?id=79423&action=review

------- Additional Comments from David Kilzer (ddkilzer) <ddkilzer at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=79423&action=review

r=me, but please fix the regex to only match one alphabetic character.

> 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;


More information about the webkit-reviews mailing list