diff options
Diffstat (limited to 'git-rev-list.html')
-rw-r--r-- | git-rev-list.html | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/git-rev-list.html b/git-rev-list.html index eebfdf3fd..ab8cc4c1a 100644 --- a/git-rev-list.html +++ b/git-rev-list.html @@ -1470,15 +1470,17 @@ Default mode </p>
</dd>
<dt class="hdlist1">
---ancestry-path
+--ancestry-path[=<commit>]
</dt>
<dd>
<p>
When given a range of commits to display (e.g. <em>commit1..commit2</em>
- or <em>commit2 ^commit1</em>), only display commits that exist
- directly on the ancestry chain between the <em>commit1</em> and
- <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>,
- and ancestors of <em>commit2</em>.
+ or <em>commit2 ^commit1</em>), only display commits in that range
+ that are ancestors of <commit>, descendants of <commit>, or
+ <commit> itself. If no commit is specified, use <em>commit1</em> (the
+ excluded part of the range) as <commit>. Can be passed multiple
+ times; if so, a commit is included if it is any of the commits
+ given or if it is an ancestor or descendant of one of them.
</p>
</dd>
</dl></div>
@@ -1721,14 +1723,13 @@ If after this parent rewriting, <code>C'</code> is a root or merge commit (has <div class="paragraph"><p>There is another simplification mode available:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
---ancestry-path
+--ancestry-path[=<commit>]
</dt>
<dd>
<p>
- Limit the displayed commits to those directly on the ancestry
- chain between the “from” and “to” commits in the given commit
- range. I.e. only display commits that are ancestor of the “to”
- commit and descendants of the “from” commit.
+ Limit the displayed commits to those which are an ancestor of
+ <commit>, or which are a descendant of <commit>, or are <commit>
+ itself.
</p>
<div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
<div class="listingblock">
@@ -1758,6 +1759,26 @@ option does. Applied to the <em>D..M</em> range, it results in:</p></div> \
L--M</code></pre>
</div></div>
+<div class="paragraph"><p>We can also use <code>--ancestry-path=D</code> instead of <code>--ancestry-path</code> which
+means the same thing when applied to the <em>D..M</em> range but is just more
+explicit.</p></div>
+<div class="paragraph"><p>If we instead are interested in a given topic within this range, and all
+commits affected by that topic, we may only want to view the subset of
+<code>D..M</code> which contain that topic in their ancestry path. So, using
+<code>--ancestry-path=H D..M</code> for example would result in:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code> E
+ \
+ G---H---I---J
+ \
+ L--M</code></pre>
+</div></div>
+<div class="paragraph"><p>Whereas <code>--ancestry-path=K D..M</code> would result in</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code> K---------------L--M</code></pre>
+</div></div>
</dd>
</dl></div>
<div class="paragraph"><p>Before discussing another option, <code>--show-pulls</code>, we need to
@@ -1809,7 +1830,7 @@ merge commits <code>O</code> and <code>P</code>. With parent rewriting, the resu not actually contribute a change to <code>file.txt</code>. They only merged a topic
that was based on an older version of <code>file.txt</code>. This is a common
issue in repositories using a workflow where many contributors work in
-parallel and merge their topic branches along a single trunk: manu
+parallel and merge their topic branches along a single trunk: many
unrelated merges appear in the <code>--full-history</code> results.</p></div>
<div class="paragraph"><p>When using the <code>--simplify-merges</code> option, the commits <code>O</code> and <code>P</code>
disappear from the results. This is because the rewritten second parents
|