Bug 15324
Summary: | prepare-ChangeLog does not detect removed files when git is used | ||
---|---|---|---|
Product: | WebKit | Reporter: | Holger Freyther <zecke> |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | aroben, ddkilzer |
Priority: | P2 | ||
Version: | 523.x (Safari 3) | ||
Hardware: | All | ||
OS: | All |
Holger Freyther
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |