summaryrefslogtreecommitdiffstats
path: root/git-rev-parse.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-06 15:16:39 -0700
committerJunio C Hamano <gitster@pobox.com>2016-10-06 15:16:39 -0700
commit34afdb2aa1517d020162156c0648d77e153a10b6 (patch)
tree85a0d98dd43f8e5f01aa4623c3d07b544a3c9ede /git-rev-parse.html
parentf3ca7b889bcee015231b4783c099e967f1e3477f (diff)
downloadgit-htmldocs-34afdb2aa1517d020162156c0648d77e153a10b6.tar.gz
Autogenerated HTML docs for v2.10.1-382-ga23ca
Diffstat (limited to 'git-rev-parse.html')
-rw-r--r--git-rev-parse.html21
1 files changed, 19 insertions, 2 deletions
diff --git a/git-rev-parse.html b/git-rev-parse.html
index 90fb3f449..cb629ec5a 100644
--- a/git-rev-parse.html
+++ b/git-rev-parse.html
@@ -1641,13 +1641,19 @@ empty range that is both reachable and unreachable from HEAD.</p></div>
</div>
<div class="sect2">
<h3 id="_other_lt_rev_gt_94_parent_shorthand_notations">Other &lt;rev&gt;&#94; Parent Shorthand Notations</h3>
-<div class="paragraph"><p>Two other shorthands exist, particularly useful for merge commits,
+<div class="paragraph"><p>Three other shorthands exist, particularly useful for merge commits,
for naming a set that is formed by a commit and its parent commits.</p></div>
<div class="paragraph"><p>The <em>r1&#94;@</em> notation means all parents of <em>r1</em>.</p></div>
<div class="paragraph"><p>The <em>r1&#94;!</em> notation includes commit <em>r1</em> but excludes all of its parents.
By itself, this notation denotes the single commit <em>r1</em>.</p></div>
+<div class="paragraph"><p>The <em>&lt;rev&gt;&#94;-{&lt;n&gt;}</em> notation includes <em>&lt;rev&gt;</em> but excludes the &lt;n&gt;th
+parent (i.e. a shorthand for <em>&lt;rev&gt;&#94;&lt;n&gt;..&lt;rev&gt;</em>), with <em>&lt;n&gt;</em> = 1 if
+not given. This is typically useful for merge commits where you
+can just pass <em>&lt;commit&gt;&#94;-</em> to get all the commits in the branch
+that was merged in merge commit <em>&lt;commit&gt;</em> (including <em>&lt;commit&gt;</em>
+itself).</p></div>
<div class="paragraph"><p>While <em>&lt;rev&gt;&#94;&lt;n&gt;</em> was about specifying a single commit parent, these
-two notations consider all its parents. For example you can say
+three notations also consider its parents. For example you can say
<em>HEAD&#94;2&#94;@</em>, however you cannot say <em>HEAD&#94;@&#94;2</em>.</p></div>
</div>
</div>
@@ -1714,6 +1720,15 @@ two notations consider all its parents. For example you can say
<em>&#94;</em> to exclude them (and their ancestors).
</p>
</dd>
+<dt class="hdlist1">
+<em>&lt;rev&gt;&#94;-{&lt;n&gt;}</em>, e.g. <em>HEAD&#94;-, HEAD&#94;-2</em>
+</dt>
+<dd>
+<p>
+ Equivalent to <em>&lt;rev&gt;&#94;&lt;n&gt;..&lt;rev&gt;</em>, with <em>&lt;n&gt;</em> = 1 if not
+ given.
+</p>
+</dd>
</dl></div>
<div class="paragraph"><p>Here are a handful of examples using the Loeliger illustration above,
with each step in the notation&#8217;s expansion and selection carefully
@@ -1729,6 +1744,8 @@ D F G H I J D F
C I J F C
B..C = ^B C C
B...C = B ^F C G H D E B C
+B^- = B^..B
+ = ^B^1 B E I J F B
C^@ = C^1
= F I J F
B^@ = B^1 B^2 B^3