diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-10-06 15:16:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-06 15:16:39 -0700 |
commit | 34afdb2aa1517d020162156c0648d77e153a10b6 (patch) | |
tree | 85a0d98dd43f8e5f01aa4623c3d07b544a3c9ede /gitrevisions.html | |
parent | f3ca7b889bcee015231b4783c099e967f1e3477f (diff) | |
download | git-htmldocs-34afdb2aa1517d020162156c0648d77e153a10b6.tar.gz |
Autogenerated HTML docs for v2.10.1-382-ga23ca
Diffstat (limited to 'gitrevisions.html')
-rw-r--r-- | gitrevisions.html | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gitrevisions.html b/gitrevisions.html index cf074ec50..1850a2fce 100644 --- a/gitrevisions.html +++ b/gitrevisions.html @@ -1169,13 +1169,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 <rev>^ 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^@</em> notation means all parents of <em>r1</em>.</p></div>
<div class="paragraph"><p>The <em>r1^!</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><rev>^-{<n>}</em> notation includes <em><rev></em> but excludes the <n>th
+parent (i.e. a shorthand for <em><rev>^<n>..<rev></em>), with <em><n></em> = 1 if
+not given. This is typically useful for merge commits where you
+can just pass <em><commit>^-</em> to get all the commits in the branch
+that was merged in merge commit <em><commit></em> (including <em><commit></em>
+itself).</p></div>
<div class="paragraph"><p>While <em><rev>^<n></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^2^@</em>, however you cannot say <em>HEAD^@^2</em>.</p></div>
</div>
</div>
@@ -1242,6 +1248,15 @@ two notations consider all its parents. For example you can say <em>^</em> to exclude them (and their ancestors).
</p>
</dd>
+<dt class="hdlist1">
+<em><rev>^-{<n>}</em>, e.g. <em>HEAD^-, HEAD^-2</em>
+</dt>
+<dd>
+<p>
+ Equivalent to <em><rev>^<n>..<rev></em>, with <em><n></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’s expansion and selection carefully
@@ -1257,6 +1272,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
|