Changeset 46927 in webkit


Ignore:
Timestamp:
Aug 7, 2009 4:34:46 PM (15 years ago)
Author:
Darin Adler
Message:
  • Scripts/commit-log-editor: Fix unchecked access to environment

variable that may not be there.

Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r46912 r46927  
     12009-08-07  Darin Adler  <darin@apple.com>
     2
     3        * Scripts/commit-log-editor: Fix unchecked access to environment
     4        variable that may not be there.
     5
    162009-08-07  Mark Rowe  <mrowe@apple.com>
    27
  • trunk/WebKitTools/Scripts/commit-log-editor

    r46899 r46927  
    9494    }
    9595
    96     if(!isGit() || (/^#/)) {
     96    if (!isGit() || /^#/) { #
    9797        $logContents .= $_;
    9898    } else {
     
    109109# different from perl's line endings.
    110110my $endl = "\n";
    111 if ($logContents =~ /(\r?\n)/g) {
    112     $endl = $1;
    113 }
     111$endl = $1 if $logContents =~ /(\r?\n)/;
    114112
    115113my $keepExistingLog = 1;
     
    150148            $blankLines = "";
    151149
    152             # Remove identation spaces
    153             $line =~ s/^\s{8}//;
     150            # Remove indentation spaces
     151            $line =~ s/^ {8}//;
    154152
    155153            # Save the reviewed by line
     
    172170            # Attempt to insert the "patch by" line, after the first blank line.
    173171            if ($previousLineWasBlank && $hasAuthorInfoToWrite && $lineCount > 0) {
    174                 my $authorAndCommitterAreSamePerson = $email eq $ENV{'EMAIL_ADDRESS'};
     172                my $authorAndCommitterAreSamePerson = $ENV{EMAIL_ADDRESS} && $email eq $ENV{EMAIL_ADDRESS};
    175173                if (!$authorAndCommitterAreSamePerson) {
    176174                    $contents .= "Patch by $author <$email> on $date\n";
Note: See TracChangeset for help on using the changeset viewer.