<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>57686</bug_id>
          
          <creation_ts>2011-04-01 17:27:24 -0700</creation_ts>
          <short_desc>webkit-patch post does not properly recognize renamed files with git</short_desc>
          <delta_ts>2011-04-18 19:08:30 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>48075</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Keith Kyzivat">kamaji</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>eric</cc>
    
    <cc>kamaji</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>ojan</cc>
    
    <cc>ossy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>378236</commentid>
    <comment_count>0</comment_count>
    <who name="Keith Kyzivat">kamaji</who>
    <bug_when>2011-04-01 17:27:24 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>378243</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-04-01 17:37:27 -0700</bug_when>
    <thetext>Yep.  This bug just bit me, in fact.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>378244</commentid>
    <comment_count>2</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-04-01 17:37:40 -0700</bug_when>
    <thetext>Let&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>378246</commentid>
    <comment_count>3</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-04-01 17:38:44 -0700</bug_when>
    <thetext>scm.py uses &quot;git diff -M&quot;, but I think it should use &quot;git diff HEAD -M&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>380696</commentid>
    <comment_count>4</comment_count>
    <who name="Keith Kyzivat">kamaji</who>
    <bug_when>2011-04-06 11:59:58 -0700</bug_when>
    <thetext>HEAD isn&apos;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&apos;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 &lt;SHA of HEAD&gt; --

So, I&apos;m still baffled what is causing this.
My thought was that it&apos;s just not understanding the rename lines in the patch generated...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>380744</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-04-06 12:58:37 -0700</bug_when>
    <thetext>I suspect this is the changed_files optimization breaking us.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>388224</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-04-18 19:08:30 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 48075 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>