Autogenerated HTML docs for v1.7.4-rc2-20-g8c0db6
[git/jnareb-git.git] / git-diff-tree.html
blob382447a55a401b6f013d312f4c3135a2d95d9715
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <meta name="generator" content="AsciiDoc 8.4.5" />
7 <title>git-diff-tree(1)</title>
8 <style type="text/css">
9 /* Debug borders */
10 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
12 border: 1px solid red;
16 body {
17 margin: 1em 5% 1em 5%;
20 a {
21 color: blue;
22 text-decoration: underline;
24 a:visited {
25 color: fuchsia;
28 em {
29 font-style: italic;
30 color: navy;
33 strong {
34 font-weight: bold;
35 color: #083194;
38 tt {
39 color: navy;
42 h1, h2, h3, h4, h5, h6 {
43 color: #527bbd;
44 font-family: sans-serif;
45 margin-top: 1.2em;
46 margin-bottom: 0.5em;
47 line-height: 1.3;
50 h1, h2, h3 {
51 border-bottom: 2px solid silver;
53 h2 {
54 padding-top: 0.5em;
56 h3 {
57 float: left;
59 h3 + * {
60 clear: left;
63 div.sectionbody {
64 font-family: serif;
65 margin-left: 0;
68 hr {
69 border: 1px solid silver;
72 p {
73 margin-top: 0.5em;
74 margin-bottom: 0.5em;
77 ul, ol, li > p {
78 margin-top: 0;
81 pre {
82 padding: 0;
83 margin: 0;
86 span#author {
87 color: #527bbd;
88 font-family: sans-serif;
89 font-weight: bold;
90 font-size: 1.1em;
92 span#email {
94 span#revnumber, span#revdate, span#revremark {
95 font-family: sans-serif;
98 div#footer {
99 font-family: sans-serif;
100 font-size: small;
101 border-top: 2px solid silver;
102 padding-top: 0.5em;
103 margin-top: 4.0em;
105 div#footer-text {
106 float: left;
107 padding-bottom: 0.5em;
109 div#footer-badges {
110 float: right;
111 padding-bottom: 0.5em;
114 div#preamble {
115 margin-top: 1.5em;
116 margin-bottom: 1.5em;
118 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
119 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
120 div.admonitionblock {
121 margin-top: 1.5em;
122 margin-bottom: 1.5em;
124 div.admonitionblock {
125 margin-top: 2.5em;
126 margin-bottom: 2.5em;
129 div.content { /* Block element content. */
130 padding: 0;
133 /* Block element titles. */
134 div.title, caption.title {
135 color: #527bbd;
136 font-family: sans-serif;
137 font-weight: bold;
138 text-align: left;
139 margin-top: 1.0em;
140 margin-bottom: 0.5em;
142 div.title + * {
143 margin-top: 0;
146 td div.title:first-child {
147 margin-top: 0.0em;
149 div.content div.title:first-child {
150 margin-top: 0.0em;
152 div.content + div.title {
153 margin-top: 0.0em;
156 div.sidebarblock > div.content {
157 background: #ffffee;
158 border: 1px solid silver;
159 padding: 0.5em;
162 div.listingblock > div.content {
163 border: 1px solid silver;
164 background: #f4f4f4;
165 padding: 0.5em;
168 div.quoteblock {
169 padding-left: 2.0em;
170 margin-right: 10%;
172 div.quoteblock > div.attribution {
173 padding-top: 0.5em;
174 text-align: right;
177 div.verseblock {
178 padding-left: 2.0em;
179 margin-right: 10%;
181 div.verseblock > div.content {
182 white-space: pre;
184 div.verseblock > div.attribution {
185 padding-top: 0.75em;
186 text-align: left;
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div.verseblock + div.attribution {
190 text-align: left;
193 div.admonitionblock .icon {
194 vertical-align: top;
195 font-size: 1.1em;
196 font-weight: bold;
197 text-decoration: underline;
198 color: #527bbd;
199 padding-right: 0.5em;
201 div.admonitionblock td.content {
202 padding-left: 0.5em;
203 border-left: 2px solid silver;
206 div.exampleblock > div.content {
207 border-left: 2px solid silver;
208 padding: 0.5em;
211 div.imageblock div.content { padding-left: 0; }
212 span.image img { border-style: none; }
213 a.image:visited { color: white; }
215 dl {
216 margin-top: 0.8em;
217 margin-bottom: 0.8em;
219 dt {
220 margin-top: 0.5em;
221 margin-bottom: 0;
222 font-style: normal;
223 color: navy;
225 dd > *:first-child {
226 margin-top: 0.1em;
229 ul, ol {
230 list-style-position: outside;
232 ol.arabic {
233 list-style-type: decimal;
235 ol.loweralpha {
236 list-style-type: lower-alpha;
238 ol.upperalpha {
239 list-style-type: upper-alpha;
241 ol.lowerroman {
242 list-style-type: lower-roman;
244 ol.upperroman {
245 list-style-type: upper-roman;
248 div.compact ul, div.compact ol,
249 div.compact p, div.compact p,
250 div.compact div, div.compact div {
251 margin-top: 0.1em;
252 margin-bottom: 0.1em;
255 div.tableblock > table {
256 border: 3px solid #527bbd;
258 thead {
259 font-family: sans-serif;
260 font-weight: bold;
262 tfoot {
263 font-weight: bold;
265 td > div.verse {
266 white-space: pre;
268 p.table {
269 margin-top: 0;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div.tableblock > table[frame="void"] {
273 border-style: none;
275 div.tableblock > table[frame="hsides"] {
276 border-left-style: none;
277 border-right-style: none;
279 div.tableblock > table[frame="vsides"] {
280 border-top-style: none;
281 border-bottom-style: none;
285 div.hdlist {
286 margin-top: 0.8em;
287 margin-bottom: 0.8em;
289 div.hdlist tr {
290 padding-bottom: 15px;
292 dt.hdlist1.strong, td.hdlist1.strong {
293 font-weight: bold;
295 td.hdlist1 {
296 vertical-align: top;
297 font-style: normal;
298 padding-right: 0.8em;
299 color: navy;
301 td.hdlist2 {
302 vertical-align: top;
304 div.hdlist.compact tr {
305 margin: 0;
306 padding-bottom: 0;
309 .comment {
310 background: yellow;
313 @media print {
314 div#footer-badges { display: none; }
317 div#toctitle {
318 color: #527bbd;
319 font-family: sans-serif;
320 font-size: 1.1em;
321 font-weight: bold;
322 margin-top: 1.0em;
323 margin-bottom: 0.1em;
326 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
327 margin-top: 0;
328 margin-bottom: 0;
330 div.toclevel2 {
331 margin-left: 2em;
332 font-size: 0.9em;
334 div.toclevel3 {
335 margin-left: 4em;
336 font-size: 0.9em;
338 div.toclevel4 {
339 margin-left: 6em;
340 font-size: 0.9em;
342 /* Overrides for manpage documents */
343 h1 {
344 padding-top: 0.5em;
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver;
347 border-bottom: 2px solid silver;
349 h2 {
350 border-style: none;
352 div.sectionbody {
353 margin-left: 5%;
356 @media print {
357 div#toc { display: none; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div.sidebar-content {
363 background: #ffffee;
364 border: 1px solid silver;
365 padding: 0.5em;
367 div.sidebar-title, div.image-title {
368 color: #527bbd;
369 font-family: sans-serif;
370 font-weight: bold;
371 margin-top: 0.0em;
372 margin-bottom: 0.5em;
375 div.listingblock div.content {
376 border: 1px solid silver;
377 background: #f4f4f4;
378 padding: 0.5em;
381 div.quoteblock-attribution {
382 padding-top: 0.5em;
383 text-align: right;
386 div.verseblock-content {
387 white-space: pre;
389 div.verseblock-attribution {
390 padding-top: 0.75em;
391 text-align: left;
394 div.exampleblock-content {
395 border-left: 2px solid silver;
396 padding-left: 0.5em;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc a:visited { color: blue; }
401 </style>
402 </head>
403 <body>
404 <div id="header">
405 <h1>
406 git-diff-tree(1) Manual Page
407 </h1>
408 <h2>NAME</h2>
409 <div class="sectionbody">
410 <p>git-diff-tree -
411 Compares the content and mode of blobs found via two tree objects
412 </p>
413 </div>
414 </div>
415 <h2 id="_synopsis">SYNOPSIS</h2>
416 <div class="sectionbody">
417 <div class="verseblock">
418 <div class="verseblock-content"><em>git diff-tree</em> [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty]
419 [-t] [-r] [-c | --cc] [--root] [&lt;common diff options&gt;]
420 &lt;tree-ish&gt; [&lt;tree-ish&gt;] [&lt;path&gt;&#8230;]</div>
421 <div class="verseblock-attribution">
422 </div></div>
423 </div>
424 <h2 id="_description">DESCRIPTION</h2>
425 <div class="sectionbody">
426 <div class="paragraph"><p>Compares the content and mode of the blobs found via two tree objects.</p></div>
427 <div class="paragraph"><p>If there is only one &lt;tree-ish&gt; given, the commit is compared with its parents
428 (see --stdin below).</p></div>
429 <div class="paragraph"><p>Note that <em>git diff-tree</em> can use the tree encapsulated in a commit object.</p></div>
430 </div>
431 <h2 id="_options">OPTIONS</h2>
432 <div class="sectionbody">
433 <div class="dlist"><dl>
434 <dt class="hdlist1">
436 </dt>
437 <dt class="hdlist1">
439 </dt>
440 <dt class="hdlist1">
441 --patch
442 </dt>
443 <dd>
445 Generate patch (see section on generating patches).
447 </p>
448 </dd>
449 <dt class="hdlist1">
450 -U&lt;n&gt;
451 </dt>
452 <dt class="hdlist1">
453 --unified=&lt;n&gt;
454 </dt>
455 <dd>
457 Generate diffs with &lt;n&gt; lines of context instead of
458 the usual three.
459 Implies <tt>-p</tt>.
460 </p>
461 </dd>
462 <dt class="hdlist1">
463 --raw
464 </dt>
465 <dd>
467 Generate the raw format.
468 This is the default.
469 </p>
470 </dd>
471 <dt class="hdlist1">
472 --patch-with-raw
473 </dt>
474 <dd>
476 Synonym for <tt>-p --raw</tt>.
477 </p>
478 </dd>
479 <dt class="hdlist1">
480 --patience
481 </dt>
482 <dd>
484 Generate a diff using the "patience diff" algorithm.
485 </p>
486 </dd>
487 <dt class="hdlist1">
488 --stat[=&lt;width&gt;[,&lt;name-width&gt;]]
489 </dt>
490 <dd>
492 Generate a diffstat. You can override the default
493 output width for 80-column terminal by <tt>--stat=&lt;width&gt;</tt>.
494 The width of the filename part can be controlled by
495 giving another width to it separated by a comma.
496 </p>
497 </dd>
498 <dt class="hdlist1">
499 --numstat
500 </dt>
501 <dd>
503 Similar to <tt>--stat</tt>, but shows number of added and
504 deleted lines in decimal notation and pathname without
505 abbreviation, to make it more machine friendly. For
506 binary files, outputs two <tt>-</tt> instead of saying
507 <tt>0 0</tt>.
508 </p>
509 </dd>
510 <dt class="hdlist1">
511 --shortstat
512 </dt>
513 <dd>
515 Output only the last line of the <tt>--stat</tt> format containing total
516 number of modified files, as well as number of added and deleted
517 lines.
518 </p>
519 </dd>
520 <dt class="hdlist1">
521 --dirstat[=&lt;limit&gt;]
522 </dt>
523 <dd>
525 Output the distribution of relative amount of changes (number of lines added or
526 removed) for each sub-directory. Directories with changes below
527 a cut-off percent (3% by default) are not shown. The cut-off percent
528 can be set with <tt>--dirstat=&lt;limit&gt;</tt>. Changes in a child directory are not
529 counted for the parent directory, unless <tt>--cumulative</tt> is used.
530 </p>
531 </dd>
532 <dt class="hdlist1">
533 --dirstat-by-file[=&lt;limit&gt;]
534 </dt>
535 <dd>
537 Same as <tt>--dirstat</tt>, but counts changed files instead of lines.
538 </p>
539 </dd>
540 <dt class="hdlist1">
541 --summary
542 </dt>
543 <dd>
545 Output a condensed summary of extended header information
546 such as creations, renames and mode changes.
547 </p>
548 </dd>
549 <dt class="hdlist1">
550 --patch-with-stat
551 </dt>
552 <dd>
554 Synonym for <tt>-p --stat</tt>.
555 </p>
556 </dd>
557 <dt class="hdlist1">
559 </dt>
560 <dd>
562 When <tt>--raw</tt>, <tt>--numstat</tt>, <tt>--name-only</tt> or <tt>--name-status</tt> has been
563 given, do not munge pathnames and use NULs as output field terminators.
564 </p>
565 <div class="paragraph"><p>Without this option, each pathname output will have TAB, LF, double quotes,
566 and backslash characters replaced with <tt>\t</tt>, <tt>\n</tt>, <tt>\"</tt>, and <tt>\\</tt>,
567 respectively, and the pathname will be enclosed in double quotes if
568 any of those replacements occurred.</p></div>
569 </dd>
570 <dt class="hdlist1">
571 --name-only
572 </dt>
573 <dd>
575 Show only names of changed files.
576 </p>
577 </dd>
578 <dt class="hdlist1">
579 --name-status
580 </dt>
581 <dd>
583 Show only names and status of changed files. See the description
584 of the <tt>--diff-filter</tt> option on what the status letters mean.
585 </p>
586 </dd>
587 <dt class="hdlist1">
588 --submodule[=&lt;format&gt;]
589 </dt>
590 <dd>
592 Chose the output format for submodule differences. &lt;format&gt; can be one of
593 <em>short</em> and <em>log</em>. <em>short</em> just shows pairs of commit names, this format
594 is used when this option is not given. <em>log</em> is the default value for this
595 option and lists the commits in that commit range like the <em>summary</em>
596 option of <a href="git-submodule.html">git-submodule(1)</a> does.
597 </p>
598 </dd>
599 <dt class="hdlist1">
600 --color[=&lt;when&gt;]
601 </dt>
602 <dd>
604 Show colored diff.
605 The value must be always (the default), never, or auto.
606 </p>
607 </dd>
608 <dt class="hdlist1">
609 --no-color
610 </dt>
611 <dd>
613 Turn off colored diff, even when the configuration file
614 gives the default to color output.
615 Same as <tt>--color=never</tt>.
616 </p>
617 </dd>
618 <dt class="hdlist1">
619 --word-diff[=&lt;mode&gt;]
620 </dt>
621 <dd>
623 Show a word diff, using the &lt;mode&gt; to delimit changed words.
624 By default, words are delimited by whitespace; see
625 <tt>--word-diff-regex</tt> below. The &lt;mode&gt; defaults to <em>plain</em>, and
626 must be one of:
627 </p>
628 <div class="dlist"><dl>
629 <dt class="hdlist1">
630 color
631 </dt>
632 <dd>
634 Highlight changed words using only colors. Implies <tt>--color</tt>.
635 </p>
636 </dd>
637 <dt class="hdlist1">
638 plain
639 </dt>
640 <dd>
642 Show words as <tt>[-removed-]</tt> and <tt>{<tt>added</tt>}</tt>. Makes no
643 attempts to escape the delimiters if they appear in the input,
644 so the output may be ambiguous.
645 </p>
646 </dd>
647 <dt class="hdlist1">
648 porcelain
649 </dt>
650 <dd>
652 Use a special line-based format intended for script
653 consumption. Added/removed/unchanged runs are printed in the
654 usual unified diff format, starting with a <tt>+</tt>/<tt>-</tt>/` `
655 character at the beginning of the line and extending to the
656 end of the line. Newlines in the input are represented by a
657 tilde <tt>~</tt> on a line of its own.
658 </p>
659 </dd>
660 <dt class="hdlist1">
661 none
662 </dt>
663 <dd>
665 Disable word diff again.
666 </p>
667 </dd>
668 </dl></div>
669 <div class="paragraph"><p>Note that despite the name of the first mode, color is used to
670 highlight the changed parts in all modes if enabled.</p></div>
671 </dd>
672 <dt class="hdlist1">
673 --word-diff-regex=&lt;regex&gt;
674 </dt>
675 <dd>
677 Use &lt;regex&gt; to decide what a word is, instead of considering
678 runs of non-whitespace to be a word. Also implies
679 <tt>--word-diff</tt> unless it was already enabled.
680 </p>
681 <div class="paragraph"><p>Every non-overlapping match of the
682 &lt;regex&gt; is considered a word. Anything between these matches is
683 considered whitespace and ignored(!) for the purposes of finding
684 differences. You may want to append <tt>|[^[:space:]]</tt> to your regular
685 expression to make sure that it matches all non-whitespace characters.
686 A match that contains a newline is silently truncated(!) at the
687 newline.</p></div>
688 <div class="paragraph"><p>The regex can also be set via a diff driver or configuration option, see
689 <a href="gitattributes.html">gitattributes(1)</a> or <a href="git-config.html">git-config(1)</a>. Giving it explicitly
690 overrides any diff driver or configuration setting. Diff drivers
691 override configuration settings.</p></div>
692 </dd>
693 <dt class="hdlist1">
694 --color-words[=&lt;regex&gt;]
695 </dt>
696 <dd>
698 Equivalent to <tt>--word-diff=color</tt> plus (if a regex was
699 specified) <tt>--word-diff-regex=&lt;regex&gt;</tt>.
700 </p>
701 </dd>
702 <dt class="hdlist1">
703 --no-renames
704 </dt>
705 <dd>
707 Turn off rename detection, even when the configuration
708 file gives the default to do so.
709 </p>
710 </dd>
711 <dt class="hdlist1">
712 --check
713 </dt>
714 <dd>
716 Warn if changes introduce trailing whitespace
717 or an indent that uses a space before a tab. Exits with
718 non-zero status if problems are found. Not compatible with
719 --exit-code.
720 </p>
721 </dd>
722 <dt class="hdlist1">
723 --full-index
724 </dt>
725 <dd>
727 Instead of the first handful of characters, show the full
728 pre- and post-image blob object names on the "index"
729 line when generating patch format output.
730 </p>
731 </dd>
732 <dt class="hdlist1">
733 --binary
734 </dt>
735 <dd>
737 In addition to <tt>--full-index</tt>, output a binary diff that
738 can be applied with <tt>git-apply</tt>.
739 </p>
740 </dd>
741 <dt class="hdlist1">
742 --abbrev[=&lt;n&gt;]
743 </dt>
744 <dd>
746 Instead of showing the full 40-byte hexadecimal object
747 name in diff-raw format output and diff-tree header
748 lines, show only a partial prefix. This is
749 independent of the <tt>--full-index</tt> option above, which controls
750 the diff-patch output format. Non default number of
751 digits can be specified with <tt>--abbrev=&lt;n&gt;</tt>.
752 </p>
753 </dd>
754 <dt class="hdlist1">
755 -B[&lt;n&gt;][/&lt;m&gt;]
756 </dt>
757 <dt class="hdlist1">
758 --break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]
759 </dt>
760 <dd>
762 Break complete rewrite changes into pairs of delete and
763 create. This serves two purposes:
764 </p>
765 <div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file
766 not as a series of deletion and insertion mixed together with a very
767 few lines that happen to match textually as the context, but as a
768 single deletion of everything old followed by a single insertion of
769 everything new, and the number <tt>m</tt> controls this aspect of the -B
770 option (defaults to 60%). <tt>-B/70%</tt> specifies that less than 30% of the
771 original should remain in the result for git to consider it a total
772 rewrite (i.e. otherwise the resulting patch will be a series of
773 deletion and insertion mixed together with context lines).</p></div>
774 <div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
775 source of a rename (usually -M only considers a file that disappeared
776 as the source of a rename), and the number <tt>n</tt> controls this aspect of
777 the -B option (defaults to 50%). <tt>-B20%</tt> specifies that a change with
778 addition and deletion compared to 20% or more of the file&#8217;s size are
779 eligible for being picked up as a possible source of a rename to
780 another file.</p></div>
781 </dd>
782 <dt class="hdlist1">
783 -M[&lt;n&gt;]
784 </dt>
785 <dt class="hdlist1">
786 --find-renames[=&lt;n&gt;]
787 </dt>
788 <dd>
790 Detect renames.
791 If <tt>n</tt> is specified, it is a is a threshold on the similarity
792 index (i.e. amount of addition/deletions compared to the
793 file&#8217;s size). For example, <tt>-M90%</tt> means git should consider a
794 delete/add pair to be a rename if more than 90% of the file
795 hasn&#8217;t changed.
796 </p>
797 </dd>
798 <dt class="hdlist1">
799 -C[&lt;n&gt;]
800 </dt>
801 <dt class="hdlist1">
802 --find-copies[=&lt;n&gt;]
803 </dt>
804 <dd>
806 Detect copies as well as renames. See also <tt>--find-copies-harder</tt>.
807 If <tt>n</tt> is specified, it has the same meaning as for <tt>-M&lt;n&gt;</tt>.
808 </p>
809 </dd>
810 <dt class="hdlist1">
811 --find-copies-harder
812 </dt>
813 <dd>
815 For performance reasons, by default, <tt>-C</tt> option finds copies only
816 if the original file of the copy was modified in the same
817 changeset. This flag makes the command
818 inspect unmodified files as candidates for the source of
819 copy. This is a very expensive operation for large
820 projects, so use it with caution. Giving more than one
821 <tt>-C</tt> option has the same effect.
822 </p>
823 </dd>
824 <dt class="hdlist1">
825 -l&lt;num&gt;
826 </dt>
827 <dd>
829 The <tt>-M</tt> and <tt>-C</tt> options require O(n^2) processing time where n
830 is the number of potential rename/copy targets. This
831 option prevents rename/copy detection from running if
832 the number of rename/copy targets exceeds the specified
833 number.
834 </p>
835 </dd>
836 <dt class="hdlist1">
837 --diff-filter=[(A|C|D|M|R|T|U|X|B)&#8230;[*]]
838 </dt>
839 <dd>
841 Select only files that are Added (<tt>A</tt>), Copied (<tt>C</tt>),
842 Deleted (<tt>D</tt>), Modified (<tt>M</tt>), Renamed (<tt>R</tt>), have their
843 type (i.e. regular file, symlink, submodule, &#8230;) changed (<tt>T</tt>),
844 are Unmerged (<tt>U</tt>), are
845 Unknown (<tt>X</tt>), or have had their pairing Broken (<tt>B</tt>).
846 Any combination of the filter characters (including none) can be used.
847 When <tt>*</tt> (All-or-none) is added to the combination, all
848 paths are selected if there is any file that matches
849 other criteria in the comparison; if there is no file
850 that matches other criteria, nothing is selected.
851 </p>
852 </dd>
853 <dt class="hdlist1">
854 -S&lt;string&gt;
855 </dt>
856 <dd>
858 Look for differences that introduce or remove an instance of
859 &lt;string&gt;. Note that this is different than the string simply
860 appearing in diff output; see the <em>pickaxe</em> entry in
861 <a href="gitdiffcore.html">gitdiffcore(7)</a> for more details.
862 </p>
863 </dd>
864 <dt class="hdlist1">
865 -G&lt;regex&gt;
866 </dt>
867 <dd>
869 Look for differences whose added or removed line matches
870 the given &lt;regex&gt;.
871 </p>
872 </dd>
873 <dt class="hdlist1">
874 --pickaxe-all
875 </dt>
876 <dd>
878 When <tt>-S</tt> or <tt>-G</tt> finds a change, show all the changes in that
879 changeset, not just the files that contain the change
880 in &lt;string&gt;.
881 </p>
882 </dd>
883 <dt class="hdlist1">
884 --pickaxe-regex
885 </dt>
886 <dd>
888 Make the &lt;string&gt; not a plain string but an extended POSIX
889 regex to match.
890 </p>
891 </dd>
892 <dt class="hdlist1">
893 -O&lt;orderfile&gt;
894 </dt>
895 <dd>
897 Output the patch in the order specified in the
898 &lt;orderfile&gt;, which has one shell glob pattern per line.
899 </p>
900 </dd>
901 <dt class="hdlist1">
903 </dt>
904 <dd>
906 Swap two inputs; that is, show differences from index or
907 on-disk file to tree contents.
908 </p>
909 </dd>
910 <dt class="hdlist1">
911 --relative[=&lt;path&gt;]
912 </dt>
913 <dd>
915 When run from a subdirectory of the project, it can be
916 told to exclude changes outside the directory and show
917 pathnames relative to it with this option. When you are
918 not in a subdirectory (e.g. in a bare repository), you
919 can name which subdirectory to make the output relative
920 to by giving a &lt;path&gt; as an argument.
921 </p>
922 </dd>
923 <dt class="hdlist1">
925 </dt>
926 <dt class="hdlist1">
927 --text
928 </dt>
929 <dd>
931 Treat all files as text.
932 </p>
933 </dd>
934 <dt class="hdlist1">
935 --ignore-space-at-eol
936 </dt>
937 <dd>
939 Ignore changes in whitespace at EOL.
940 </p>
941 </dd>
942 <dt class="hdlist1">
944 </dt>
945 <dt class="hdlist1">
946 --ignore-space-change
947 </dt>
948 <dd>
950 Ignore changes in amount of whitespace. This ignores whitespace
951 at line end, and considers all other sequences of one or
952 more whitespace characters to be equivalent.
953 </p>
954 </dd>
955 <dt class="hdlist1">
957 </dt>
958 <dt class="hdlist1">
959 --ignore-all-space
960 </dt>
961 <dd>
963 Ignore whitespace when comparing lines. This ignores
964 differences even if one line has whitespace where the other
965 line has none.
966 </p>
967 </dd>
968 <dt class="hdlist1">
969 --inter-hunk-context=&lt;lines&gt;
970 </dt>
971 <dd>
973 Show the context between diff hunks, up to the specified number
974 of lines, thereby fusing hunks that are close to each other.
975 </p>
976 </dd>
977 <dt class="hdlist1">
978 --exit-code
979 </dt>
980 <dd>
982 Make the program exit with codes similar to diff(1).
983 That is, it exits with 1 if there were differences and
984 0 means no differences.
985 </p>
986 </dd>
987 <dt class="hdlist1">
988 --quiet
989 </dt>
990 <dd>
992 Disable all output of the program. Implies <tt>--exit-code</tt>.
993 </p>
994 </dd>
995 <dt class="hdlist1">
996 --ext-diff
997 </dt>
998 <dd>
1000 Allow an external diff helper to be executed. If you set an
1001 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
1002 to use this option with <a href="git-log.html">git-log(1)</a> and friends.
1003 </p>
1004 </dd>
1005 <dt class="hdlist1">
1006 --no-ext-diff
1007 </dt>
1008 <dd>
1010 Disallow external diff drivers.
1011 </p>
1012 </dd>
1013 <dt class="hdlist1">
1014 --ignore-submodules[=&lt;when&gt;]
1015 </dt>
1016 <dd>
1018 Ignore changes to submodules in the diff generation. &lt;when&gt; can be
1019 either "none", "untracked", "dirty" or "all", which is the default
1020 Using "none" will consider the submodule modified when it either contains
1021 untracked or modified files or its HEAD differs from the commit recorded
1022 in the superproject and can be used to override any settings of the
1023 <em>ignore</em> option in <a href="git-config.html">git-config(1)</a> or <a href="gitmodules.html">gitmodules(5)</a>. When
1024 "untracked" is used submodules are not considered dirty when they only
1025 contain untracked content (but they are still scanned for modified
1026 content). Using "dirty" ignores all changes to the work tree of submodules,
1027 only changes to the commits stored in the superproject are shown (this was
1028 the behavior until 1.7.0). Using "all" hides all changes to submodules.
1029 </p>
1030 </dd>
1031 <dt class="hdlist1">
1032 --src-prefix=&lt;prefix&gt;
1033 </dt>
1034 <dd>
1036 Show the given source prefix instead of "a/".
1037 </p>
1038 </dd>
1039 <dt class="hdlist1">
1040 --dst-prefix=&lt;prefix&gt;
1041 </dt>
1042 <dd>
1044 Show the given destination prefix instead of "b/".
1045 </p>
1046 </dd>
1047 <dt class="hdlist1">
1048 --no-prefix
1049 </dt>
1050 <dd>
1052 Do not show any source or destination prefix.
1053 </p>
1054 </dd>
1055 </dl></div>
1056 <div class="paragraph"><p>For more detailed explanation on these common options, see also
1057 <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div>
1058 <div class="dlist"><dl>
1059 <dt class="hdlist1">
1060 &lt;tree-ish&gt;
1061 </dt>
1062 <dd>
1064 The id of a tree object.
1065 </p>
1066 </dd>
1067 <dt class="hdlist1">
1068 &lt;path&gt;&#8230;
1069 </dt>
1070 <dd>
1072 If provided, the results are limited to a subset of files
1073 matching one of these prefix strings.
1074 i.e., file matches <tt>/^&lt;pattern1&gt;|&lt;pattern2&gt;|&#8230;/</tt>
1075 Note that this parameter does not provide any wildcard or regexp
1076 features.
1077 </p>
1078 </dd>
1079 <dt class="hdlist1">
1081 </dt>
1082 <dd>
1084 recurse into sub-trees
1085 </p>
1086 </dd>
1087 <dt class="hdlist1">
1089 </dt>
1090 <dd>
1092 show tree entry itself as well as subtrees. Implies -r.
1093 </p>
1094 </dd>
1095 <dt class="hdlist1">
1096 --root
1097 </dt>
1098 <dd>
1100 When <em>--root</em> is specified the initial commit will be shown as a big
1101 creation event. This is equivalent to a diff against the NULL tree.
1102 </p>
1103 </dd>
1104 <dt class="hdlist1">
1105 --stdin
1106 </dt>
1107 <dd>
1109 When <em>--stdin</em> is specified, the command does not take
1110 &lt;tree-ish&gt; arguments from the command line. Instead, it
1111 reads lines containing either two &lt;tree&gt;, one &lt;commit&gt;, or a
1112 list of &lt;commit&gt; from its standard input. (Use a single space
1113 as separator.)
1114 </p>
1115 <div class="paragraph"><p>When two trees are given, it compares the first tree with the second.
1116 When a single commit is given, it compares the commit with its
1117 parents. The remaining commits, when given, are used as if they are
1118 parents of the first commit.</p></div>
1119 <div class="paragraph"><p>When comparing two trees, the ID of both trees (separated by a space
1120 and terminated by a newline) is printed before the difference. When
1121 comparing commits, the ID of the first (or only) commit, followed by a
1122 newline, is printed.</p></div>
1123 <div class="paragraph"><p>The following flags further affect the behavior when comparing
1124 commits (but not trees).</p></div>
1125 </dd>
1126 <dt class="hdlist1">
1128 </dt>
1129 <dd>
1131 By default, <em>git diff-tree --stdin</em> does not show
1132 differences for merge commits. With this flag, it shows
1133 differences to that commit from all of its parents. See
1134 also <em>-c</em>.
1135 </p>
1136 </dd>
1137 <dt class="hdlist1">
1139 </dt>
1140 <dd>
1142 By default, <em>git diff-tree --stdin</em> shows differences,
1143 either in machine-readable form (without <em>-p</em>) or in patch
1144 form (with <em>-p</em>). This output can be suppressed. It is
1145 only useful with <em>-v</em> flag.
1146 </p>
1147 </dd>
1148 <dt class="hdlist1">
1150 </dt>
1151 <dd>
1153 This flag causes <em>git diff-tree --stdin</em> to also show
1154 the commit message before the differences.
1155 </p>
1156 </dd>
1157 <dt class="hdlist1">
1158 --pretty[=&lt;format&gt;]
1159 </dt>
1160 <dt class="hdlist1">
1161 --format=&lt;format&gt;
1162 </dt>
1163 <dd>
1165 Pretty-print the contents of the commit logs in a given format,
1166 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
1167 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:&lt;string&gt;</em>. See
1168 the "PRETTY FORMATS" section for some additional details for each
1169 format. When omitted, the format defaults to <em>medium</em>.
1170 </p>
1171 <div class="paragraph"><p>Note: you can specify the default pretty format in the repository
1172 configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
1173 </dd>
1174 <dt class="hdlist1">
1175 --abbrev-commit
1176 </dt>
1177 <dd>
1179 Instead of showing the full 40-byte hexadecimal commit object
1180 name, show only a partial prefix. Non default number of
1181 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
1182 diff output, if it is displayed).
1183 </p>
1184 <div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
1185 people using 80-column terminals.</p></div>
1186 </dd>
1187 <dt class="hdlist1">
1188 --oneline
1189 </dt>
1190 <dd>
1192 This is a shorthand for "--pretty=oneline --abbrev-commit"
1193 used together.
1194 </p>
1195 </dd>
1196 <dt class="hdlist1">
1197 --encoding[=&lt;encoding&gt;]
1198 </dt>
1199 <dd>
1201 The commit objects record the encoding used for the log message
1202 in their encoding header; this option can be used to tell the
1203 command to re-code the commit log message in the encoding
1204 preferred by the user. For non plumbing commands this
1205 defaults to UTF-8.
1206 </p>
1207 </dd>
1208 <dt class="hdlist1">
1209 --no-notes
1210 </dt>
1211 <dt class="hdlist1">
1212 --show-notes[=&lt;ref&gt;]
1213 </dt>
1214 <dd>
1216 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
1217 commit, when showing the commit log message. This is the default
1218 for <tt>git log</tt>, <tt>git show</tt> and <tt>git whatchanged</tt> commands when
1219 there is no <tt>--pretty</tt>, <tt>--format</tt> nor <tt>--oneline</tt> option is
1220 given on the command line.
1221 </p>
1222 <div class="paragraph"><p>With an optional argument, add this ref to the list of notes. The ref
1223 is taken to be in <tt>refs/notes/</tt> if it is not qualified.</p></div>
1224 </dd>
1225 <dt class="hdlist1">
1226 --[no-]standard-notes
1227 </dt>
1228 <dd>
1230 Enable or disable populating the notes ref list from the
1231 <em>core.notesRef</em> and <em>notes.displayRef</em> variables (or
1232 corresponding environment overrides). Enabled by default.
1233 See <a href="git-config.html">git-config(1)</a>.
1234 </p>
1235 </dd>
1236 <dt class="hdlist1">
1237 --no-commit-id
1238 </dt>
1239 <dd>
1241 <em>git diff-tree</em> outputs a line with the commit ID when
1242 applicable. This flag suppressed the commit ID output.
1243 </p>
1244 </dd>
1245 <dt class="hdlist1">
1247 </dt>
1248 <dd>
1250 This flag changes the way a merge commit is displayed
1251 (which means it is useful only when the command is given
1252 one &lt;tree-ish&gt;, or <em>--stdin</em>). It shows the differences
1253 from each of the parents to the merge result simultaneously
1254 instead of showing pairwise diff between a parent and the
1255 result one at a time (which is what the <em>-m</em> option does).
1256 Furthermore, it lists only files which were modified
1257 from all parents.
1258 </p>
1259 </dd>
1260 <dt class="hdlist1">
1261 --cc
1262 </dt>
1263 <dd>
1265 This flag changes the way a merge commit patch is displayed,
1266 in a similar way to the <em>-c</em> option. It implies the <em>-c</em>
1267 and <em>-p</em> options and further compresses the patch output
1268 by omitting uninteresting hunks whose the contents in the parents
1269 have only two variants and the merge result picks one of them
1270 without modification. When all hunks are uninteresting, the commit
1271 itself and the commit log message is not shown, just like in any other
1272 "empty diff" case.
1273 </p>
1274 </dd>
1275 <dt class="hdlist1">
1276 --always
1277 </dt>
1278 <dd>
1280 Show the commit itself and the commit log message even
1281 if the diff itself is empty.
1282 </p>
1283 </dd>
1284 </dl></div>
1285 </div>
1286 <h2 id="_pretty_formats">PRETTY FORMATS</h2>
1287 <div class="sectionbody">
1288 <div class="paragraph"><p>If the commit is a merge, and if the pretty-format
1289 is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
1290 inserted before the <em>Author:</em> line. This line begins with
1291 "Merge: " and the sha1s of ancestral commits are printed,
1292 separated by spaces. Note that the listed commits may not
1293 necessarily be the list of the <strong>direct</strong> parent commits if you
1294 have limited your view of history: for example, if you are
1295 only interested in changes related to a certain directory or
1296 file.</p></div>
1297 <div class="paragraph"><p>There are several built-in formats, and you can define
1298 additional formats by setting a pretty.&lt;name&gt;
1299 config option to either another format name, or a
1300 <em>format:</em> string, as described below (see
1301 <a href="git-config.html">git-config(1)</a>). Here are the details of the
1302 built-in formats:</p></div>
1303 <div class="ulist"><ul>
1304 <li>
1306 <em>oneline</em>
1307 </p>
1308 <div class="literalblock">
1309 <div class="content">
1310 <pre><tt>&lt;sha1&gt; &lt;title line&gt;</tt></pre>
1311 </div></div>
1312 <div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
1313 </li>
1314 <li>
1316 <em>short</em>
1317 </p>
1318 <div class="literalblock">
1319 <div class="content">
1320 <pre><tt>commit &lt;sha1&gt;
1321 Author: &lt;author&gt;</tt></pre>
1322 </div></div>
1323 <div class="literalblock">
1324 <div class="content">
1325 <pre><tt>&lt;title line&gt;</tt></pre>
1326 </div></div>
1327 </li>
1328 <li>
1330 <em>medium</em>
1331 </p>
1332 <div class="literalblock">
1333 <div class="content">
1334 <pre><tt>commit &lt;sha1&gt;
1335 Author: &lt;author&gt;
1336 Date: &lt;author date&gt;</tt></pre>
1337 </div></div>
1338 <div class="literalblock">
1339 <div class="content">
1340 <pre><tt>&lt;title line&gt;</tt></pre>
1341 </div></div>
1342 <div class="literalblock">
1343 <div class="content">
1344 <pre><tt>&lt;full commit message&gt;</tt></pre>
1345 </div></div>
1346 </li>
1347 <li>
1349 <em>full</em>
1350 </p>
1351 <div class="literalblock">
1352 <div class="content">
1353 <pre><tt>commit &lt;sha1&gt;
1354 Author: &lt;author&gt;
1355 Commit: &lt;committer&gt;</tt></pre>
1356 </div></div>
1357 <div class="literalblock">
1358 <div class="content">
1359 <pre><tt>&lt;title line&gt;</tt></pre>
1360 </div></div>
1361 <div class="literalblock">
1362 <div class="content">
1363 <pre><tt>&lt;full commit message&gt;</tt></pre>
1364 </div></div>
1365 </li>
1366 <li>
1368 <em>fuller</em>
1369 </p>
1370 <div class="literalblock">
1371 <div class="content">
1372 <pre><tt>commit &lt;sha1&gt;
1373 Author: &lt;author&gt;
1374 AuthorDate: &lt;author date&gt;
1375 Commit: &lt;committer&gt;
1376 CommitDate: &lt;committer date&gt;</tt></pre>
1377 </div></div>
1378 <div class="literalblock">
1379 <div class="content">
1380 <pre><tt>&lt;title line&gt;</tt></pre>
1381 </div></div>
1382 <div class="literalblock">
1383 <div class="content">
1384 <pre><tt>&lt;full commit message&gt;</tt></pre>
1385 </div></div>
1386 </li>
1387 <li>
1389 <em>email</em>
1390 </p>
1391 <div class="literalblock">
1392 <div class="content">
1393 <pre><tt>From &lt;sha1&gt; &lt;date&gt;
1394 From: &lt;author&gt;
1395 Date: &lt;author date&gt;
1396 Subject: [PATCH] &lt;title line&gt;</tt></pre>
1397 </div></div>
1398 <div class="literalblock">
1399 <div class="content">
1400 <pre><tt>&lt;full commit message&gt;</tt></pre>
1401 </div></div>
1402 </li>
1403 <li>
1405 <em>raw</em>
1406 </p>
1407 <div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
1408 stored in the commit object. Notably, the SHA1s are
1409 displayed in full, regardless of whether --abbrev or
1410 --no-abbrev are used, and <em>parents</em> information show the
1411 true parent commits, without taking grafts nor history
1412 simplification into account.</p></div>
1413 </li>
1414 <li>
1416 <em>format:&lt;string&gt;</em>
1417 </p>
1418 <div class="paragraph"><p>The <em>format:&lt;string&gt;</em> format allows you to specify which information
1419 you want to show. It works a little bit like printf format,
1420 with the notable exception that you get a newline with <em>%n</em>
1421 instead of <em>\n</em>.</p></div>
1422 <div class="paragraph"><p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was &gt;&gt;%s&lt;&lt;%n"</em>
1423 would show something like this:</p></div>
1424 <div class="listingblock">
1425 <div class="content">
1426 <pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago
1427 The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;</tt></pre>
1428 </div></div>
1429 <div class="paragraph"><p>The placeholders are:</p></div>
1430 <div class="ulist"><ul>
1431 <li>
1433 <em>%H</em>: commit hash
1434 </p>
1435 </li>
1436 <li>
1438 <em>%h</em>: abbreviated commit hash
1439 </p>
1440 </li>
1441 <li>
1443 <em>%T</em>: tree hash
1444 </p>
1445 </li>
1446 <li>
1448 <em>%t</em>: abbreviated tree hash
1449 </p>
1450 </li>
1451 <li>
1453 <em>%P</em>: parent hashes
1454 </p>
1455 </li>
1456 <li>
1458 <em>%p</em>: abbreviated parent hashes
1459 </p>
1460 </li>
1461 <li>
1463 <em>%an</em>: author name
1464 </p>
1465 </li>
1466 <li>
1468 <em>%aN</em>: author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
1469 </p>
1470 </li>
1471 <li>
1473 <em>%ae</em>: author email
1474 </p>
1475 </li>
1476 <li>
1478 <em>%aE</em>: author email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
1479 </p>
1480 </li>
1481 <li>
1483 <em>%ad</em>: author date (format respects --date= option)
1484 </p>
1485 </li>
1486 <li>
1488 <em>%aD</em>: author date, RFC2822 style
1489 </p>
1490 </li>
1491 <li>
1493 <em>%ar</em>: author date, relative
1494 </p>
1495 </li>
1496 <li>
1498 <em>%at</em>: author date, UNIX timestamp
1499 </p>
1500 </li>
1501 <li>
1503 <em>%ai</em>: author date, ISO 8601 format
1504 </p>
1505 </li>
1506 <li>
1508 <em>%cn</em>: committer name
1509 </p>
1510 </li>
1511 <li>
1513 <em>%cN</em>: committer name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
1514 </p>
1515 </li>
1516 <li>
1518 <em>%ce</em>: committer email
1519 </p>
1520 </li>
1521 <li>
1523 <em>%cE</em>: committer email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
1524 </p>
1525 </li>
1526 <li>
1528 <em>%cd</em>: committer date
1529 </p>
1530 </li>
1531 <li>
1533 <em>%cD</em>: committer date, RFC2822 style
1534 </p>
1535 </li>
1536 <li>
1538 <em>%cr</em>: committer date, relative
1539 </p>
1540 </li>
1541 <li>
1543 <em>%ct</em>: committer date, UNIX timestamp
1544 </p>
1545 </li>
1546 <li>
1548 <em>%ci</em>: committer date, ISO 8601 format
1549 </p>
1550 </li>
1551 <li>
1553 <em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
1554 </p>
1555 </li>
1556 <li>
1558 <em>%e</em>: encoding
1559 </p>
1560 </li>
1561 <li>
1563 <em>%s</em>: subject
1564 </p>
1565 </li>
1566 <li>
1568 <em>%f</em>: sanitized subject line, suitable for a filename
1569 </p>
1570 </li>
1571 <li>
1573 <em>%b</em>: body
1574 </p>
1575 </li>
1576 <li>
1578 <em>%B</em>: raw body (unwrapped subject and body)
1579 </p>
1580 </li>
1581 <li>
1583 <em>%N</em>: commit notes
1584 </p>
1585 </li>
1586 <li>
1588 <em>%gD</em>: reflog selector, e.g., <tt>refs/stash@{1}</tt>
1589 </p>
1590 </li>
1591 <li>
1593 <em>%gd</em>: shortened reflog selector, e.g., <tt>stash@{1}</tt>
1594 </p>
1595 </li>
1596 <li>
1598 <em>%gs</em>: reflog subject
1599 </p>
1600 </li>
1601 <li>
1603 <em>%Cred</em>: switch color to red
1604 </p>
1605 </li>
1606 <li>
1608 <em>%Cgreen</em>: switch color to green
1609 </p>
1610 </li>
1611 <li>
1613 <em>%Cblue</em>: switch color to blue
1614 </p>
1615 </li>
1616 <li>
1618 <em>%Creset</em>: reset color
1619 </p>
1620 </li>
1621 <li>
1623 <em>%C(&#8230;)</em>: color specification, as described in color.branch.* config option
1624 </p>
1625 </li>
1626 <li>
1628 <em>%m</em>: left, right or boundary mark
1629 </p>
1630 </li>
1631 <li>
1633 <em>%n</em>: newline
1634 </p>
1635 </li>
1636 <li>
1638 <em>%%</em>: a raw <em>%</em>
1639 </p>
1640 </li>
1641 <li>
1643 <em>%x00</em>: print a byte from a hex code
1644 </p>
1645 </li>
1646 <li>
1648 <em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>: switch line wrapping, like the -w option of
1649 <a href="git-shortlog.html">git-shortlog(1)</a>.
1650 </p>
1651 </li>
1652 </ul></div>
1653 </li>
1654 </ul></div>
1655 <div class="admonitionblock">
1656 <table><tr>
1657 <td class="icon">
1658 <div class="title">Note</div>
1659 </td>
1660 <td class="content">Some placeholders may depend on other options given to the
1661 revision traversal engine. For example, the <tt>%g*</tt> reflog options will
1662 insert an empty string unless we are traversing reflog entries (e.g., by
1663 <tt>git log -g</tt>). The <tt>%d</tt> placeholder will use the "short" decoration
1664 format if <tt>--decorate</tt> was not already provided on the command line.</td>
1665 </tr></table>
1666 </div>
1667 <div class="paragraph"><p>If you add a <tt>&#43;</tt> (plus sign) after <em>%</em> of a placeholder, a line-feed
1668 is inserted immediately before the expansion if and only if the
1669 placeholder expands to a non-empty string.</p></div>
1670 <div class="paragraph"><p>If you add a <tt>-</tt> (minus sign) after <em>%</em> of a placeholder, line-feeds that
1671 immediately precede the expansion are deleted if and only if the
1672 placeholder expands to an empty string.</p></div>
1673 <div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
1674 is inserted immediately before the expansion if and only if the
1675 placeholder expands to a non-empty string.</p></div>
1676 <div class="ulist"><ul>
1677 <li>
1679 <em>tformat:</em>
1680 </p>
1681 <div class="paragraph"><p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
1682 provides "terminator" semantics instead of "separator" semantics. In
1683 other words, each commit has the message terminator character (usually a
1684 newline) appended, rather than a separator placed between entries.
1685 This means that the final entry of a single-line format will be properly
1686 terminated with a new line, just as the "oneline" format does.
1687 For example:</p></div>
1688 <div class="listingblock">
1689 <div class="content">
1690 <pre><tt>$ git log -2 --pretty=format:%h 4da45bef \
1691 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
1692 4da45be
1693 7134973 -- NO NEWLINE
1695 $ git log -2 --pretty=tformat:%h 4da45bef \
1696 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
1697 4da45be
1698 7134973</tt></pre>
1699 </div></div>
1700 <div class="paragraph"><p>In addition, any unrecognized string that has a <tt>%</tt> in it is interpreted
1701 as if it has <tt>tformat:</tt> in front of it. For example, these two are
1702 equivalent:</p></div>
1703 <div class="listingblock">
1704 <div class="content">
1705 <pre><tt>$ git log -2 --pretty=tformat:%h 4da45bef
1706 $ git log -2 --pretty=%h 4da45bef</tt></pre>
1707 </div></div>
1708 </li>
1709 </ul></div>
1710 </div>
1711 <h2 id="_limiting_output">Limiting Output</h2>
1712 <div class="sectionbody">
1713 <div class="paragraph"><p>If you&#8217;re only interested in differences in a subset of files, for
1714 example some architecture-specific files, you might do:</p></div>
1715 <div class="literalblock">
1716 <div class="content">
1717 <pre><tt>git diff-tree -r &lt;tree-ish&gt; &lt;tree-ish&gt; arch/ia64 include/asm-ia64</tt></pre>
1718 </div></div>
1719 <div class="paragraph"><p>and it will only show you what changed in those two directories.</p></div>
1720 <div class="paragraph"><p>Or if you are searching for what changed in just <tt>kernel/sched.c</tt>, just do</p></div>
1721 <div class="literalblock">
1722 <div class="content">
1723 <pre><tt>git diff-tree -r &lt;tree-ish&gt; &lt;tree-ish&gt; kernel/sched.c</tt></pre>
1724 </div></div>
1725 <div class="paragraph"><p>and it will ignore all differences to other files.</p></div>
1726 <div class="paragraph"><p>The pattern is always the prefix, and is matched exactly. There are no
1727 wildcards. Even stricter, it has to match a complete path component.
1728 I.e. "foo" does not pick up <tt>foobar.h</tt>. "foo" does match <tt>foo/bar.h</tt>
1729 so it can be used to name subdirectories.</p></div>
1730 <div class="paragraph"><p>An example of normal usage is:</p></div>
1731 <div class="literalblock">
1732 <div class="content">
1733 <pre><tt>torvalds@ppc970:~/git&gt; git diff-tree 5319e4......
1734 *100664-&gt;100664 blob ac348b.......-&gt;a01513....... git-fsck-objects.c</tt></pre>
1735 </div></div>
1736 <div class="paragraph"><p>which tells you that the last commit changed just one file (it&#8217;s from
1737 this one:</p></div>
1738 <div class="listingblock">
1739 <div class="content">
1740 <pre><tt>commit 3c6f7ca19ad4043e9e72fa94106f352897e651a8
1741 tree 5319e4d609cdd282069cc4dce33c1db559539b03
1742 parent b4e628ea30d5ab3606119d2ea5caeab141d38df7
1743 author Linus Torvalds &lt;torvalds@ppc970.osdl.org&gt; Sat Apr 9 12:02:30 2005
1744 committer Linus Torvalds &lt;torvalds@ppc970.osdl.org&gt; Sat Apr 9 12:02:30 2005
1746 Make "git-fsck-objects" print out all the root commits it finds.
1748 Once I do the reference tracking, I'll also make it print out all the
1749 HEAD commits it finds, which is even more interesting.</tt></pre>
1750 </div></div>
1751 <div class="paragraph"><p>in case you care).</p></div>
1752 </div>
1753 <h2 id="_raw_output_format">Raw output format</h2>
1754 <div class="sectionbody">
1755 <div class="paragraph"><p>The raw output format from "git-diff-index", "git-diff-tree",
1756 "git-diff-files" and "git diff --raw" are very similar.</p></div>
1757 <div class="paragraph"><p>These commands all compare two sets of things; what is
1758 compared differs:</p></div>
1759 <div class="dlist"><dl>
1760 <dt class="hdlist1">
1761 git-diff-index &lt;tree-ish&gt;
1762 </dt>
1763 <dd>
1765 compares the &lt;tree-ish&gt; and the files on the filesystem.
1766 </p>
1767 </dd>
1768 <dt class="hdlist1">
1769 git-diff-index --cached &lt;tree-ish&gt;
1770 </dt>
1771 <dd>
1773 compares the &lt;tree-ish&gt; and the index.
1774 </p>
1775 </dd>
1776 <dt class="hdlist1">
1777 git-diff-tree [-r] &lt;tree-ish-1&gt; &lt;tree-ish-2&gt; [&lt;pattern&gt;&#8230;]
1778 </dt>
1779 <dd>
1781 compares the trees named by the two arguments.
1782 </p>
1783 </dd>
1784 <dt class="hdlist1">
1785 git-diff-files [&lt;pattern&gt;&#8230;]
1786 </dt>
1787 <dd>
1789 compares the index and the files on the filesystem.
1790 </p>
1791 </dd>
1792 </dl></div>
1793 <div class="paragraph"><p>The "git-diff-tree" command begins its output by printing the hash of
1794 what is being compared. After that, all the commands print one output
1795 line per changed file.</p></div>
1796 <div class="paragraph"><p>An output line is formatted this way:</p></div>
1797 <div class="listingblock">
1798 <div class="content">
1799 <pre><tt>in-place edit :100644 100644 bcd1234... 0123456... M file0
1800 copy-edit :100644 100644 abcd123... 1234567... C68 file1 file2
1801 rename-edit :100644 100644 abcd123... 1234567... R86 file1 file3
1802 create :000000 100644 0000000... 1234567... A file4
1803 delete :100644 000000 1234567... 0000000... D file5
1804 unmerged :000000 000000 0000000... 0000000... U file6</tt></pre>
1805 </div></div>
1806 <div class="paragraph"><p>That is, from the left to the right:</p></div>
1807 <div class="olist arabic"><ol class="arabic">
1808 <li>
1810 a colon.
1811 </p>
1812 </li>
1813 <li>
1815 mode for "src"; 000000 if creation or unmerged.
1816 </p>
1817 </li>
1818 <li>
1820 a space.
1821 </p>
1822 </li>
1823 <li>
1825 mode for "dst"; 000000 if deletion or unmerged.
1826 </p>
1827 </li>
1828 <li>
1830 a space.
1831 </p>
1832 </li>
1833 <li>
1835 sha1 for "src"; 0{40} if creation or unmerged.
1836 </p>
1837 </li>
1838 <li>
1840 a space.
1841 </p>
1842 </li>
1843 <li>
1845 sha1 for "dst"; 0{40} if creation, unmerged or "look at work tree".
1846 </p>
1847 </li>
1848 <li>
1850 a space.
1851 </p>
1852 </li>
1853 <li>
1855 status, followed by optional "score" number.
1856 </p>
1857 </li>
1858 <li>
1860 a tab or a NUL when <em>-z</em> option is used.
1861 </p>
1862 </li>
1863 <li>
1865 path for "src"
1866 </p>
1867 </li>
1868 <li>
1870 a tab or a NUL when <em>-z</em> option is used; only exists for C or R.
1871 </p>
1872 </li>
1873 <li>
1875 path for "dst"; only exists for C or R.
1876 </p>
1877 </li>
1878 <li>
1880 an LF or a NUL when <em>-z</em> option is used, to terminate the record.
1881 </p>
1882 </li>
1883 </ol></div>
1884 <div class="paragraph"><p>Possible status letters are:</p></div>
1885 <div class="ulist"><ul>
1886 <li>
1888 A: addition of a file
1889 </p>
1890 </li>
1891 <li>
1893 C: copy of a file into a new one
1894 </p>
1895 </li>
1896 <li>
1898 D: deletion of a file
1899 </p>
1900 </li>
1901 <li>
1903 M: modification of the contents or mode of a file
1904 </p>
1905 </li>
1906 <li>
1908 R: renaming of a file
1909 </p>
1910 </li>
1911 <li>
1913 T: change in the type of the file
1914 </p>
1915 </li>
1916 <li>
1918 U: file is unmerged (you must complete the merge before it can
1919 be committed)
1920 </p>
1921 </li>
1922 <li>
1924 X: "unknown" change type (most probably a bug, please report it)
1925 </p>
1926 </li>
1927 </ul></div>
1928 <div class="paragraph"><p>Status letters C and R are always followed by a score (denoting the
1929 percentage of similarity between the source and target of the move or
1930 copy), and are the only ones to be so.</p></div>
1931 <div class="paragraph"><p>&lt;sha1&gt; is shown as all 0&#8217;s if a file is new on the filesystem
1932 and it is out of sync with the index.</p></div>
1933 <div class="paragraph"><p>Example:</p></div>
1934 <div class="listingblock">
1935 <div class="content">
1936 <pre><tt>:100644 100644 5be4a4...... 000000...... M file.c</tt></pre>
1937 </div></div>
1938 <div class="paragraph"><p>When <tt>-z</tt> option is not used, TAB, LF, and backslash characters
1939 in pathnames are represented as <tt>\t</tt>, <tt>\n</tt>, and <tt>\\</tt>,
1940 respectively.</p></div>
1941 </div>
1942 <h2 id="_diff_format_for_merges">diff format for merges</h2>
1943 <div class="sectionbody">
1944 <div class="paragraph"><p>"git-diff-tree", "git-diff-files" and "git-diff --raw"
1945 can take <em>-c</em> or <em>--cc</em> option
1946 to generate diff output also for merge commits. The output differs
1947 from the format described above in the following way:</p></div>
1948 <div class="olist arabic"><ol class="arabic">
1949 <li>
1951 there is a colon for each parent
1952 </p>
1953 </li>
1954 <li>
1956 there are more "src" modes and "src" sha1
1957 </p>
1958 </li>
1959 <li>
1961 status is concatenated status characters for each parent
1962 </p>
1963 </li>
1964 <li>
1966 no optional "score" number
1967 </p>
1968 </li>
1969 <li>
1971 single path, only for "dst"
1972 </p>
1973 </li>
1974 </ol></div>
1975 <div class="paragraph"><p>Example:</p></div>
1976 <div class="listingblock">
1977 <div class="content">
1978 <pre><tt>::100644 100644 100644 fabadb8... cc95eb0... 4866510... MM describe.c</tt></pre>
1979 </div></div>
1980 <div class="paragraph"><p>Note that <em>combined diff</em> lists only files which were modified from
1981 all parents.</p></div>
1982 </div>
1983 <h2 id="_generating_patches_with_p">Generating patches with -p</h2>
1984 <div class="sectionbody">
1985 <div class="paragraph"><p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
1986 with a <em>-p</em> option, "git diff" without the <em>--raw</em> option, or
1987 "git log" with the "-p" option, they
1988 do not produce the output described above; instead they produce a
1989 patch file. You can customize the creation of such patches via the
1990 GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.</p></div>
1991 <div class="paragraph"><p>What the -p option produces is slightly different from the traditional
1992 diff format:</p></div>
1993 <div class="olist arabic"><ol class="arabic">
1994 <li>
1996 It is preceded with a "git diff" header that looks like this:
1997 </p>
1998 <div class="literalblock">
1999 <div class="content">
2000 <pre><tt>diff --git a/file1 b/file2</tt></pre>
2001 </div></div>
2002 <div class="paragraph"><p>The <tt>a/</tt> and <tt>b/</tt> filenames are the same unless rename/copy is
2003 involved. Especially, even for a creation or a deletion,
2004 <tt>/dev/null</tt> is <em>not</em> used in place of the <tt>a/</tt> or <tt>b/</tt> filenames.</p></div>
2005 <div class="paragraph"><p>When rename/copy is involved, <tt>file1</tt> and <tt>file2</tt> show the
2006 name of the source file of the rename/copy and the name of
2007 the file that rename/copy produces, respectively.</p></div>
2008 </li>
2009 <li>
2011 It is followed by one or more extended header lines:
2012 </p>
2013 <div class="literalblock">
2014 <div class="content">
2015 <pre><tt>old mode &lt;mode&gt;
2016 new mode &lt;mode&gt;
2017 deleted file mode &lt;mode&gt;
2018 new file mode &lt;mode&gt;
2019 copy from &lt;path&gt;
2020 copy to &lt;path&gt;
2021 rename from &lt;path&gt;
2022 rename to &lt;path&gt;
2023 similarity index &lt;number&gt;
2024 dissimilarity index &lt;number&gt;
2025 index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</tt></pre>
2026 </div></div>
2027 <div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type
2028 and file permission bits.</p></div>
2029 <div class="paragraph"><p>Path names in extended headers do not include the <tt>a/</tt> and <tt>b/</tt> prefixes.</p></div>
2030 <div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and
2031 the dissimilarity index is the percentage of changed lines. It
2032 is a rounded down integer, followed by a percent sign. The
2033 similarity index value of 100% is thus reserved for two equal
2034 files, while 100% dissimilarity means that no line from the old
2035 file made it into the new one.</p></div>
2036 <div class="paragraph"><p>The index line includes the SHA-1 checksum before and after the change.
2037 The &lt;mode&gt; is included if the file mode does not change; otherwise,
2038 separate lines indicate the old and the new mode.</p></div>
2039 </li>
2040 <li>
2042 TAB, LF, double quote and backslash characters in pathnames
2043 are represented as <tt>\t</tt>, <tt>\n</tt>, <tt>\"</tt> and <tt>\\</tt>, respectively.
2044 If there is need for such substitution then the whole
2045 pathname is put in double quotes.
2046 </p>
2047 </li>
2048 <li>
2050 All the <tt>file1</tt> files in the output refer to files before the
2051 commit, and all the <tt>file2</tt> files refer to files after the commit.
2052 It is incorrect to apply each change to each file sequentially. For
2053 example, this patch will swap a and b:
2054 </p>
2055 <div class="literalblock">
2056 <div class="content">
2057 <pre><tt>diff --git a/a b/b
2058 rename from a
2059 rename to b
2060 diff --git a/b b/a
2061 rename from b
2062 rename to a</tt></pre>
2063 </div></div>
2064 </li>
2065 </ol></div>
2066 </div>
2067 <h2 id="_combined_diff_format">combined diff format</h2>
2068 <div class="sectionbody">
2069 <div class="paragraph"><p>"git-diff-tree", "git-diff-files" and "git-diff" can take <em>-c</em> or
2070 <em>--cc</em> option to produce <em>combined diff</em>. For showing a merge commit
2071 with "git log -p", this is the default format; you can force showing
2072 full diff with the <em>-m</em> option.
2073 A <em>combined diff</em> format looks like this:</p></div>
2074 <div class="listingblock">
2075 <div class="content">
2076 <pre><tt>diff --combined describe.c
2077 index fabadb8,cc95eb0..4866510
2078 --- a/describe.c
2079 +++ b/describe.c
2080 @@@ -98,20 -98,12 +98,20 @@@
2081 return (a_date &gt; b_date) ? -1 : (a_date == b_date) ? 0 : 1;
2084 - static void describe(char *arg)
2085 -static void describe(struct commit *cmit, int last_one)
2086 ++static void describe(char *arg, int last_one)
2088 + unsigned char sha1[20];
2089 + struct commit *cmit;
2090 struct commit_list *list;
2091 static int initialized = 0;
2092 struct commit_name *n;
2094 + if (get_sha1(arg, sha1) &lt; 0)
2095 + usage(describe_usage);
2096 + cmit = lookup_commit_reference(sha1);
2097 + if (!cmit)
2098 + usage(describe_usage);
2100 if (!initialized) {
2101 initialized = 1;
2102 for_each_ref(get_name);</tt></pre>
2103 </div></div>
2104 <div class="olist arabic"><ol class="arabic">
2105 <li>
2107 It is preceded with a "git diff" header, that looks like
2108 this (when <em>-c</em> option is used):
2109 </p>
2110 <div class="literalblock">
2111 <div class="content">
2112 <pre><tt>diff --combined file</tt></pre>
2113 </div></div>
2114 <div class="paragraph"><p>or like this (when <em>--cc</em> option is used):</p></div>
2115 <div class="literalblock">
2116 <div class="content">
2117 <pre><tt>diff --cc file</tt></pre>
2118 </div></div>
2119 </li>
2120 <li>
2122 It is followed by one or more extended header lines
2123 (this example shows a merge with two parents):
2124 </p>
2125 <div class="literalblock">
2126 <div class="content">
2127 <pre><tt>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
2128 mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;
2129 new file mode &lt;mode&gt;
2130 deleted file mode &lt;mode&gt;,&lt;mode&gt;</tt></pre>
2131 </div></div>
2132 <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
2133 the &lt;mode&gt; is different from the rest. Extended headers with
2134 information about detected contents movement (renames and
2135 copying detection) are designed to work with diff of two
2136 &lt;tree-ish&gt; and are not used by combined diff format.</p></div>
2137 </li>
2138 <li>
2140 It is followed by two-line from-file/to-file header
2141 </p>
2142 <div class="literalblock">
2143 <div class="content">
2144 <pre><tt>--- a/file
2145 +++ b/file</tt></pre>
2146 </div></div>
2147 <div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff
2148 format, <tt>/dev/null</tt> is used to signal created or deleted
2149 files.</p></div>
2150 </li>
2151 <li>
2153 Chunk header format is modified to prevent people from
2154 accidentally feeding it to <tt>patch -p1</tt>. Combined diff format
2155 was created for review of merge commit changes, and was not
2156 meant for apply. The change is similar to the change in the
2157 extended <em>index</em> header:
2158 </p>
2159 <div class="literalblock">
2160 <div class="content">
2161 <pre><tt>@@@ &lt;from-file-range&gt; &lt;from-file-range&gt; &lt;to-file-range&gt; @@@</tt></pre>
2162 </div></div>
2163 <div class="paragraph"><p>There are (number of parents + 1) <tt>@</tt> characters in the chunk
2164 header for combined diff format.</p></div>
2165 </li>
2166 </ol></div>
2167 <div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two
2168 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
2169 added to B), or <tt>" "</tt> (space&#8201;&#8212;&#8201;unchanged) prefix, this format
2170 compares two or more files file1, file2,&#8230; with one file X, and
2171 shows how X differs from each of fileN. One column for each of
2172 fileN is prepended to the output line to note how X&#8217;s line is
2173 different from it.</p></div>
2174 <div class="paragraph"><p>A <tt>-</tt> character in the column N means that the line appears in
2175 fileN but it does not appear in the result. A <tt>+</tt> character
2176 in the column N means that the line appears in the result,
2177 and fileN does not have that line (in other words, the line was
2178 added, from the point of view of that parent).</p></div>
2179 <div class="paragraph"><p>In the above example output, the function signature was changed
2180 from both files (hence two <tt>-</tt> removals from both file1 and
2181 file2, plus <tt>++</tt> to mean one line that was added does not appear
2182 in either file1 nor file2). Also eight other lines are the same
2183 from file1 but do not appear in file2 (hence prefixed with <tt>&#43;</tt>).</p></div>
2184 <div class="paragraph"><p>When shown by <tt>git diff-tree -c</tt>, it compares the parents of a
2185 merge commit with the merge result (i.e. file1..fileN are the
2186 parents). When shown by <tt>git diff-files -c</tt>, it compares the
2187 two unresolved merge parents with the working tree file
2188 (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
2189 "their version").</p></div>
2190 </div>
2191 <h2 id="_other_diff_formats">other diff formats</h2>
2192 <div class="sectionbody">
2193 <div class="paragraph"><p>The <tt>--summary</tt> option describes newly added, deleted, renamed and
2194 copied files. The <tt>--stat</tt> option adds diffstat(1) graph to the
2195 output. These options can be combined with other options, such as
2196 <tt>-p</tt>, and are meant for human consumption.</p></div>
2197 <div class="paragraph"><p>When showing a change that involves a rename or a copy, <tt>--stat</tt> output
2198 formats the pathnames compactly by combining common prefix and suffix of
2199 the pathnames. For example, a change that moves <tt>arch/i386/Makefile</tt> to
2200 <tt>arch/x86/Makefile</tt> while modifying 4 lines will be shown like this:</p></div>
2201 <div class="listingblock">
2202 <div class="content">
2203 <pre><tt>arch/{i386 =&gt; x86}/Makefile | 4 +--</tt></pre>
2204 </div></div>
2205 <div class="paragraph"><p>The <tt>--numstat</tt> option gives the diffstat(1) information but is designed
2206 for easier machine consumption. An entry in <tt>--numstat</tt> output looks
2207 like this:</p></div>
2208 <div class="listingblock">
2209 <div class="content">
2210 <pre><tt>1 2 README
2211 3 1 arch/{i386 =&gt; x86}/Makefile</tt></pre>
2212 </div></div>
2213 <div class="paragraph"><p>That is, from left to right:</p></div>
2214 <div class="olist arabic"><ol class="arabic">
2215 <li>
2217 the number of added lines;
2218 </p>
2219 </li>
2220 <li>
2222 a tab;
2223 </p>
2224 </li>
2225 <li>
2227 the number of deleted lines;
2228 </p>
2229 </li>
2230 <li>
2232 a tab;
2233 </p>
2234 </li>
2235 <li>
2237 pathname (possibly with rename/copy information);
2238 </p>
2239 </li>
2240 <li>
2242 a newline.
2243 </p>
2244 </li>
2245 </ol></div>
2246 <div class="paragraph"><p>When <tt>-z</tt> output option is in effect, the output is formatted this way:</p></div>
2247 <div class="listingblock">
2248 <div class="content">
2249 <pre><tt>1 2 README NUL
2250 3 1 NUL arch/i386/Makefile NUL arch/x86/Makefile NUL</tt></pre>
2251 </div></div>
2252 <div class="paragraph"><p>That is:</p></div>
2253 <div class="olist arabic"><ol class="arabic">
2254 <li>
2256 the number of added lines;
2257 </p>
2258 </li>
2259 <li>
2261 a tab;
2262 </p>
2263 </li>
2264 <li>
2266 the number of deleted lines;
2267 </p>
2268 </li>
2269 <li>
2271 a tab;
2272 </p>
2273 </li>
2274 <li>
2276 a NUL (only exists if renamed/copied);
2277 </p>
2278 </li>
2279 <li>
2281 pathname in preimage;
2282 </p>
2283 </li>
2284 <li>
2286 a NUL (only exists if renamed/copied);
2287 </p>
2288 </li>
2289 <li>
2291 pathname in postimage (only exists if renamed/copied);
2292 </p>
2293 </li>
2294 <li>
2296 a NUL.
2297 </p>
2298 </li>
2299 </ol></div>
2300 <div class="paragraph"><p>The extra <tt>NUL</tt> before the preimage path in renamed case is to allow
2301 scripts that read the output to tell if the current record being read is
2302 a single-path record or a rename/copy record without reading ahead.
2303 After reading added and deleted lines, reading up to <tt>NUL</tt> would yield
2304 the pathname, but if that is <tt>NUL</tt>, the record will show two paths.</p></div>
2305 </div>
2306 <h2 id="_author">Author</h2>
2307 <div class="sectionbody">
2308 <div class="paragraph"><p>Written by Linus Torvalds &lt;<a href="mailto:torvalds@osdl.org">torvalds@osdl.org</a>&gt;</p></div>
2309 </div>
2310 <h2 id="_documentation">Documentation</h2>
2311 <div class="sectionbody">
2312 <div class="paragraph"><p>Documentation by David Greaves, Junio C Hamano and the git-list &lt;<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>&gt;.</p></div>
2313 </div>
2314 <h2 id="_git">GIT</h2>
2315 <div class="sectionbody">
2316 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
2317 </div>
2318 <div id="footer">
2319 <div id="footer-text">
2320 Last updated 2010-01-21 17:44:19 UTC
2321 </div>
2322 </div>
2323 </body>
2324 </html>