summaryrefslogtreecommitdiffstats
path: root/git-show.html
diff options
context:
space:
mode:
Diffstat (limited to 'git-show.html')
-rw-r--r--git-show.html187
1 files changed, 104 insertions, 83 deletions
diff --git a/git-show.html b/git-show.html
index bf6fb1a78..16cf6407e 100644
--- a/git-show.html
+++ b/git-show.html
@@ -865,7 +865,7 @@ people using 80-column terminals.</p></div>
<dd>
<p>
Perform a tab expansion (replace each tab with enough spaces
- to fill to the next display column that is multiple of <em>&lt;n&gt;</em>)
+ to fill to the next display column that is a multiple of <em>&lt;n&gt;</em>)
in the log message before showing it in the output.
<code>--expand-tabs</code> is a short-hand for <code>--expand-tabs=8</code>, and
<code>--no-expand-tabs</code> is a short-hand for <code>--expand-tabs=0</code>,
@@ -892,7 +892,7 @@ environment overrides). See <a href="git-config.html">git-config(1)</a> for more
<div class="paragraph"><p>With an optional <em>&lt;ref&gt;</em> argument, use the ref to find the notes
to display. The ref can specify the full refname when it begins
with <code>refs/notes/</code>; when it begins with <code>notes/</code>, <code>refs/</code> and otherwise
-<code>refs/notes/</code> is prefixed to form a full name of the ref.</p></div>
+<code>refs/notes/</code> is prefixed to form the full name of the ref.</p></div>
<div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
being displayed. Examples: "--notes=foo" will show only notes from
"refs/notes/foo"; "--notes=foo --notes" will show both notes from
@@ -2027,128 +2027,149 @@ diff output.</p></div>
</p>
</dd>
<dt class="hdlist1">
---diff-merges=(off|none|on|first-parent|1|separate|m|combined|c|dense-combined|cc|remerge|r)
-</dt>
-<dt class="hdlist1">
---no-diff-merges
+-m
</dt>
<dd>
<p>
- Specify diff format to be used for merge commits. Default is
- <code>dense-combined</code> unless <code>--first-parent</code> is in use, in which case
- <code>first-parent</code> is the default.
+ Show diffs for merge commits in the default format. This is
+ similar to <em>--diff-merges=on</em>, except <code>-m</code> will
+ produce no output unless <code>-p</code> is given as well.
</p>
-<div class="dlist"><dl>
-<dt class="hdlist1">
---diff-merges=(off|none)
-</dt>
+</dd>
<dt class="hdlist1">
---no-diff-merges
+-c
</dt>
<dd>
<p>
- Disable output of diffs for merge commits. Useful to override
- implied value.
+ Produce combined diff output for merge commits.
+ Shortcut for <em>--diff-merges=combined -p</em>.
</p>
</dd>
<dt class="hdlist1">
---diff-merges=on
-</dt>
-<dt class="hdlist1">
---diff-merges=m
-</dt>
-<dt class="hdlist1">
--m
+--cc
</dt>
<dd>
<p>
- This option makes diff output for merge commits to be shown in
- the default format. <code>-m</code> will produce the output only if <code>-p</code>
- is given as well. The default format could be changed using
- <code>log.diffMerges</code> configuration parameter, which default value
- is <code>separate</code>.
+ Produce dense combined diff output for merge commits.
+ Shortcut for <em>--diff-merges=dense-combined -p</em>.
</p>
</dd>
<dt class="hdlist1">
---diff-merges=first-parent
-</dt>
-<dt class="hdlist1">
---diff-merges=1
+--dd
</dt>
<dd>
<p>
- This option makes merge commits show the full diff with
- respect to the first parent only.
+ Produce diff with respect to first parent for both merge and
+ regular commits.
+ Shortcut for <em>--diff-merges=first-parent -p</em>.
</p>
</dd>
<dt class="hdlist1">
---diff-merges=separate
+--remerge-diff
</dt>
<dd>
<p>
- This makes merge commits show the full diff with respect to
- each of the parents. Separate log entry and diff is generated
- for each parent.
+ Produce remerge-diff output for merge commits.
+ Shortcut for <em>--diff-merges=remerge -p</em>.
</p>
</dd>
<dt class="hdlist1">
---diff-merges=remerge
+--no-diff-merges
</dt>
+<dd>
+<p>
+ Synonym for <em>--diff-merges=off</em>.
+</p>
+</dd>
<dt class="hdlist1">
---diff-merges=r
+--diff-merges=&lt;format&gt;
</dt>
+<dd>
+<p>
+ Specify diff format to be used for merge commits. Default is
+ <code>dense-combined</code> unless <code>--first-parent</code> is in use, in
+ which case <code>first-parent</code> is the default.
+</p>
+<div class="paragraph"><p>The following formats are supported:</p></div>
+<div class="openblock">
+<div class="content">
+<div class="dlist"><dl>
<dt class="hdlist1">
---remerge-diff
+off, none
</dt>
<dd>
<p>
- With this option, two-parent merge commits are remerged to
- create a temporary tree object&#8201;&#8212;&#8201;potentially containing files
- with conflict markers and such. A diff is then shown between
- that temporary tree and the actual merge commit.
+ Disable output of diffs for merge commits. Useful to override
+ implied value.
</p>
-<div class="paragraph"><p>The output emitted when this option is used is subject to change, and
-so is its interaction with other options (unless explicitly
-documented).</p></div>
</dd>
<dt class="hdlist1">
---diff-merges=combined
+on, m
</dt>
+<dd>
+<p>
+ Make diff output for merge commits to be shown in the default
+ format. The default format could be changed using
+ <code>log.diffMerges</code> configuration variable, whose default value
+ is <code>separate</code>.
+</p>
+</dd>
<dt class="hdlist1">
---diff-merges=c
+first-parent, 1
</dt>
+<dd>
+<p>
+ Show full diff with respect to first parent. This is the same
+ format as <code>--patch</code> produces for non-merge commits.
+</p>
+</dd>
<dt class="hdlist1">
--c
+separate
</dt>
<dd>
<p>
- With this option, diff output for a merge commit shows the
- differences from each of the parents to the merge result
- simultaneously instead of showing pairwise diff between a
- parent and the result one at a time. Furthermore, it lists
- only files which were modified from all parents. <code>-c</code> implies
- <code>-p</code>.
+ Show full diff with respect to each of parents.
+ Separate log entry and diff is generated for each parent.
</p>
</dd>
<dt class="hdlist1">
---diff-merges=dense-combined
+combined, c
</dt>
+<dd>
+<p>
+ Show differences from each of the parents to the merge
+ result simultaneously instead of showing pairwise diff between
+ a parent and the result one at a time. Furthermore, it lists
+ only files which were modified from all parents.
+</p>
+</dd>
<dt class="hdlist1">
---diff-merges=cc
+dense-combined, cc
</dt>
+<dd>
+<p>
+ Further compress output produced by <code>--diff-merges=combined</code>
+ by omitting uninteresting hunks whose contents in the parents
+ have only two variants and the merge result picks one of them
+ without modification.
+</p>
+</dd>
<dt class="hdlist1">
---cc
+remerge, r
</dt>
<dd>
<p>
- With this option the output produced by
- <code>--diff-merges=combined</code> is further compressed by omitting
- uninteresting hunks whose contents in the parents have only
- two variants and the merge result picks one of them without
- modification. <code>--cc</code> implies <code>-p</code>.
+ Remerge two-parent merge commits to create a temporary tree
+ object&#8212;potentially containing files with conflict markers
+ and such. A diff is then shown between that temporary tree
+ and the actual merge commit.
</p>
+<div class="paragraph"><p>The output emitted when this option is used is subject to change, and
+so is its interaction with other options (unless explicitly
+documented).</p></div>
</dd>
</dl></div>
+</div></div>
</dd>
<dt class="hdlist1">
--combined-all-paths
@@ -3173,7 +3194,7 @@ matches "<code>fooasdfbar</code>" and "<code>foo/bar/baz/asdf</code>" but not "<
<p>
Discard the files before the named &lt;file&gt; from the output
(i.e. <em>skip to</em>), or move them to the end of the output
- (i.e. <em>rotate to</em>). These were invented primarily for use
+ (i.e. <em>rotate to</em>). These options were invented primarily for the use
of the <code>git difftool</code> command, and may not be very useful
otherwise.
</p>
@@ -3436,7 +3457,7 @@ diff format:</p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
-It is preceded with a "git diff" header that looks like this:
+It is preceded by a "git diff" header that looks like this:
</p>
<div class="literalblock">
<div class="content">
@@ -3445,9 +3466,9 @@ It is preceded with a "git diff" header that looks like this:
<div class="paragraph"><p>The <code>a/</code> and <code>b/</code> filenames are the same unless rename/copy is
involved. Especially, even for a creation or a deletion,
<code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p></div>
-<div class="paragraph"><p>When rename/copy is involved, <code>file1</code> and <code>file2</code> show the
+<div class="paragraph"><p>When a rename/copy is involved, <code>file1</code> and <code>file2</code> show the
name of the source file of the rename/copy and the name of
-the file that rename/copy produces, respectively.</p></div>
+the file that the rename/copy produces, respectively.</p></div>
</li>
<li>
<p>
@@ -3508,7 +3529,7 @@ rename to a</code></pre>
<p>
Hunk headers mention the name of the function to which the hunk
applies. See "Defining a custom hunk-header" in
- <a href="gitattributes.html">gitattributes(5)</a> for details of how to tailor to this to
+ <a href="gitattributes.html">gitattributes(5)</a> for details of how to tailor this to
specific languages.
</p>
</li>
@@ -3523,7 +3544,7 @@ produce a <em>combined diff</em> when showing a merge. This is the default
format when showing merges with <a href="git-diff.html">git-diff(1)</a> or
<a href="git-show.html">git-show(1)</a>. Note also that you can give suitable
<code>--diff-merges</code> option to any of these commands to force generation of
-diffs in specific format.</p></div>
+diffs in a specific format.</p></div>
<div class="paragraph"><p>A "combined diff" format looks like this:</p></div>
<div class="listingblock">
<div class="content">
@@ -3558,7 +3579,7 @@ index fabadb8,cc95eb0..4866510
<div class="olist arabic"><ol class="arabic">
<li>
<p>
-It is preceded with a "git diff" header, that looks like
+It is preceded by a "git diff" header, that looks like
this (when the <code>-c</code> option is used):
</p>
<div class="literalblock">
@@ -3585,25 +3606,25 @@ deleted file mode &lt;mode&gt;,&lt;mode&gt;</code></pre>
</div></div>
<div class="paragraph"><p>The <code>mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;</code> line appears only if at least one of
the &lt;mode&gt; is different from the rest. Extended headers with
-information about detected contents movement (renames and
-copying detection) are designed to work with diff of two
+information about detected content movement (renames and
+copying detection) are designed to work with the diff of two
&lt;tree-ish&gt; and are not used by combined diff format.</p></div>
</li>
<li>
<p>
-It is followed by two-line from-file/to-file header
+It is followed by a two-line from-file/to-file header:
</p>
<div class="literalblock">
<div class="content">
<pre><code>--- a/file
+++ b/file</code></pre>
</div></div>
-<div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff
+<div class="paragraph"><p>Similar to the two-line header for the traditional <em>unified</em> diff
format, <code>/dev/null</code> is used to signal created or deleted
files.</p></div>
<div class="paragraph"><p>However, if the --combined-all-paths option is provided, instead of a
-two-line from-file/to-file you get a N+1 line from-file/to-file header,
-where N is the number of parents in the merge commit</p></div>
+two-line from-file/to-file, you get an N+1 line from-file/to-file header,
+where N is the number of parents in the merge commit:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>--- a/file
@@ -3646,7 +3667,7 @@ added, from the point of view of that parent).</p></div>
<div class="paragraph"><p>In the above example output, the function signature was changed
from both files (hence two <code>-</code> removals from both file1 and
file2, plus <code>++</code> to mean one line that was added does not appear
-in either file1 or file2). Also eight other lines are the same
+in either file1 or file2). Also, eight other lines are the same
from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p></div>
<div class="paragraph"><p>When shown by <code>git diff-tree -c</code>, it compares the parents of a
merge commit with the merge result (i.e. file1..fileN are the
@@ -3665,7 +3686,7 @@ two unresolved merge parents with the working tree file
</dt>
<dd>
<p>
- Shows the tag <code>v1.0.0</code>, along with the object the tags
+ Shows the tag <code>v1.0.0</code>, along with the object the tag
points at.
</p>
</dd>
@@ -3758,7 +3779,7 @@ mind.</p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
-<em>git commit</em> and <em>git commit-tree</em> issues
+<em>git commit</em> and <em>git commit-tree</em> issue
a warning if the commit log message given to it does not look
like a valid UTF-8 string, unless you explicitly say your
project uses a legacy encoding. The way to say this is to
@@ -3770,7 +3791,7 @@ mind.</p></div>
commitEncoding = ISO-8859-1</code></pre>
</div></div>
<div class="paragraph"><p>Commit objects created with the above setting record the value
-of <code>i18n.commitEncoding</code> in its <code>encoding</code> header. This is to
+of <code>i18n.commitEncoding</code> in their <code>encoding</code> header. This is to
help other people who look at them later. Lack of this header
implies that the commit log message is encoded in UTF-8.</p></div>
</li>
@@ -3808,7 +3829,7 @@ reversible operation.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-09-29 09:41:32 PDT
+ 2023-10-23 14:43:46 PDT
</div>
</div>
</body>