Changeset 53796 in webkit


Ignore:
Timestamp:
Jan 25, 2010 3:18:01 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-25 Chris Jerdonek <Chris Jerdonek>

Reviewed by Adam Barth.

Improved prepare-ChangeLog so that it preserves the relative
indentation of a git commit message.

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

  • Scripts/prepare-ChangeLog:
    • Also adjusted the script so that it does not add white space characters to empty lines.
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r53783 r53796  
     12010-01-25  Chris Jerdonek  <cjerdonek@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Improved prepare-ChangeLog so that it preserves the relative
     6        indentation of a git commit message.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=34058
     9
     10        * Scripts/prepare-ChangeLog:
     11          - Also adjusted the script so that it does not add white
     12            space characters to empty lines.
     13
    1142010-01-24  Eric Seidel  <eric@webkit.org>
    215
  • trunk/WebKitTools/Scripts/prepare-ChangeLog

    r50619 r53796  
    16071607        $commitLogCount++;
    16081608        my $inHeader = 1;
     1609        my $commitLogIndent;
    16091610        my @lines = split(/\n/, $commitLog);
    16101611        shift @lines; # Remove initial blank line
     
    16211622                    $reviewer .= ", " . $1;
    16221623                }
    1623             } elsif (length $line == 0) {
     1624            } elsif ($line =~ /^\s*$/) {
    16241625                $description = $description . "\n";
    16251626            } else {
    1626                 $line =~ s/^\s*//;
    1627                 $description = $description . "        " . $line . "\n";
     1627                if (!defined($commitLogIndent)) {
     1628                    # Let the first line with non-white space determine
     1629                    # the global indent.
     1630                    $line =~ /^(\s*)\S/;
     1631                    $commitLogIndent = length($1);
     1632                }
     1633                # Strip at most the indent to preserve relative indents.
     1634                $line =~ s/^\s{0,$commitLogIndent}//;
     1635                $description = $description . (" " x 8) . $line . "\n";
    16281636            }
    16291637        }
Note: See TracChangeset for help on using the changeset viewer.