diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-11-02 14:05:05 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-02 14:05:05 -0800 |
commit | df3d3cddff51ef14a454394a9977e899f72b8244 (patch) | |
tree | b6f9a3c1f550494dd1bb439f3b1cb05067ce621a /git-diff.html | |
parent | b8e9cfb64bf7192e3861ff1b72d169e7d1554be9 (diff) | |
download | git-htmldocs-df3d3cddff51ef14a454394a9977e899f72b8244.tar.gz |
Autogenerated HTML docs for v2.29.2-154-g7f7eb
Diffstat (limited to 'git-diff.html')
-rw-r--r-- | git-diff.html | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/git-diff.html b/git-diff.html index 261932ed4..43ae255b3 100644 --- a/git-diff.html +++ b/git-diff.html @@ -750,8 +750,8 @@ git-diff(1) Manual Page <div class="sectionbody">
<div class="verseblock">
<pre class="content"><em>git diff</em> [<options>] [<commit>] [--] [<path>…]
-<em>git diff</em> [<options>] --cached [<commit>] [--] [<path>…]
-<em>git diff</em> [<options>] <commit> [<commit>…] <commit> [--] [<path>…]
+<em>git diff</em> [<options>] --cached [--merge-base] [<commit>] [--] [<path>…]
+<em>git diff</em> [<options>] [--merge-base] <commit> [<commit>…] <commit> [--] [<path>…]
<em>git diff</em> [<options>] <commit>…<commit> [--] [<path>…]
<em>git diff</em> [<options>] <blob> <blob>
<em>git diff</em> [<options>] --no-index [--] <path> <path></pre>
@@ -793,7 +793,7 @@ files on disk.</p></div> </p>
</dd>
<dt class="hdlist1">
-<em>git diff</em> [<options>] --cached [<commit>] [--] [<path>…]
+<em>git diff</em> [<options>] --cached [--merge-base] [<commit>] [--] [<path>…]
</dt>
<dd>
<p>
@@ -805,6 +805,9 @@ files on disk.</p></div> <commit> is not given, it shows all staged changes.
--staged is a synonym of --cached.
</p>
+<div class="paragraph"><p>If --merge-base is given, instead of using <commit>, use the merge base
+of <commit> and HEAD. <code>git diff --merge-base A</code> is equivalent to
+<code>git diff $(git merge-base A HEAD)</code>.</p></div>
</dd>
<dt class="hdlist1">
<em>git diff</em> [<options>] <commit> [--] [<path>…]
@@ -819,13 +822,16 @@ files on disk.</p></div> </p>
</dd>
<dt class="hdlist1">
-<em>git diff</em> [<options>] <commit> <commit> [--] [<path>…]
+<em>git diff</em> [<options>] [--merge-base] <commit> <commit> [--] [<path>…]
</dt>
<dd>
<p>
This is to view the changes between two arbitrary
<commit>.
</p>
+<div class="paragraph"><p>If --merge-base is given, use the merge base of the two commits for the
+"before" side. <code>git diff --merge-base A B</code> is equivalent to
+<code>git diff $(git merge-base A B) B</code>.</p></div>
</dd>
<dt class="hdlist1">
<em>git diff</em> [<options>] <commit> <commit>… <commit> [--] [<path>…]
@@ -835,7 +841,7 @@ files on disk.</p></div> This form is to view the results of a merge commit. The first
listed <commit> must be the merge itself; the remaining two or
more commits should be its parents. A convenient way to produce
- the desired set of revisions is to use the ^@ suffix.
+ the desired set of revisions is to use the <code>^@</code> suffix.
For instance, if <code>master</code> names a merge commit, <code>git diff master
master^@</code> gives the same combined diff as <code>git show master</code>.
</p>
@@ -845,7 +851,7 @@ files on disk.</p></div> </dt>
<dd>
<p>
- This is synonymous to the earlier form (without the "..") for
+ This is synonymous to the earlier form (without the <code>..</code>) for
viewing the changes between two arbitrary <commit>. If <commit> on
one side is omitted, it will have the same effect as
using HEAD instead.
@@ -858,21 +864,21 @@ files on disk.</p></div> <p>
This form is to view the changes on the branch containing
and up to the second <commit>, starting at a common ancestor
- of both <commit>. "git diff A...B" is equivalent to
- "git diff $(git merge-base A B) B". You can omit any one
+ of both <commit>. <code>git diff A...B</code> is equivalent to
+ <code>git diff $(git merge-base A B) B</code>. You can omit any one
of <commit>, which has the same effect as using HEAD instead.
</p>
</dd>
</dl></div>
<div class="paragraph"><p>Just in case you are doing something exotic, it should be
noted that all of the <commit> in the above description, except
-in the last two forms that use ".." notations, can be any
-<tree>.</p></div>
+in the <code>--merge-base</code> case and in the last two forms that use <code>..</code>
+notations, can be any <tree>.</p></div>
<div class="paragraph"><p>For a more complete list of ways to spell <commit>, see
"SPECIFYING REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>.
However, "diff" is about comparing two <em>endpoints</em>, not ranges,
-and the range notations ("<commit>..<commit>" and
-"<commit>...<commit>") do not mean a range as defined in the
+and the range notations (<code><commit>..<commit></code> and
+<code><commit>...<commit></code>) do not mean a range as defined in the
"SPECIFYING RANGES" section in <a href="gitrevisions.html">gitrevisions(7)</a>.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
@@ -1989,6 +1995,18 @@ matches "<code>fooasdfbar</code>" and "<code>foo/bar/baz/asdf</code>" but not "< </p>
</dd>
<dt class="hdlist1">
+-I<regex>
+</dt>
+<dt class="hdlist1">
+--ignore-matching-lines=<regex>
+</dt>
+<dd>
+<p>
+ Ignore changes whose all lines match <regex>. This option may
+ be specified more than once.
+</p>
+</dd>
+<dt class="hdlist1">
--inter-hunk-context=<lines>
</dt>
<dd>
@@ -2792,13 +2810,13 @@ Changes in the working tree not yet staged for the next commit. <li>
<p>
Changes between the index and your last commit; what you
- would be committing if you run "git commit" without "-a" option.
+ would be committing if you run <code>git commit</code> without <code>-a</code> option.
</p>
</li>
<li>
<p>
Changes in the working tree since your last commit; what you
- would be committing if you run "git commit -a"
+ would be committing if you run <code>git commit -a</code>
</p>
</li>
</ol></div>
@@ -2942,7 +2960,7 @@ Output diff in reverse. <div id="footer">
<div id="footer-text">
Last updated
- 2020-07-15 16:50:49 PDT
+ 2020-11-02 14:02:22 PST
</div>
</div>
</body>
|