]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: mention git rename detection
authorEric Blake <eblake@redhat.com>
Fri, 11 Jan 2013 00:39:04 +0000 (17:39 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 11 Jan 2013 17:30:49 +0000 (10:30 -0700)
I've noticed a number of people sending patches with file
renames not compressed, so we might as well document how to
set this up.  (Git won't do it by default, for back-compat
reasons)

* docs/hacking.html.in: Add git config tip.
* HACKING: Regenerate.

HACKING
docs/hacking.html.in

diff --git a/HACKING b/HACKING
index af27fbea65f81249d032f0f0d293010307315433..bf02b650762d39ee575849fee8540703c918eb95 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -14,7 +14,12 @@ General tips for contributing patches
 (1) Discuss any large changes on the mailing list first. Post patches early and
 listen to feedback.
 
-(2) Post patches in unified diff format. A command similar to this should work:
+(2) Post patches in unified diff format, with git rename detection enabled. You
+need a one-time setup of:
+
+  git config diff.renames true
+
+After that, a command similar to this should work:
 
   diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
 
@@ -22,7 +27,9 @@ or:
 
   git diff > libvirt-myfeature.patch
 
-However, the usual workflow of libvirt developer is:
+Also, for code motion patches, you may find that "git diff --patience"
+provides an easier-to-read patch. However, the usual workflow of libvirt
+developer is:
 
   git checkout master
   git pull
index 97624e53bbc66c06ddf4113d4d1eef8bfa9674c2..6485676b237db77d666e36b553cf7a849532e5d9 100644 (file)
@@ -9,8 +9,12 @@
       <li>Discuss any large changes on the mailing list first.  Post patches
         early and listen to feedback.</li>
 
-      <li><p>Post patches in unified diff format.  A command similar to this
-        should work:</p>
+      <li><p>Post patches in unified diff format, with git rename
+        detection enabled.  You need a one-time setup of:</p>
+<pre>
+  git config diff.renames true
+</pre>
+        <p>After that, a command similar to this should work:</p>
 <pre>
   diff -urp libvirt.orig/ libvirt.modified/ &gt; libvirt-myfeature.patch
 </pre>
@@ -20,7 +24,9 @@
 <pre>
   git diff &gt; libvirt-myfeature.patch
 </pre>
-        <p>However, the usual workflow of libvirt developer is:</p>
+        <p>Also, for code motion patches, you may find that <code>git
+        diff --patience</code> provides an easier-to-read patch.
+        However, the usual workflow of libvirt developer is:</p>
 <pre>
   git checkout master
   git pull