summaryrefslogtreecommitdiffstats
path: root/git-diff-index.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-31 13:25:53 -0700
committerJunio C Hamano <gitster@pobox.com>2014-10-31 13:25:53 -0700
commitc14e6ad9a230ad90c84b7f620d87fbe49a2d0342 (patch)
tree120346dc383e3d1c4219fe8c533eb22cb6af2b55 /git-diff-index.html
parent2a4bcbc355496c8d83b1b9f8892c4cbe8f584158 (diff)
downloadgit-htmldocs-c14e6ad9a230ad90c84b7f620d87fbe49a2d0342.tar.gz
Autogenerated HTML docs for v2.2.0-rc0
Diffstat (limited to 'git-diff-index.html')
-rw-r--r--git-diff-index.html384
1 files changed, 191 insertions, 193 deletions
diff --git a/git-diff-index.html b/git-diff-index.html
index bff760adc..0a4f8517e 100644
--- a/git-diff-index.html
+++ b/git-diff-index.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.6" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
<title>git-diff-index(1)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -87,10 +87,16 @@ ul, ol, li > p {
ul > li { color: #aaa; }
ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
+pre {
+ white-space: pre-wrap;
+}
#author {
color: #527bbd;
@@ -219,7 +225,7 @@ div.exampleblock > div.content {
}
div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
+span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
@@ -349,7 +355,7 @@ div.colist td img {
margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -407,18 +413,14 @@ span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
+div.unbreakable { page-break-inside: avoid; }
+
/*
* xhtml11 specific
*
* */
-tt {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -452,12 +454,6 @@ div.tableblock > table[frame="vsides"] {
*
* */
-.monospaced {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -537,6 +533,8 @@ body.manpage div.sectionbody {
@media print {
body.manpage div#toc { display: none; }
}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -581,7 +579,7 @@ toc: function (toclevels) {
function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -610,7 +608,7 @@ toc: function (toclevels) {
var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
- if (entry.nodeName == 'div'
+ if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -656,7 +654,7 @@ footnotes: function () {
var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
- if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -792,8 +790,8 @@ files are compared.</p></div>
</dt>
<dd>
<p>
- Suppress diff output. Useful for commands like <tt>git show</tt> that
- show the patch by default, or to cancel the effect of <tt>--patch</tt>.
+ Suppress diff output. Useful for commands like <code>git show</code> that
+ show the patch by default, or to cancel the effect of <code>--patch</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -806,7 +804,7 @@ files are compared.</p></div>
<p>
Generate diffs with &lt;n&gt; lines of context instead of
the usual three.
- Implies <tt>-p</tt>.
+ Implies <code>-p</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -823,7 +821,7 @@ files are compared.</p></div>
</dt>
<dd>
<p>
- Synonym for <tt>-p --raw</tt>.
+ Synonym for <code>-p --raw</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -862,7 +860,7 @@ files are compared.</p></div>
<div class="content">
<div class="dlist"><dl>
<dt class="hdlist1">
-<tt>default</tt>, <tt>myers</tt>
+<code>default</code>, <code>myers</code>
</dt>
<dd>
<p>
@@ -870,7 +868,7 @@ files are compared.</p></div>
</p>
</dd>
<dt class="hdlist1">
-<tt>minimal</tt>
+<code>minimal</code>
</dt>
<dd>
<p>
@@ -879,7 +877,7 @@ files are compared.</p></div>
</p>
</dd>
<dt class="hdlist1">
-<tt>patience</tt>
+<code>patience</code>
</dt>
<dd>
<p>
@@ -887,7 +885,7 @@ files are compared.</p></div>
</p>
</dd>
<dt class="hdlist1">
-<tt>histogram</tt>
+<code>histogram</code>
</dt>
<dd>
<p>
@@ -899,7 +897,7 @@ files are compared.</p></div>
</div></div>
<div class="paragraph"><p>For instance, if you configured diff.algorithm variable to a
non-default value and want to use the default one, then you
-have to use <tt>--diff-algorithm=default</tt> option.</p></div>
+have to use <code>--diff-algorithm=default</code> option.</p></div>
</dd>
<dt class="hdlist1">
--stat[=&lt;width&gt;[,&lt;name-width&gt;[,&lt;count&gt;]]]
@@ -910,29 +908,29 @@ have to use <tt>--diff-algorithm=default</tt> option.</p></div>
will be used for the filename part, and the rest for the graph
part. Maximum width defaults to terminal width, or 80 columns
if not connected to a terminal, and can be overridden by
- <tt>&lt;width&gt;</tt>. The width of the filename part can be limited by
- giving another width <tt>&lt;name-width&gt;</tt> after a comma. The width
+ <code>&lt;width&gt;</code>. The width of the filename part can be limited by
+ giving another width <code>&lt;name-width&gt;</code> after a comma. The width
of the graph part can be limited by using
- <tt>--stat-graph-width=&lt;width&gt;</tt> (affects all commands generating
- a stat graph) or by setting <tt>diff.statGraphWidth=&lt;width&gt;</tt>
- (does not affect <tt>git format-patch</tt>).
- By giving a third parameter <tt>&lt;count&gt;</tt>, you can limit the
- output to the first <tt>&lt;count&gt;</tt> lines, followed by <tt>...</tt> if
+ <code>--stat-graph-width=&lt;width&gt;</code> (affects all commands generating
+ a stat graph) or by setting <code>diff.statGraphWidth=&lt;width&gt;</code>
+ (does not affect <code>git format-patch</code>).
+ By giving a third parameter <code>&lt;count&gt;</code>, you can limit the
+ output to the first <code>&lt;count&gt;</code> lines, followed by <code>...</code> if
there are more.
</p>
-<div class="paragraph"><p>These parameters can also be set individually with <tt>--stat-width=&lt;width&gt;</tt>,
-<tt>--stat-name-width=&lt;name-width&gt;</tt> and <tt>--stat-count=&lt;count&gt;</tt>.</p></div>
+<div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=&lt;width&gt;</code>,
+<code>--stat-name-width=&lt;name-width&gt;</code> and <code>--stat-count=&lt;count&gt;</code>.</p></div>
</dd>
<dt class="hdlist1">
--numstat
</dt>
<dd>
<p>
- Similar to <tt>--stat</tt>, but shows number of added and
+ Similar to <code>--stat</code>, but shows number of added and
deleted lines in decimal notation and pathname without
abbreviation, to make it more machine friendly. For
- binary files, outputs two <tt>-</tt> instead of saying
- <tt>0 0</tt>.
+ binary files, outputs two <code>-</code> instead of saying
+ <code>0 0</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -940,7 +938,7 @@ have to use <tt>--diff-algorithm=default</tt> option.</p></div>
</dt>
<dd>
<p>
- Output only the last line of the <tt>--stat</tt> format containing total
+ Output only the last line of the <code>--stat</code> format containing total
number of modified files, as well as number of added and deleted
lines.
</p>
@@ -951,9 +949,9 @@ have to use <tt>--diff-algorithm=default</tt> option.</p></div>
<dd>
<p>
Output the distribution of relative amount of changes for each
- sub-directory. The behavior of <tt>--dirstat</tt> can be customized by
+ sub-directory. The behavior of <code>--dirstat</code> can be customized by
passing it a comma separated list of parameters.
- The defaults are controlled by the <tt>diff.dirstat</tt> configuration
+ The defaults are controlled by the <code>diff.dirstat</code> configuration
variable (see <a href="git-config.html">git-config(1)</a>).
The following parameters are available:
</p>
@@ -961,7 +959,7 @@ have to use <tt>--diff-algorithm=default</tt> option.</p></div>
<div class="content">
<div class="dlist"><dl>
<dt class="hdlist1">
-<tt>changes</tt>
+<code>changes</code>
</dt>
<dd>
<p>
@@ -973,39 +971,39 @@ have to use <tt>--diff-algorithm=default</tt> option.</p></div>
</p>
</dd>
<dt class="hdlist1">
-<tt>lines</tt>
+<code>lines</code>
</dt>
<dd>
<p>
Compute the dirstat numbers by doing the regular line-based diff
analysis, and summing the removed/added line counts. (For binary
files, count 64-byte chunks instead, since binary files have no
- natural concept of lines). This is a more expensive <tt>--dirstat</tt>
- behavior than the <tt>changes</tt> behavior, but it does count rearranged
+ natural concept of lines). This is a more expensive <code>--dirstat</code>
+ behavior than the <code>changes</code> behavior, but it does count rearranged
lines within a file as much as other changes. The resulting output
- is consistent with what you get from the other <tt>--*stat</tt> options.
+ is consistent with what you get from the other <code>--*stat</code> options.
</p>
</dd>
<dt class="hdlist1">
-<tt>files</tt>
+<code>files</code>
</dt>
<dd>
<p>
Compute the dirstat numbers by counting the number of files changed.
Each changed file counts equally in the dirstat analysis. This is
- the computationally cheapest <tt>--dirstat</tt> behavior, since it does
+ the computationally cheapest <code>--dirstat</code> behavior, since it does
not have to look at the file contents at all.
</p>
</dd>
<dt class="hdlist1">
-<tt>cumulative</tt>
+<code>cumulative</code>
</dt>
<dd>
<p>
Count changes in a child directory for the parent directory as well.
- Note that when using <tt>cumulative</tt>, the sum of the percentages
+ Note that when using <code>cumulative</code>, the sum of the percentages
reported may exceed 100%. The default (non-cumulative) behavior can
- be specified with the <tt>noncumulative</tt> parameter.
+ be specified with the <code>noncumulative</code> parameter.
</p>
</dd>
<dt class="hdlist1">
@@ -1023,7 +1021,7 @@ have to use <tt>--diff-algorithm=default</tt> option.</p></div>
<div class="paragraph"><p>Example: The following will count changed files, while ignoring
directories with less than 10% of the total amount of changed files,
and accumulating child directory counts in the parent directories:
-<tt>--dirstat=files,10,cumulative</tt>.</p></div>
+<code>--dirstat=files,10,cumulative</code>.</p></div>
</dd>
<dt class="hdlist1">
--summary
@@ -1039,7 +1037,7 @@ and accumulating child directory counts in the parent directories:
</dt>
<dd>
<p>
- Synonym for <tt>-p --stat</tt>.
+ Synonym for <code>-p --stat</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1047,11 +1045,11 @@ and accumulating child directory counts in the parent directories:
</dt>
<dd>
<p>
- When <tt>--raw</tt>, <tt>--numstat</tt>, <tt>--name-only</tt> or <tt>--name-status</tt> has been
+ When <code>--raw</code>, <code>--numstat</code>, <code>--name-only</code> or <code>--name-status</code> has been
given, do not munge pathnames and use NULs as output field terminators.
</p>
<div class="paragraph"><p>Without this option, each pathname output will have TAB, LF, double quotes,
-and backslash characters replaced with <tt>\t</tt>, <tt>\n</tt>, <tt>\"</tt>, and <tt>\\</tt>,
+and backslash characters replaced with <code>\t</code>, <code>\n</code>, <code>\"</code>, and <code>\\</code>,
respectively, and the pathname will be enclosed in double quotes if
any of those replacements occurred.</p></div>
</dd>
@@ -1069,7 +1067,7 @@ any of those replacements occurred.</p></div>
<dd>
<p>
Show only names and status of changed files. See the description
- of the <tt>--diff-filter</tt> option on what the status letters mean.
+ of the <code>--diff-filter</code> option on what the status letters mean.
</p>
</dd>
<dt class="hdlist1">
@@ -1077,13 +1075,13 @@ any of those replacements occurred.</p></div>
</dt>
<dd>
<p>
- Specify how differences in submodules are shown. When <tt>--submodule</tt>
- or <tt>--submodule=log</tt> is given, the <em>log</em> format is used. This format lists
- the commits in the range like <a href="git-submodule.html">git-submodule(1)</a> <tt>summary</tt> does.
- Omitting the <tt>--submodule</tt> option or specifying <tt>--submodule=short</tt>,
+ Specify how differences in submodules are shown. When <code>--submodule</code>
+ or <code>--submodule=log</code> is given, the <em>log</em> format is used. This format lists
+ the commits in the range like <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does.
+ Omitting the <code>--submodule</code> option or specifying <code>--submodule=short</code>,
uses the <em>short</em> format. This format just shows the names of the commits
at the beginning and end of the range. Can be tweaked via the
- <tt>diff.submodule</tt> configuration variable.
+ <code>diff.submodule</code> configuration variable.
</p>
</dd>
<dt class="hdlist1">
@@ -1092,8 +1090,8 @@ any of those replacements occurred.</p></div>
<dd>
<p>
Show colored diff.
- <tt>--color</tt> (i.e. without <em>=&lt;when&gt;</em>) is the same as <tt>--color=always</tt>.
- <em>&lt;when&gt;</em> can be one of <tt>always</tt>, <tt>never</tt>, or <tt>auto</tt>.
+ <code>--color</code> (i.e. without <em>=&lt;when&gt;</em>) is the same as <code>--color=always</code>.
+ <em>&lt;when&gt;</em> can be one of <code>always</code>, <code>never</code>, or <code>auto</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1102,7 +1100,7 @@ any of those replacements occurred.</p></div>
<dd>
<p>
Turn off colored diff.
- It is the same as <tt>--color=never</tt>.
+ It is the same as <code>--color=never</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1112,7 +1110,7 @@ any of those replacements occurred.</p></div>
<p>
Show a word diff, using the &lt;mode&gt; to delimit changed words.
By default, words are delimited by whitespace; see
- <tt>--word-diff-regex</tt> below. The &lt;mode&gt; defaults to <em>plain</em>, and
+ <code>--word-diff-regex</code> below. The &lt;mode&gt; defaults to <em>plain</em>, and
must be one of:
</p>
<div class="openblock">
@@ -1123,7 +1121,7 @@ color
</dt>
<dd>
<p>
- Highlight changed words using only colors. Implies <tt>--color</tt>.
+ Highlight changed words using only colors. Implies <code>--color</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1131,7 +1129,7 @@ plain
</dt>
<dd>
<p>
- Show words as <tt>[-removed-]</tt> and <tt>{+added+}</tt>. Makes no
+ Show words as <code>[-removed-]</code> and <code>{+added+}</code>. Makes no
attempts to escape the delimiters if they appear in the input,
so the output may be ambiguous.
</p>
@@ -1143,10 +1141,10 @@ porcelain
<p>
Use a special line-based format intended for script
consumption. Added/removed/unchanged runs are printed in the
- usual unified diff format, starting with a <tt>+</tt>/<tt>-</tt>/` `
+ usual unified diff format, starting with a <code>+</code>/<code>-</code>/` `
character at the beginning of the line and extending to the
end of the line. Newlines in the input are represented by a
- tilde <tt>~</tt> on a line of its own.
+ tilde <code>~</code> on a line of its own.
</p>
</dd>
<dt class="hdlist1">
@@ -1169,12 +1167,12 @@ highlight the changed parts in all modes if enabled.</p></div>
<p>
Use &lt;regex&gt; to decide what a word is, instead of considering
runs of non-whitespace to be a word. Also implies
- <tt>--word-diff</tt> unless it was already enabled.
+ <code>--word-diff</code> unless it was already enabled.
</p>
<div class="paragraph"><p>Every non-overlapping match of the
&lt;regex&gt; is considered a word. Anything between these matches is
considered whitespace and ignored(!) for the purposes of finding
-differences. You may want to append <tt>|[^[:space:]]</tt> to your regular
+differences. You may want to append <code>|[^[:space:]]</code> to your regular
expression to make sure that it matches all non-whitespace characters.
A match that contains a newline is silently truncated(!) at the
newline.</p></div>
@@ -1188,8 +1186,8 @@ override configuration settings.</p></div>
</dt>
<dd>
<p>
- Equivalent to <tt>--word-diff=color</tt> plus (if a regex was
- specified) <tt>--word-diff-regex=&lt;regex&gt;</tt>.
+ Equivalent to <code>--word-diff=color</code> plus (if a regex was
+ specified) <code>--word-diff-regex=&lt;regex&gt;</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1207,7 +1205,7 @@ override configuration settings.</p></div>
<dd>
<p>
Warn if changes introduce whitespace errors. What are
- considered whitespace errors is controlled by <tt>core.whitespace</tt>
+ considered whitespace errors is controlled by <code>core.whitespace</code>
configuration. By default, trailing whitespaces (including
lines that solely consist of whitespaces) and a space character
that is immediately followed by a tab character inside the
@@ -1231,8 +1229,8 @@ override configuration settings.</p></div>
</dt>
<dd>
<p>
- In addition to <tt>--full-index</tt>, output a binary diff that
- can be applied with <tt>git-apply</tt>.
+ In addition to <code>--full-index</code>, output a binary diff that
+ can be applied with <code>git-apply</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1243,9 +1241,9 @@ override configuration settings.</p></div>
Instead of showing the full 40-byte hexadecimal object
name in diff-raw format output and diff-tree header
lines, show only a partial prefix. This is
- independent of the <tt>--full-index</tt> option above, which controls
+ independent of the <code>--full-index</code> option above, which controls
the diff-patch output format. Non default number of
- digits can be specified with <tt>--abbrev=&lt;n&gt;</tt>.
+ digits can be specified with <code>--abbrev=&lt;n&gt;</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1263,15 +1261,15 @@ override configuration settings.</p></div>
not as a series of deletion and insertion mixed together with a very
few lines that happen to match textually as the context, but as a
single deletion of everything old followed by a single insertion of
-everything new, and the number <tt>m</tt> controls this aspect of the -B
-option (defaults to 60%). <tt>-B/70%</tt> specifies that less than 30% of the
+everything new, and the number <code>m</code> controls this aspect of the -B
+option (defaults to 60%). <code>-B/70%</code> specifies that less than 30% of the
original should remain in the result for Git to consider it a total
rewrite (i.e. otherwise the resulting patch will be a series of
deletion and insertion mixed together with context lines).</p></div>
<div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
source of a rename (usually -M only considers a file that disappeared
-as the source of a rename), and the number <tt>n</tt> controls this aspect of
-the -B option (defaults to 50%). <tt>-B20%</tt> specifies that a change with
+as the source of a rename), and the number <code>n</code> controls this aspect of
+the -B option (defaults to 50%). <code>-B20%</code> specifies that a change with
addition and deletion compared to 20% or more of the file&#8217;s size are
eligible for being picked up as a possible source of a rename to
another file.</p></div>
@@ -1285,15 +1283,15 @@ another file.</p></div>
<dd>
<p>
Detect renames.
- If <tt>n</tt> is specified, it is a threshold on the similarity
+ If <code>n</code> is specified, it is a threshold on the similarity
index (i.e. amount of addition/deletions compared to the
- file&#8217;s size). For example, <tt>-M90%</tt> means Git should consider a
+ file&#8217;s size). For example, <code>-M90%</code> means Git should consider a
delete/add pair to be a rename if more than 90% of the file
- hasn&#8217;t changed. Without a <tt>%</tt> sign, the number is to be read as
- a fraction, with a decimal point before it. I.e., <tt>-M5</tt> becomes
- 0.5, and is thus the same as <tt>-M50%</tt>. Similarly, <tt>-M05</tt> is
- the same as <tt>-M5%</tt>. To limit detection to exact renames, use
- <tt>-M100%</tt>. The default similarity index is 50%.
+ hasn&#8217;t changed. Without a <code>%</code> sign, the number is to be read as
+ a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes
+ 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is
+ the same as <code>-M5%</code>. To limit detection to exact renames, use
+ <code>-M100%</code>. The default similarity index is 50%.
</p>
</dd>
<dt class="hdlist1">
@@ -1304,8 +1302,8 @@ another file.</p></div>
</dt>
<dd>
<p>
- Detect copies as well as renames. See also <tt>--find-copies-harder</tt>.
- If <tt>n</tt> is specified, it has the same meaning as for <tt>-M&lt;n&gt;</tt>.
+ Detect copies as well as renames. See also <code>--find-copies-harder</code>.
+ If <code>n</code> is specified, it has the same meaning as for <code>-M&lt;n&gt;</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1313,13 +1311,13 @@ another file.</p></div>
</dt>
<dd>
<p>
- For performance reasons, by default, <tt>-C</tt> option finds copies only
+ For performance reasons, by default, <code>-C</code> option finds copies only
if the original file of the copy was modified in the same
changeset. This flag makes the command
inspect unmodified files as candidates for the source of
copy. This is a very expensive operation for large
projects, so use it with caution. Giving more than one
- <tt>-C</tt> option has the same effect.
+ <code>-C</code> option has the same effect.
</p>
</dd>
<dt class="hdlist1">
@@ -1331,14 +1329,14 @@ another file.</p></div>
<dd>
<p>
Omit the preimage for deletes, i.e. print only the header but not
- the diff between the preimage and <tt>/dev/null</tt>. The resulting patch
- is not meant to be applied with <tt>patch</tt> or <tt>git apply</tt>; this is
+ the diff between the preimage and <code>/dev/null</code>. The resulting patch
+ is not meant to be applied with <code>patch</code> or <code>git apply</code>; this is
solely for people who want to just concentrate on reviewing the
text after the change. In addition, the output obviously lack
enough information to apply such a patch in reverse, even manually,
hence the name of the option.
</p>
-<div class="paragraph"><p>When used together with <tt>-B</tt>, omit also the preimage in the deletion part
+<div class="paragraph"><p>When used together with <code>-B</code>, omit also the preimage in the deletion part
of a delete/create pair.</p></div>
</dd>
<dt class="hdlist1">
@@ -1346,7 +1344,7 @@ of a delete/create pair.</p></div>
</dt>
<dd>
<p>
- The <tt>-M</tt> and <tt>-C</tt> options require O(n^2) processing time where n
+ The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n
is the number of potential rename/copy targets. This
option prevents rename/copy detection from running if
the number of rename/copy targets exceeds the specified
@@ -1358,13 +1356,13 @@ of a delete/create pair.</p></div>
</dt>
<dd>
<p>
- Select only files that are Added (<tt>A</tt>), Copied (<tt>C</tt>),
- Deleted (<tt>D</tt>), Modified (<tt>M</tt>), Renamed (<tt>R</tt>), have their
- type (i.e. regular file, symlink, submodule, &#8230;) changed (<tt>T</tt>),
- are Unmerged (<tt>U</tt>), are
- Unknown (<tt>X</tt>), or have had their pairing Broken (<tt>B</tt>).
+ Select only files that are Added (<code>A</code>), Copied (<code>C</code>),
+ Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their
+ type (i.e. regular file, symlink, submodule, &#8230;) changed (<code>T</code>),
+ are Unmerged (<code>U</code>), are
+ Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>).
Any combination of the filter characters (including none) can be used.
- When <tt>*</tt> (All-or-none) is added to the combination, all
+ When <code>*</code> (All-or-none) is added to the combination, all
paths are selected if there is any file that matches
other criteria in the comparison; if there is no file
that matches other criteria, nothing is selected.
@@ -1382,7 +1380,7 @@ of a delete/create pair.</p></div>
<div class="paragraph"><p>It is useful when you&#8217;re looking for an exact block of code (like a
struct), and want to know the history of that block since it first
came into being: use the feature iteratively to feed the interesting
-block in the preimage back into <tt>-S</tt>, and keep going until you get the
+block in the preimage back into <code>-S</code>, and keep going until you get the
very first version of the block.</p></div>
</dd>
<dt class="hdlist1">
@@ -1393,17 +1391,17 @@ very first version of the block.</p></div>
Look for differences whose patch text contains added/removed
lines that match &lt;regex&gt;.
</p>
-<div class="paragraph"><p>To illustrate the difference between <tt>-S&lt;regex&gt; --pickaxe-regex</tt> and
-<tt>-G&lt;regex&gt;</tt>, consider a commit with the following diff in the same
+<div class="paragraph"><p>To illustrate the difference between <code>-S&lt;regex&gt; --pickaxe-regex</code> and
+<code>-G&lt;regex&gt;</code>, consider a commit with the following diff in the same
file:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>+ return !regexec(regexp, two-&gt;ptr, 1, &amp;regmatch, 0);
+<pre><code>+ return !regexec(regexp, two-&gt;ptr, 1, &amp;regmatch, 0);
...
-- hit = !regexec(regexp, mf2.ptr, 1, &amp;regmatch, 0);</tt></pre>
+- hit = !regexec(regexp, mf2.ptr, 1, &amp;regmatch, 0);</code></pre>
</div></div>
-<div class="paragraph"><p>While <tt>git log -G"regexec\(regexp"</tt> will show this commit, <tt>git log
--S"regexec\(regexp" --pickaxe-regex</tt> will not (because the number of
+<div class="paragraph"><p>While <code>git log -G"regexec\(regexp"</code> will show this commit, <code>git log
+-S"regexec\(regexp" --pickaxe-regex</code> will not (because the number of
occurrences of that string did not change).</p></div>
<div class="paragraph"><p>See the <em>pickaxe</em> entry in <a href="gitdiffcore.html">gitdiffcore(7)</a> for more
information.</p></div>
@@ -1413,7 +1411,7 @@ information.</p></div>
</dt>
<dd>
<p>
- When <tt>-S</tt> or <tt>-G</tt> finds a change, show all the changes in that
+ When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that
changeset, not just the files that contain the change
in &lt;string&gt;.
</p>
@@ -1423,7 +1421,7 @@ information.</p></div>
</dt>
<dd>
<p>
- Treat the &lt;string&gt; given to <tt>-S</tt> as an extended POSIX regular
+ Treat the &lt;string&gt; given to <code>-S</code> as an extended POSIX regular
expression to match.
</p>
</dd>
@@ -1434,9 +1432,9 @@ information.</p></div>
<p>
Output the patch in the order specified in the
&lt;orderfile&gt;, which has one shell glob pattern per line.
- This overrides the <tt>diff.orderfile</tt> configuration variable
- (see <a href="git-config.html">git-config(1)</a>). To cancel <tt>diff.orderfile</tt>,
- use <tt>-O/dev/null</tt>.
+ This overrides the <code>diff.orderfile</code> configuration variable
+ (see <a href="git-config.html">git-config(1)</a>). To cancel <code>diff.orderfile</code>,
+ use <code>-O/dev/null</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1549,7 +1547,7 @@ information.</p></div>
</dt>
<dd>
<p>
- Disable all output of the program. Implies <tt>--exit-code</tt>.
+ Disable all output of the program. Implies <code>--exit-code</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1711,12 +1709,12 @@ line per changed file.</p></div>
<div class="paragraph"><p>An output line is formatted this way:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>in-place edit :100644 100644 bcd1234... 0123456... M file0
+<pre><code>in-place edit :100644 100644 bcd1234... 0123456... M file0
copy-edit :100644 100644 abcd123... 1234567... C68 file1 file2
rename-edit :100644 100644 abcd123... 1234567... R86 file1 file3
create :000000 100644 0000000... 1234567... A file4
delete :100644 000000 1234567... 0000000... D file5
-unmerged :000000 000000 0000000... 0000000... U file6</tt></pre>
+unmerged :000000 000000 0000000... 0000000... U file6</code></pre>
</div></div>
<div class="paragraph"><p>That is, from the left to the right:</p></div>
<div class="olist arabic"><ol class="arabic">
@@ -1848,10 +1846,10 @@ and it is out of sync with the index.</p></div>
<div class="paragraph"><p>Example:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>:100644 100644 5be4a4...... 000000...... M file.c</tt></pre>
+<pre><code>:100644 100644 5be4a4...... 000000...... M file.c</code></pre>
</div></div>
-<div class="paragraph"><p>When <tt>-z</tt> option is not used, TAB, LF, and backslash characters
-in pathnames are represented as <tt>\t</tt>, <tt>\n</tt>, and <tt>\\</tt>,
+<div class="paragraph"><p>When <code>-z</code> option is not used, TAB, LF, and backslash characters
+in pathnames are represented as <code>\t</code>, <code>\n</code>, and <code>\\</code>,
respectively.</p></div>
</div>
</div>
@@ -1892,7 +1890,7 @@ single path, only for "dst"
<div class="paragraph"><p>Example:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>::100644 100644 100644 fabadb8... cc95eb0... 4866510... MM describe.c</tt></pre>
+<pre><code>::100644 100644 100644 fabadb8... cc95eb0... 4866510... MM describe.c</code></pre>
</div></div>
<div class="paragraph"><p>Note that <em>combined diff</em> lists only files which were modified from
all parents.</p></div>
@@ -1916,12 +1914,12 @@ It is preceded with a "git diff" header that looks like this:
</p>
<div class="literalblock">
<div class="content">
-<pre><tt>diff --git a/file1 b/file2</tt></pre>
+<pre><code>diff --git a/file1 b/file2</code></pre>
</div></div>
-<div class="paragraph"><p>The <tt>a/</tt> and <tt>b/</tt> filenames are the same unless rename/copy is
+<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,
-<tt>/dev/null</tt> is <em>not</em> used in place of the <tt>a/</tt> or <tt>b/</tt> filenames.</p></div>
-<div class="paragraph"><p>When rename/copy is involved, <tt>file1</tt> and <tt>file2</tt> show the
+<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
name of the source file of the rename/copy and the name of
the file that rename/copy produces, respectively.</p></div>
</li>
@@ -1931,7 +1929,7 @@ It is followed by one or more extended header lines:
</p>
<div class="literalblock">
<div class="content">
-<pre><tt>old mode &lt;mode&gt;
+<pre><code>old mode &lt;mode&gt;
new mode &lt;mode&gt;
deleted file mode &lt;mode&gt;
new file mode &lt;mode&gt;
@@ -1941,11 +1939,11 @@ rename from &lt;path&gt;
rename to &lt;path&gt;
similarity index &lt;number&gt;
dissimilarity index &lt;number&gt;
-index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</tt></pre>
+index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</code></pre>
</div></div>
<div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type
and file permission bits.</p></div>
-<div class="paragraph"><p>Path names in extended headers do not include the <tt>a/</tt> and <tt>b/</tt> prefixes.</p></div>
+<div class="paragraph"><p>Path names in extended headers do not include the <code>a/</code> and <code>b/</code> prefixes.</p></div>
<div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and
the dissimilarity index is the percentage of changed lines. It
is a rounded down integer, followed by a percent sign. The
@@ -1959,26 +1957,26 @@ separate lines indicate the old and the new mode.</p></div>
<li>
<p>
TAB, LF, double quote and backslash characters in pathnames
- are represented as <tt>\t</tt>, <tt>\n</tt>, <tt>\"</tt> and <tt>\\</tt>, respectively.
+ are represented as <code>\t</code>, <code>\n</code>, <code>\"</code> and <code>\\</code>, respectively.
If there is need for such substitution then the whole
pathname is put in double quotes.
</p>
</li>
<li>
<p>
-All the <tt>file1</tt> files in the output refer to files before the
- commit, and all the <tt>file2</tt> files refer to files after the commit.
+All the <code>file1</code> files in the output refer to files before the
+ commit, and all the <code>file2</code> files refer to files after the commit.
It is incorrect to apply each change to each file sequentially. For
example, this patch will swap a and b:
</p>
<div class="literalblock">
<div class="content">
-<pre><tt>diff --git a/a b/b
+<pre><code>diff --git a/a b/b
rename from a
rename to b
diff --git a/b b/a
rename from b
-rename to a</tt></pre>
+rename to a</code></pre>
</div></div>
</li>
</ol></div>
@@ -1987,7 +1985,7 @@ rename to a</tt></pre>
<div class="sect1">
<h2 id="_combined_diff_format">combined diff format</h2>
<div class="sectionbody">
-<div class="paragraph"><p>Any diff-generating command can take the &#8216;-c` or <tt>--cc</tt> option to
+<div class="paragraph"><p>Any diff-generating command can take the &#8216;-c` or <code>--cc</code> option to
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 the `-m&#8217; option to any
@@ -1996,7 +1994,7 @@ of a merge.</p></div>
<div class="paragraph"><p>A <em>combined diff</em> format looks like this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>diff --combined describe.c
+<pre><code>diff --combined describe.c
index fabadb8,cc95eb0..4866510
--- a/describe.c
+++ b/describe.c
@@ -2022,7 +2020,7 @@ index fabadb8,cc95eb0..4866510
+
if (!initialized) {
initialized = 1;
- for_each_ref(get_name);</tt></pre>
+ for_each_ref(get_name);</code></pre>
</div></div>
<div class="olist arabic"><ol class="arabic">
<li>
@@ -2032,12 +2030,12 @@ It is preceded with a "git diff" header, that looks like
</p>
<div class="literalblock">
<div class="content">
-<pre><tt>diff --combined file</tt></pre>
+<pre><code>diff --combined file</code></pre>
</div></div>
<div class="paragraph"><p>or like this (when <em>--cc</em> option is used):</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>diff --cc file</tt></pre>
+<pre><code>diff --cc file</code></pre>
</div></div>
</li>
<li>
@@ -2047,12 +2045,12 @@ It is followed by one or more extended header lines
</p>
<div class="literalblock">
<div class="content">
-<pre><tt>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
+<pre><code>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;
new file mode &lt;mode&gt;
-deleted file mode &lt;mode&gt;,&lt;mode&gt;</tt></pre>
+deleted file mode &lt;mode&gt;,&lt;mode&gt;</code></pre>
</div></div>
-<div class="paragraph"><p>The <tt>mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;</tt> line appears only if at least one of
+<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
@@ -2064,49 +2062,49 @@ It is followed by two-line from-file/to-file header
</p>
<div class="literalblock">
<div class="content">
-<pre><tt>--- a/file
-+++ b/file</tt></pre>
+<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
-format, <tt>/dev/null</tt> is used to signal created or deleted
+format, <code>/dev/null</code> is used to signal created or deleted
files.</p></div>
</li>
<li>
<p>
Chunk header format is modified to prevent people from
- accidentally feeding it to <tt>patch -p1</tt>. Combined diff format
+ accidentally feeding it to <code>patch -p1</code>. Combined diff format
was created for review of merge commit changes, and was not
meant for apply. The change is similar to the change in the
extended <em>index</em> header:
</p>
<div class="literalblock">
<div class="content">
-<pre><tt>@@@ &lt;from-file-range&gt; &lt;from-file-range&gt; &lt;to-file-range&gt; @@@</tt></pre>
+<pre><code>@@@ &lt;from-file-range&gt; &lt;from-file-range&gt; &lt;to-file-range&gt; @@@</code></pre>
</div></div>
-<div class="paragraph"><p>There are (number of parents + 1) <tt>@</tt> characters in the chunk
+<div class="paragraph"><p>There are (number of parents + 1) <code>@</code> characters in the chunk
header for combined diff format.</p></div>
</li>
</ol></div>
<div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two
-files A and B with a single column that has <tt>-</tt> (minus&#8201;&#8212;&#8201;appears in A but removed in B), <tt>+</tt> (plus&#8201;&#8212;&#8201;missing in A but
-added to B), or <tt>" "</tt> (space&#8201;&#8212;&#8201;unchanged) prefix, this format
+files A and B with a single column that has <code>-</code> (minus&#8201;&#8212;&#8201;appears in A but removed in B), <code>+</code> (plus&#8201;&#8212;&#8201;missing in A but
+added to B), or <code>" "</code> (space&#8201;&#8212;&#8201;unchanged) prefix, this format
compares two or more files file1, file2,&#8230; with one file X, and
shows how X differs from each of fileN. One column for each of
fileN is prepended to the output line to note how X&#8217;s line is
different from it.</p></div>
-<div class="paragraph"><p>A <tt>-</tt> character in the column N means that the line appears in
-fileN but it does not appear in the result. A <tt>+</tt> character
+<div class="paragraph"><p>A <code>-</code> character in the column N means that the line appears in
+fileN but it does not appear in the result. A <code>+</code> character
in the column N means that the line appears in the result,
and fileN does not have that line (in other words, the line was
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 <tt>-</tt> removals from both file1 and
-file2, plus <tt>++</tt> to mean one line that was added does not appear
+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
-from file1 but do not appear in file2 (hence prefixed with <tt>+</tt>).</p></div>
-<div class="paragraph"><p>When shown by <tt>git diff-tree -c</tt>, it compares the parents of a
+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
-parents). When shown by <tt>git diff-files -c</tt>, it compares the
+parents). When shown by <code>git diff-files -c</code>, it compares the
two unresolved merge parents with the working tree file
(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
"their version").</p></div>
@@ -2115,25 +2113,25 @@ two unresolved merge parents with the working tree file
<div class="sect1">
<h2 id="_other_diff_formats">other diff formats</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The <tt>--summary</tt> option describes newly added, deleted, renamed and
-copied files. The <tt>--stat</tt> option adds diffstat(1) graph to the
+<div class="paragraph"><p>The <code>--summary</code> option describes newly added, deleted, renamed and
+copied files. The <code>--stat</code> option adds diffstat(1) graph to the
output. These options can be combined with other options, such as
-<tt>-p</tt>, and are meant for human consumption.</p></div>
-<div class="paragraph"><p>When showing a change that involves a rename or a copy, <tt>--stat</tt> output
+<code>-p</code>, and are meant for human consumption.</p></div>
+<div class="paragraph"><p>When showing a change that involves a rename or a copy, <code>--stat</code> output
formats the pathnames compactly by combining common prefix and suffix of
-the pathnames. For example, a change that moves <tt>arch/i386/Makefile</tt> to
-<tt>arch/x86/Makefile</tt> while modifying 4 lines will be shown like this:</p></div>
+the pathnames. For example, a change that moves <code>arch/i386/Makefile</code> to
+<code>arch/x86/Makefile</code> while modifying 4 lines will be shown like this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>arch/{i386 =&gt; x86}/Makefile | 4 +--</tt></pre>
+<pre><code>arch/{i386 =&gt; x86}/Makefile | 4 +--</code></pre>
</div></div>
-<div class="paragraph"><p>The <tt>--numstat</tt> option gives the diffstat(1) information but is designed
-for easier machine consumption. An entry in <tt>--numstat</tt> output looks
+<div class="paragraph"><p>The <code>--numstat</code> option gives the diffstat(1) information but is designed
+for easier machine consumption. An entry in <code>--numstat</code> output looks
like this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>1 2 README
-3 1 arch/{i386 =&gt; x86}/Makefile</tt></pre>
+<pre><code>1 2 README
+3 1 arch/{i386 =&gt; x86}/Makefile</code></pre>
</div></div>
<div class="paragraph"><p>That is, from left to right:</p></div>
<div class="olist arabic"><ol class="arabic">
@@ -2168,11 +2166,11 @@ a newline.
</p>
</li>
</ol></div>
-<div class="paragraph"><p>When <tt>-z</tt> output option is in effect, the output is formatted this way:</p></div>
+<div class="paragraph"><p>When <code>-z</code> output option is in effect, the output is formatted this way:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>1 2 README NUL
-3 1 NUL arch/i386/Makefile NUL arch/x86/Makefile NUL</tt></pre>
+<pre><code>1 2 README NUL
+3 1 NUL arch/i386/Makefile NUL arch/x86/Makefile NUL</code></pre>
</div></div>
<div class="paragraph"><p>That is:</p></div>
<div class="olist arabic"><ol class="arabic">
@@ -2222,11 +2220,11 @@ a NUL.
</p>
</li>
</ol></div>
-<div class="paragraph"><p>The extra <tt>NUL</tt> before the preimage path in renamed case is to allow
+<div class="paragraph"><p>The extra <code>NUL</code> before the preimage path in renamed case is to allow
scripts that read the output to tell if the current record being read is
a single-path record or a rename/copy record without reading ahead.
-After reading added and deleted lines, reading up to <tt>NUL</tt> would yield
-the pathname, but if that is <tt>NUL</tt>, the record will show two paths.</p></div>
+After reading added and deleted lines, reading up to <code>NUL</code> would yield
+the pathname, but if that is <code>NUL</code>, the record will show two paths.</p></div>
</div>
</div>
<div class="sect1">
@@ -2244,8 +2242,8 @@ of these operations are very useful indeed.</p></div>
<div class="paragraph"><p>If <em>--cached</em> is specified, it allows you to ask:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>show me the differences between HEAD and the current index
-contents (the ones I'd write using 'git write-tree')</tt></pre>
+<pre><code>show me the differences between HEAD and the current index
+contents (the ones I'd write using 'git write-tree')</code></pre>
</div></div>
<div class="paragraph"><p>For example, let&#8217;s say that you have worked on your working directory, updated
some files in the index and are ready to commit. You want to see exactly
@@ -2253,23 +2251,23 @@ some files in the index and are ready to commit. You want to see exactly
object and compare it that way, and to do that, you just do</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>git diff-index --cached HEAD</tt></pre>
+<pre><code>git diff-index --cached HEAD</code></pre>
</div></div>
-<div class="paragraph"><p>Example: let&#8217;s say I had renamed <tt>commit.c</tt> to <tt>git-commit.c</tt>, and I had
-done an <tt>update-index</tt> to make that effective in the index file.
-<tt>git diff-files</tt> wouldn&#8217;t show anything at all, since the index file
+<div class="paragraph"><p>Example: let&#8217;s say I had renamed <code>commit.c</code> to <code>git-commit.c</code>, and I had
+done an <code>update-index</code> to make that effective in the index file.
+<code>git diff-files</code> wouldn&#8217;t show anything at all, since the index file
matches my working directory. But doing a <em>git diff-index</em> does:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>torvalds@ppc970:~/git&gt; git diff-index --cached HEAD
+<pre><code>torvalds@ppc970:~/git&gt; git diff-index --cached HEAD
-100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 commit.c
-+100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 git-commit.c</tt></pre>
++100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 git-commit.c</code></pre>
</div></div>
<div class="paragraph"><p>You can see easily that the above is a rename.</p></div>
-<div class="paragraph"><p>In fact, <tt>git diff-index --cached</tt> <strong>should</strong> always be entirely equivalent to
+<div class="paragraph"><p>In fact, <code>git diff-index --cached</code> <strong>should</strong> always be entirely equivalent to
actually doing a <em>git write-tree</em> and comparing that. Except this one is much
nicer for the case where you just want to check where you are.</p></div>
-<div class="paragraph"><p>So doing a <tt>git diff-index --cached</tt> is basically very useful when you are
+<div class="paragraph"><p>So doing a <code>git diff-index --cached</code> is basically very useful when you are
asking yourself "what have I already marked for being committed, and
what&#8217;s the difference to a previous tree".</p></div>
</div>
@@ -2283,23 +2281,23 @@ a <em>git write-tree</em> + <em>git diff-tree</em>. Thus that&#8217;s the defaul
The non-cached version asks the question:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>show me the differences between HEAD and the currently checked out
-tree - index contents _and_ files that aren't up-to-date</tt></pre>
+<pre><code>show me the differences between HEAD and the currently checked out
+tree - index contents _and_ files that aren't up-to-date</code></pre>
</div></div>
<div class="paragraph"><p>which is obviously a very useful question too, since that tells you what
you <strong>could</strong> commit. Again, the output matches the <em>git diff-tree -r</em>
output to a tee, but with a twist.</p></div>
<div class="paragraph"><p>The twist is that if some file doesn&#8217;t match the index, we don&#8217;t have
a backing store thing for it, and we use the magic "all-zero" sha1 to
-show that. So let&#8217;s say that you have edited <tt>kernel/sched.c</tt>, but
+show that. So let&#8217;s say that you have edited <code>kernel/sched.c</code>, but
have not actually done a <em>git update-index</em> on it yet - there is no
"object" associated with the new state, and you get:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>torvalds@ppc970:~/v2.6/linux&gt; git diff-index --abbrev HEAD
-:100644 100664 7476bb... 000000... kernel/sched.c</tt></pre>
+<pre><code>torvalds@ppc970:~/v2.6/linux&gt; git diff-index --abbrev HEAD
+:100644 100664 7476bb... 000000... kernel/sched.c</code></pre>
</div></div>
-<div class="paragraph"><p>i.e., it shows that the tree has changed, and that <tt>kernel/sched.c</tt> has is
+<div class="paragraph"><p>i.e., it shows that the tree has changed, and that <code>kernel/sched.c</code> has is
not up-to-date and may contain new stuff. The all-zero sha1 means that to
get the real diff, you need to look at the object in the working directory
directly rather than do an object-to-object diff.</p></div>
@@ -2310,7 +2308,7 @@ directly rather than do an object-to-object diff.</p></div>
</td>
<td class="content">As with other commands of this type, <em>git diff-index</em> does not
actually look at the contents of the file at all. So maybe
-<tt>kernel/sched.c</tt> hasn&#8217;t actually changed, and it&#8217;s just that you
+<code>kernel/sched.c</code> hasn&#8217;t actually changed, and it&#8217;s just that you
touched it. In either case, it&#8217;s a note that you need to
<em>git update-index</em> it to make the index be in sync.</td>
</tr></table>