summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2011-08-12 07:48:06 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2011-08-12 07:48:06 +0000
commit3c757ef2ef8294ea34378804d7c4d71053588b8c (patch)
treec9e77c78289804462fd3f80d3ae5eb28722fa5ec /docs
parent7a362f4111b3620601acacc9691539a3d1f67b6f (diff)
downloadllvm-3c757ef2ef8294ea34378804d7c4d71053588b8c.tar.gz
llvm-3c757ef2ef8294ea34378804d7c4d71053588b8c.tar.bz2
llvm-3c757ef2ef8294ea34378804d7c4d71053588b8c.tar.xz
docs/GettingStarted.html: [Git] Add instructions how to generate patchset with Git.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/GettingStarted.html67
1 files changed, 67 insertions, 0 deletions
diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html
index 39104dff14..0695d7d933 100644
--- a/docs/GettingStarted.html
+++ b/docs/GettingStarted.html
@@ -827,6 +827,73 @@ on the master branch, run the following command:
git config branch.master.rebase true
</pre>
+<h4>Sending patches with Git</h4>
+<div>
+<p>
+Please read <a href="DeveloperPolicy.html#patches">Developer Policy</a>, too.
+</p>
+
+<p>
+Assume <tt>master</tt> points the upstream and <tt>mybranch</tt> points your
+working branch, and <tt>mybranch</tt> is rebased onto <tt>master</tt>.
+At first you may check sanity of whitespaces:
+</p>
+
+<pre class="doc_code">
+git diff --check master..mybranch
+</pre>
+
+<p>
+The easiest way to generate a patch is as below:
+</p>
+
+<pre class="doc_code">
+git diff master..mybranch &gt; /path/to/mybranch.diff
+</pre>
+
+<p>
+It is a little different from svn-generated diff. git-diff-generated diff has
+prefixes like <tt>a/</tt> and <tt>b/</tt>. Don't worry, most developers might
+know it could be accepted with <tt>patch -p1 -N</tt>.
+</p>
+
+<p>
+But you may generate patchset with git-format-patch. It generates
+by-each-commit patchset. To generate patch files to attach to your article:
+</p>
+
+<pre class="doc_code">
+git format-patch --no-attach master..mybranch -o /path/to/your/patchset
+</pre>
+
+<p>
+If you would like to send patches directly, you may use git-send-email or
+git-imap-send. Here is an example to generate the patchset in Gmail's [Drafts].
+</p>
+
+<pre class="doc_code">
+git format-patch --attach master..mybranch --stdout | git imap-send
+</pre>
+
+<p>
+Then, your .git/config should have [imap] sections.
+</p>
+
+<pre class="doc_code">
+[imap]
+ host = imaps://imap.gmail.com
+ user = <em>your.gmail.account</em>@gmail.com
+ pass = <em>himitsu!</em>
+ port = 993
+ sslverify = false
+; in English
+ folder = "[Gmail]/Drafts"
+; example for Japanese, "Modified UTF-7" encoded.
+ folder = "[Gmail]/&amp;Tgtm+DBN-"
+</pre>
+
+</div>
+
<h4>For developers to work with git-svn</h4>
<div>