[Webkit-unassigned] [Bug 15324] New: prepare-ChangeLog does not detect removed files when git is used

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 29 15:43:24 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=15324

           Summary: prepare-ChangeLog does not detect removed files when git
                    is used
           Product: WebKit
           Version: 522+ (nightly)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: freyther at handhelds.org


The current prepare-ChangeLog script is not able to detect removed files. These
files where removed using git-rm and there are at least two reasons for that:

 1.) Using git-rm file, the index gets updated and git-diff will not show the
removal of the file
 2.) If git-diff --cached is used the removal of files will be indicated but
for removal "^D " is used which is not known by prepare-ChangeLog.

The following hack works to detect removals but it will fail with the
--git-commit mode of prepare-ChangeLog. Also Adam mentioned that adding "^D" to
the isAddedStatus() is kind of odd.

diff --git a/WebKitTools/Scripts/prepare-ChangeLog
b/WebKitTools/Scripts/prepare-ChangeLog
index 69edd9a..1f2458d 100755
--- a/WebKitTools/Scripts/prepare-ChangeLog
+++ b/WebKitTools/Scripts/prepare-ChangeLog
@@ -982,7 +982,8 @@ sub statusCommand(@)
     if ($isSVN) {
         $command = "$SVN stat $filesString";
     } elsif ($isGit) {
-        $command = "$GIT diff -r --name-status -C -C -M " .
diffFromToString();
+        print("Foo");
+        $command = "$GIT diff --cached -r --name-status -C -C -M " .
diffFromToString();
         $command .= " -- $filesString" unless $gitCommit;
     }


@@ -1119,6 +1121,7 @@ sub isAddedStatus($)
     my %statusCodes = (
         "A" => 1,
         "C" => $isGit,
+        "D" => $isGit,
         "R" => 1,
     );


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list