Changeset 45012 in webkit


Ignore:
Timestamp:
Jun 23, 2009 4:10:55 PM (15 years ago)
Author:
treat@webkit.org
Message:

2009-06-23 Joe Mason <joe.mason@torchmobile.com>

Reviewed by Adam Treat.

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

  • Scripts/prepare-ChangeLog: Added --git-index mode to list only the changes which are already staged in the index. Useful to create an entry for what you're about to commit while ignoring unstaged changes.
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r44995 r45012  
     12009-06-23  Joe Mason  <joe.mason@torchmobile.com>
     2
     3        Reviewed by Adam Treat.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=26664
     6        * Scripts/prepare-ChangeLog: Added --git-index mode to list only the
     7        changes which are already staged in the index.  Useful to create an
     8        entry for what you're about to commit while ignoring unstaged changes.
     9
    1102009-06-23  Anders Carlsson  <andersca@apple.com>
    211
  • trunk/WebKitTools/Scripts/prepare-ChangeLog

    r44716 r45012  
    55#  Copyright (C) 2000, 2001 Eazel, Inc.
    66#  Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Apple Inc.  All rights reserved.
     7#  Copyright (C) 2009 Torchmobile, Inc.
    78#
    89#  prepare-ChangeLog is free software; you can redistribute it and/or
     
    2930# Objective-C, C++ and Objective-C++ support added by Maciej Stachowiak <mjs@apple.com>
    3031# Git support added by Adam Roben <aroben@apple.com>
     32# --git-index flag added by Joe Mason <joe.mason@torchmobile.com>
    3133
    3234
     
    9496
    9597my $gitCommit = 0;
     98my $gitIndex = "";
    9699my $gitReviewer = "";
    97100my $openChangeLogs = 0;
     
    102105    GetOptions("diff|d!" => \$spewDiff,
    103106               "git-commit:s" => \$gitCommit,
     107               "git-index" => \$gitIndex,
    104108               "git-reviewer:s" => \$gitReviewer,
    105109               "help|h!" => \$showHelp,
     
    110114    print STDERR "  -d|--diff      Spew diff to stdout when running\n";
    111115    print STDERR "  --git-commit   Populate the ChangeLogs from the specified git commit\n";
     116    print STDERR "  --git-index    Populate the ChangeLogs from the git index only\n";
    112117    print STDERR "  --git-reviewer When populating the ChangeLogs from a git commit claim that the spcified name reviewed the change.\n";
    113118    print STDERR "                 This option is useful when the git commit lacks a Signed-Off-By: line\n";
     
    117122    exit 1;
    118123}
     124
     125die "--git-commit and --git-index are incompatible." if ($gitIndex && $gitCommit);
    119126
    120127my %paths = processPaths(@ARGV);
     
    11421149    return $gitCommit if $gitCommit =~ m/.+\.\..+/;
    11431150    return "\"$gitCommit^\" \"$gitCommit\"" if $gitCommit;
     1151    return "--cached" if $gitIndex;
    11441152    return "HEAD" if $isGit;
    11451153}
     
    12261234    print STDERR "  Running status to find changed, added, or removed files.\n";
    12271235    open STAT, "-|", statusCommand(keys %paths) or die "The status failed: $!.\n";
    1228     my $inGitCommitSection = 0;
    12291236    while (<STAT>) {
    12301237        my $status;
     
    13371344    );
    13381345
    1339     return 0 if $gitCommit; # an existing commit cannot have conflicts
     1346    return 0 if ($gitCommit || $gitIndex); # an existing commit or staged change cannot have conflicts
    13401347    return $svn{$status} if $isSVN;
    13411348    return $git{$status} if $isGit;
Note: See TracChangeset for help on using the changeset viewer.