Bug 57686

Summary: webkit-patch post does not properly recognize renamed files with git
Product: WebKit Reporter: Keith Kyzivat <kamaji>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: abarth, eric, kamaji, laszlo.gombos, ojan, ossy
Priority: P4    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Keith Kyzivat
Reported 2011-04-01 17:27:24 PDT
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.
Attachments
Adam Barth
Comment 1 2011-04-01 17:37:27 PDT
Yep. This bug just bit me, in fact.
Csaba Osztrogonác
Comment 2 2011-04-01 17:37:40 PDT
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
Csaba Osztrogonác
Comment 3 2011-04-01 17:38:44 PDT
scm.py uses "git diff -M", but I think it should use "git diff HEAD -M"
Keith Kyzivat
Comment 4 2011-04-06 11:59:58 PDT
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...
Eric Seidel (no email)
Comment 5 2011-04-06 12:58:37 PDT
I suspect this is the changed_files optimization breaking us.
Eric Seidel (no email)
Comment 6 2011-04-18 19:08:30 PDT
*** This bug has been marked as a duplicate of bug 48075 ***
Note You need to log in before you can comment on or make changes to this bug.