summaryrefslogtreecommitdiffstats
path: root/git-format-patch.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-05-23 15:54:39 -0700
committerJunio C Hamano <gitster@pobox.com>2016-05-23 15:54:39 -0700
commitf2a3a7584e6a6581b22e331a7ef98e7f2ea3c091 (patch)
tree84f95c2df42f20f7d703d6ed322013d0e2791103 /git-format-patch.html
parent198b1f1fbb7b9bb186d3e7bc86f62813bccc396a (diff)
downloadgit-htmldocs-f2a3a7584e6a6581b22e331a7ef98e7f2ea3c091.tar.gz
Autogenerated HTML docs for v2.9.0-rc0
Diffstat (limited to 'git-format-patch.html')
-rw-r--r--git-format-patch.html63
1 files changed, 62 insertions, 1 deletions
diff --git a/git-format-patch.html b/git-format-patch.html
index 3b57ef313..943c487d2 100644
--- a/git-format-patch.html
+++ b/git-format-patch.html
@@ -1710,6 +1710,16 @@ you can use <code>--suffix=-patch</code> to get <code>0001-description-of-my-cha
</p>
</dd>
<dt class="hdlist1">
+--base=&lt;commit&gt;
+</dt>
+<dd>
+<p>
+ Record the base tree information to identify the state the
+ patch series applies to. See the BASE TREE INFORMATION section
+ below for details.
+</p>
+</dd>
+<dt class="hdlist1">
--root
</dt>
<dd>
@@ -2039,6 +2049,57 @@ Back in the compose window: add whatever other text you wish to the
</div>
</div>
<div class="sect1">
+<h2 id="_base_tree_information">BASE TREE INFORMATION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The base tree information block is used for maintainers or third party
+testers to know the exact state the patch series applies to. It consists
+of the <em>base commit</em>, which is a well-known commit that is part of the
+stable part of the project history everybody else works off of, and zero
+or more <em>prerequisite patches</em>, which are well-known patches in flight
+that is not yet part of the <em>base commit</em> that need to be applied on top
+of <em>base commit</em> in topological order before the patches can be applied.</p></div>
+<div class="paragraph"><p>The <em>base commit</em> is shown as "base-commit: " followed by the 40-hex of
+the commit object name. A <em>prerequisite patch</em> is shown as
+"prerequisite-patch-id: " followed by the 40-hex <em>patch id</em>, which can
+be obtained by passing the patch through the <code>git patch-id --stable</code>
+command.</p></div>
+<div class="paragraph"><p>Imagine that on top of the public commit P, you applied well-known
+patches X, Y and Z from somebody else, and then built your three-patch
+series A, B, C, the history would be like:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><code>---P---X---Y---Z---A---B---C</code></pre>
+</div></div>
+<div class="paragraph"><p>With <code>git format-patch --base=P -3 C</code> (or variants thereof, e.g. with
+<code>--cover-letter</code> of using <code>Z..C</code> instead of <code>-3 C</code> to specify the
+range), the base tree information block is shown at the end of the
+first message the command outputs (either the first patch, or the
+cover letter), like this:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>base-commit: P
+prerequisite-patch-id: X
+prerequisite-patch-id: Y
+prerequisite-patch-id: Z</code></pre>
+</div></div>
+<div class="paragraph"><p>For non-linear topology, such as</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><code>---P---X---A---M---C
+ \ /
+ Y---Z---B</code></pre>
+</div></div>
+<div class="paragraph"><p>You can also use <code>git format-patch --base=P -3 C</code> to generate patches
+for A, B and C, and the identifiers for P, X, Y, Z are appended at the
+end of the first message.</p></div>
+<div class="paragraph"><p>If set <code>--base=auto</code> in cmdline, it will track base commit automatically,
+the base commit will be the merge base of tip commit of the remote-tracking
+branch and revision-range specified in cmdline.
+For a local branch, you need to track a remote branch by <code>git branch
+--set-upstream-to</code> before using this option.</p></div>
+</div>
+</div>
+<div class="sect1">
<h2 id="_examples">EXAMPLES</h2>
<div class="sectionbody">
<div class="ulist"><ul>
@@ -2116,7 +2177,7 @@ as e-mailable patches:
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2016-01-26 16:20:09 PST
+Last updated 2016-05-23 15:52:04 PDT
</div>
</div>
</body>