Patch files created and uploaded with webkit-patch from a git repository where files have been renamed does not work properly. The renamed files are not included in the patch. It appears that this is because the renamed files are added to the staging area, and webkit-patch post only operates on local changes and commits. For an example of the difference of what webkit-patch does, and a manual git diff created patch, see: https://bugs.webkit.org/show_bug.cgi?id=57666 The obsoleted patch is one created by webkit-patch post 57666 The committed patch is the one created with git diff by hand.
Yep. This bug just bit me, in fact.
Let's see a simple example which modifies a file and rename an other file. $ git diff diff --git a/mod.txt b/mod.txt index e965047..557db03 100644 --- a/mod.txt +++ b/mod.txt @@ -1 +1 @@ -Hello +Hello World $ git diff --staged diff --git a/dst.txt b/dst.txt new file mode 100644 index 0000000..e69de29 diff --git a/src.txt b/src.txt deleted file mode 100644 index e69de29..0000000 $ git diff HEAD diff --git a/dst.txt b/dst.txt new file mode 100644 index 0000000..e69de29 diff --git a/mod.txt b/mod.txt index e965047..557db03 100644 --- a/mod.txt +++ b/mod.txt @@ -1 +1 @@ -Hello +Hello World diff --git a/src.txt b/src.txt deleted file mode 100644 index e69de29..0000000 $ git diff HEAD -M diff --git a/src.txt b/dst.txt similarity index 100% rename from src.txt rename to dst.txt diff --git a/mod.txt b/mod.txt index e965047..557db03 100644 --- a/mod.txt +++ b/mod.txt @@ -1 +1 @@ -Hello +Hello World
scm.py uses "git diff -M", but I think it should use "git diff HEAD -M"
HEAD isn't what is desired. What is desired is all local commits not present in the remote (remotes/origin/HEAD ?) + the local staged changes, as well as unstaged changes. If I'm understanding it correctly, it already figures out the SHA of the remote head and does: git diff --binary --no-ext-diff --full-index -M <SHA of HEAD> -- So, I'm still baffled what is causing this. My thought was that it's just not understanding the rename lines in the patch generated...
I suspect this is the changed_files optimization breaking us.
*** This bug has been marked as a duplicate of bug 48075 ***