提交 a2acdb3d 编写于 作者: E Eric Blake

docs: mention git rename detection

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.
上级 ed4bbe6b
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册