Bug 15324

Summary: prepare-ChangeLog does not detect removed files when git is used
Product: WebKit Reporter: Holger Freyther <zecke>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: aroben, ddkilzer
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   

Holger Freyther
Reported 2007-09-29 15:43:24 PDT
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, );
Attachments
Note You need to log in before you can comment on or make changes to this bug.