[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 14:54:41 PST 2011


David Kilzer (ddkilzer) <ddkilzer at webkit.org> changed:

           What    |Removed                     |Added
  Attachment #79423|review?                     |review+, commit-queue-
               Flag|                            |

--- Comment #14 from David Kilzer (ddkilzer) <ddkilzer at webkit.org>  2011-01-19 14:54:41 PST ---
(From update of attachment 79423)
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;

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