blob: 54f172432824e7047b8472b221a893e151474c88 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231<!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>
Junio C Hamano9629d4f2012-12-19 00:28:275<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
6<meta name="generator" content="AsciiDoc 8.6.8" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-diff(1)</title>
Junio C Hamano1a4e8412005-12-27 08:17:238<style type="text/css">
Junio C Hamano9629d4f2012-12-19 00:28:279/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
10
11/* Default font. */
12body {
13 font-family: Georgia,serif;
14}
15
16/* Title font. */
17h1, h2, h3, h4, h5, h6,
18div.title, caption.title,
19thead, p.table.header,
20#toctitle,
21#author, #revnumber, #revdate, #revremark,
22#footer {
23 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano1a4e8412005-12-27 08:17:2324}
25
26body {
27 margin: 1em 5% 1em 5%;
28}
29
Junio C Hamano0868a302008-07-22 09:20:4430a {
31 color: blue;
32 text-decoration: underline;
33}
34a:visited {
35 color: fuchsia;
36}
Junio C Hamano1a4e8412005-12-27 08:17:2337
38em {
39 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5940 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2341}
42
43strong {
44 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5945 color: #083194;
Junio C Hamano1a4e8412005-12-27 08:17:2346}
47
Junio C Hamano1a4e8412005-12-27 08:17:2348h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:2350 margin-top: 1.2em;
51 margin-bottom: 0.5em;
52 line-height: 1.3;
53}
54
Junio C Hamano0868a302008-07-22 09:20:4455h1, h2, h3 {
Junio C Hamano1a4e8412005-12-27 08:17:2356 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamano1a4e8412005-12-27 08:17:2359 padding-top: 0.5em;
60}
Junio C Hamano0868a302008-07-22 09:20:4461h3 {
62 float: left;
63}
64h3 + * {
65 clear: left;
66}
Junio C Hamano9629d4f2012-12-19 00:28:2767h5 {
68 font-size: 1.0em;
69}
Junio C Hamano1a4e8412005-12-27 08:17:2370
71div.sectionbody {
Junio C Hamano1a4e8412005-12-27 08:17:2372 margin-left: 0;
73}
74
75hr {
76 border: 1px solid silver;
77}
78
79p {
80 margin-top: 0.5em;
81 margin-bottom: 0.5em;
82}
83
Junio C Hamano68cf15a2010-11-06 01:01:5984ul, ol, li > p {
85 margin-top: 0;
86}
Junio C Hamano9629d4f2012-12-19 00:28:2787ul > li { color: #aaa; }
88ul > li > * { color: black; }
Junio C Hamano68cf15a2010-11-06 01:01:5989
Junio C Hamano9629d4f2012-12-19 00:28:2790.monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2394 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9629d4f2012-12-19 00:28:2798
99#author {
Junio C Hamano1a4e8412005-12-27 08:17:23100 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23101 font-weight: bold;
Junio C Hamano0868a302008-07-22 09:20:44102 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23103}
Junio C Hamano9629d4f2012-12-19 00:28:27104#email {
Junio C Hamano1a4e8412005-12-27 08:17:23105}
Junio C Hamano9629d4f2012-12-19 00:28:27106#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23107}
108
Junio C Hamano9629d4f2012-12-19 00:28:27109#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23110 font-size: small;
111 border-top: 2px solid silver;
112 padding-top: 0.5em;
113 margin-top: 4.0em;
114}
Junio C Hamano9629d4f2012-12-19 00:28:27115#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9629d4f2012-12-19 00:28:27119#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9629d4f2012-12-19 00:28:27124#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59125 margin-top: 1.5em;
126 margin-bottom: 1.5em;
127}
Junio C Hamano9629d4f2012-12-19 00:28:27128div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23132 margin-bottom: 1.5em;
133}
134div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22135 margin-top: 2.0em;
136 margin-bottom: 2.0em;
137 margin-right: 10%;
138 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59147 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23148 font-weight: bold;
149 text-align: left;
150 margin-top: 1.0em;
151 margin-bottom: 0.5em;
152}
153div.title + * {
154 margin-top: 0;
155}
156
157td div.title:first-child {
158 margin-top: 0.0em;
159}
160div.content div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content + div.title {
164 margin-top: 0.0em;
165}
166
167div.sidebarblock > div.content {
168 background: #ffffee;
Junio C Hamano9629d4f2012-12-19 00:28:27169 border: 1px solid #dddddd;
170 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23171 padding: 0.5em;
172}
173
174div.listingblock > div.content {
Junio C Hamano9629d4f2012-12-19 00:28:27175 border: 1px solid #dddddd;
176 border-left: 5px solid #f0f0f0;
177 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23178 padding: 0.5em;
179}
180
Junio C Hamano7bd050f2011-09-22 06:32:22181div.quoteblock, div.verseblock {
182 padding-left: 1.0em;
183 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59184 margin-right: 10%;
Junio C Hamano9629d4f2012-12-19 00:28:27185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamano68cf15a2010-11-06 01:01:59189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23191 text-align: right;
192}
Junio C Hamano68cf15a2010-11-06 01:01:59193
Junio C Hamano9629d4f2012-12-19 00:28:27194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59197}
198div.verseblock > div.attribution {
199 padding-top: 0.75em;
200 text-align: left;
201}
202/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamano0868a302008-07-22 09:20:44203div.verseblock + div.attribution {
204 text-align: left;
205}
Junio C Hamano1a4e8412005-12-27 08:17:23206
207div.admonitionblock .icon {
208 vertical-align: top;
209 font-size: 1.1em;
210 font-weight: bold;
211 text-decoration: underline;
212 color: #527bbd;
213 padding-right: 0.5em;
214}
215div.admonitionblock td.content {
216 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22217 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23218}
219
220div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22221 border-left: 3px solid #dddddd;
222 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23223}
224
Junio C Hamano1a4e8412005-12-27 08:17:23225div.imageblock div.content { padding-left: 0; }
Junio C Hamano1a4e8412005-12-27 08:17:23226span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59227a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59236 font-style: normal;
237 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23238}
239dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59240 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamano68cf15a2010-11-06 01:01:59246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23250 list-style-type: lower-alpha;
251}
Junio C Hamano68cf15a2010-11-06 01:01:59252ol.upperalpha {
253 list-style-type: upper-alpha;
254}
255ol.lowerroman {
256 list-style-type: lower-roman;
257}
258ol.upperroman {
259 list-style-type: upper-roman;
260}
261
262div.compact ul, div.compact ol,
263div.compact p, div.compact p,
264div.compact div, div.compact div {
265 margin-top: 0.1em;
266 margin-bottom: 0.1em;
267}
Junio C Hamano1a4e8412005-12-27 08:17:23268
Junio C Hamano1a4e8412005-12-27 08:17:23269tfoot {
270 font-weight: bold;
271}
Junio C Hamano68cf15a2010-11-06 01:01:59272td > div.verse {
273 white-space: pre;
274}
Junio C Hamano68cf15a2010-11-06 01:01:59275
276div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamano68cf15a2010-11-06 01:01:59280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamano0868a302008-07-22 09:20:44282}
Junio C Hamano68cf15a2010-11-06 01:01:59283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23287 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59288 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23289 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59290 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23291}
Junio C Hamano68cf15a2010-11-06 01:01:59292td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23293 vertical-align: top;
294}
Junio C Hamano68cf15a2010-11-06 01:01:59295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamano1a4e8412005-12-27 08:17:23303
Junio C Hamano7bd050f2011-09-22 06:32:22304.footnote, .footnoteref {
305 font-size: 0.8em;
306}
307
308span.footnote, span.footnoteref {
309 vertical-align: super;
310}
311
312#footnotes {
313 margin: 20px 0 20px 0;
314 padding: 7px 0 0 0;
315}
316
317#footnotes div.footnote {
318 margin: 0 0 5px 0;
319}
320
321#footnotes hr {
322 border: none;
323 border-top: 1px solid silver;
324 height: 1px;
325 text-align: left;
326 margin-left: 0;
327 width: 20%;
328 min-width: 100px;
329}
330
Junio C Hamano9629d4f2012-12-19 00:28:27331div.colist td {
332 padding-right: 0.5em;
333 padding-bottom: 0.3em;
334 vertical-align: top;
335}
336div.colist td img {
337 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23338}
Junio C Hamano0868a302008-07-22 09:20:44339
Junio C Hamano9629d4f2012-12-19 00:28:27340@media print {
341 #footer-badges { display: none; }
342}
343
344#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22345 margin-bottom: 2.5em;
346}
347
Junio C Hamano9629d4f2012-12-19 00:28:27348#toctitle {
Junio C Hamano0868a302008-07-22 09:20:44349 color: #527bbd;
Junio C Hamano0868a302008-07-22 09:20:44350 font-size: 1.1em;
351 font-weight: bold;
352 margin-top: 1.0em;
353 margin-bottom: 0.1em;
354}
355
Junio C Hamano9629d4f2012-12-19 00:28:27356div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamano0868a302008-07-22 09:20:44357 margin-top: 0;
358 margin-bottom: 0;
359}
360div.toclevel2 {
361 margin-left: 2em;
362 font-size: 0.9em;
363}
364div.toclevel3 {
365 margin-left: 4em;
366 font-size: 0.9em;
367}
368div.toclevel4 {
369 margin-left: 6em;
370 font-size: 0.9em;
371}
Junio C Hamano9629d4f2012-12-19 00:28:27372
373span.aqua { color: aqua; }
374span.black { color: black; }
375span.blue { color: blue; }
376span.fuchsia { color: fuchsia; }
377span.gray { color: gray; }
378span.green { color: green; }
379span.lime { color: lime; }
380span.maroon { color: maroon; }
381span.navy { color: navy; }
382span.olive { color: olive; }
383span.purple { color: purple; }
384span.red { color: red; }
385span.silver { color: silver; }
386span.teal { color: teal; }
387span.white { color: white; }
388span.yellow { color: yellow; }
389
390span.aqua-background { background: aqua; }
391span.black-background { background: black; }
392span.blue-background { background: blue; }
393span.fuchsia-background { background: fuchsia; }
394span.gray-background { background: gray; }
395span.green-background { background: green; }
396span.lime-background { background: lime; }
397span.maroon-background { background: maroon; }
398span.navy-background { background: navy; }
399span.olive-background { background: olive; }
400span.purple-background { background: purple; }
401span.red-background { background: red; }
402span.silver-background { background: silver; }
403span.teal-background { background: teal; }
404span.white-background { background: white; }
405span.yellow-background { background: yellow; }
406
407span.big { font-size: 2em; }
408span.small { font-size: 0.6em; }
409
410span.underline { text-decoration: underline; }
411span.overline { text-decoration: overline; }
412span.line-through { text-decoration: line-through; }
413
414div.unbreakable { page-break-inside: avoid; }
415
416
417/*
418 * xhtml11 specific
419 *
420 * */
421
422div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
425}
426div.tableblock > table {
427 border: 3px solid #527bbd;
428}
429thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
432}
433p.table {
434 margin-top: 0;
435}
436/* Because the table frame attribute is overriden by CSS in most browsers. */
437div.tableblock > table[frame="void"] {
438 border-style: none;
439}
440div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
443}
444div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
447}
448
449
450/*
451 * html5 specific
452 *
453 * */
454
455table.tableblock {
456 margin-top: 1.0em;
457 margin-bottom: 1.5em;
458}
459thead, p.tableblock.header {
460 font-weight: bold;
461 color: #527bbd;
462}
463p.tableblock {
464 margin-top: 0;
465}
466table.tableblock {
467 border-width: 3px;
468 border-spacing: 0px;
469 border-style: solid;
470 border-color: #527bbd;
471 border-collapse: collapse;
472}
473th.tableblock, td.tableblock {
474 border-width: 1px;
475 padding: 4px;
476 border-style: solid;
477 border-color: #527bbd;
478}
479
480table.tableblock.frame-topbot {
481 border-left-style: hidden;
482 border-right-style: hidden;
483}
484table.tableblock.frame-sides {
485 border-top-style: hidden;
486 border-bottom-style: hidden;
487}
488table.tableblock.frame-none {
489 border-style: hidden;
490}
491
492th.tableblock.halign-left, td.tableblock.halign-left {
493 text-align: left;
494}
495th.tableblock.halign-center, td.tableblock.halign-center {
496 text-align: center;
497}
498th.tableblock.halign-right, td.tableblock.halign-right {
499 text-align: right;
500}
501
502th.tableblock.valign-top, td.tableblock.valign-top {
503 vertical-align: top;
504}
505th.tableblock.valign-middle, td.tableblock.valign-middle {
506 vertical-align: middle;
507}
508th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509 vertical-align: bottom;
510}
511
512
513/*
514 * manpage specific
515 *
516 * */
517
518body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59519 padding-top: 0.5em;
520 padding-bottom: 0.5em;
521 border-top: 2px solid silver;
522 border-bottom: 2px solid silver;
523}
Junio C Hamano9629d4f2012-12-19 00:28:27524body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59525 border-style: none;
526}
Junio C Hamano9629d4f2012-12-19 00:28:27527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59529}
530
531@media print {
Junio C Hamano9629d4f2012-12-19 00:28:27532 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59533}
534
Junio C Hamano1a4e8412005-12-27 08:17:23535
Junio C Hamano1a4e8412005-12-27 08:17:23536</style>
Junio C Hamano7bd050f2011-09-22 06:32:22537<script type="text/javascript">
538/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22539var asciidoc = { // Namespace.
540
541/////////////////////////////////////////////////////////////////////
542// Table Of Contents generator
543/////////////////////////////////////////////////////////////////////
544
545/* Author: Mihai Bazon, September 2002
546 * http://students.infoiasi.ro/~mishoo
547 *
548 * Table Of Content generator
549 * Version: 0.4
550 *
551 * Feel free to use this script under the terms of the GNU General Public
552 * License, as long as you do not remove or alter this notice.
553 */
554
555 /* modified by Troy D. Hanson, September 2006. License: GPL */
556 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
557
558// toclevels = 1..4.
559toc: function (toclevels) {
560
561 function getText(el) {
562 var text = "";
563 for (var i = el.firstChild; i != null; i = i.nextSibling) {
564 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
565 text += i.data;
566 else if (i.firstChild != null)
567 text += getText(i);
568 }
569 return text;
570 }
571
572 function TocEntry(el, text, toclevel) {
573 this.element = el;
574 this.text = text;
575 this.toclevel = toclevel;
576 }
577
578 function tocEntries(el, toclevels) {
579 var result = new Array;
Junio C Hamano9629d4f2012-12-19 00:28:27580 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22581 // Function that scans the DOM tree for header elements (the DOM2
582 // nodeIterator API would be a better technique but not supported by all
583 // browsers).
584 var iterate = function (el) {
585 for (var i = el.firstChild; i != null; i = i.nextSibling) {
586 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
587 var mo = re.exec(i.tagName);
588 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
589 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
590 }
591 iterate(i);
592 }
593 }
594 }
595 iterate(el);
596 return result;
597 }
598
599 var toc = document.getElementById("toc");
Junio C Hamano9629d4f2012-12-19 00:28:27600 if (!toc) {
601 return;
602 }
603
604 // Delete existing TOC entries in case we're reloading the TOC.
605 var tocEntriesToRemove = [];
606 var i;
607 for (i = 0; i < toc.childNodes.length; i++) {
608 var entry = toc.childNodes[i];
609 if (entry.nodeName.toLowerCase() == 'div'
610 && entry.getAttribute("class")
611 && entry.getAttribute("class").match(/^toclevel/))
612 tocEntriesToRemove.push(entry);
613 }
614 for (i = 0; i < tocEntriesToRemove.length; i++) {
615 toc.removeChild(tocEntriesToRemove[i]);
616 }
617
618 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22619 var entries = tocEntries(document.getElementById("content"), toclevels);
620 for (var i = 0; i < entries.length; ++i) {
621 var entry = entries[i];
622 if (entry.element.id == "")
623 entry.element.id = "_toc_" + i;
624 var a = document.createElement("a");
625 a.href = "#" + entry.element.id;
626 a.appendChild(document.createTextNode(entry.text));
627 var div = document.createElement("div");
628 div.appendChild(a);
629 div.className = "toclevel" + entry.toclevel;
630 toc.appendChild(div);
631 }
632 if (entries.length == 0)
633 toc.parentNode.removeChild(toc);
634},
635
636
637/////////////////////////////////////////////////////////////////////
638// Footnotes generator
639/////////////////////////////////////////////////////////////////////
640
641/* Based on footnote generation code from:
642 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
643 */
644
645footnotes: function () {
Junio C Hamano9629d4f2012-12-19 00:28:27646 // Delete existing footnote entries in case we're reloading the footnodes.
647 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22648 var noteholder = document.getElementById("footnotes");
Junio C Hamano9629d4f2012-12-19 00:28:27649 if (!noteholder) {
650 return;
651 }
652 var entriesToRemove = [];
653 for (i = 0; i < noteholder.childNodes.length; i++) {
654 var entry = noteholder.childNodes[i];
655 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
656 entriesToRemove.push(entry);
657 }
658 for (i = 0; i < entriesToRemove.length; i++) {
659 noteholder.removeChild(entriesToRemove[i]);
660 }
661
662 // Rebuild footnote entries.
663 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22664 var spans = cont.getElementsByTagName("span");
665 var refs = {};
666 var n = 0;
667 for (i=0; i<spans.length; i++) {
668 if (spans[i].className == "footnote") {
669 n++;
Junio C Hamano9629d4f2012-12-19 00:28:27670 var note = spans[i].getAttribute("data-note");
671 if (!note) {
672 // Use [\s\S] in place of . so multi-line matches work.
673 // Because JavaScript has no s (dotall) regex flag.
674 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
675 spans[i].innerHTML =
676 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
677 "' title='View footnote' class='footnote'>" + n + "</a>]";
678 spans[i].setAttribute("data-note", note);
679 }
Junio C Hamano7bd050f2011-09-22 06:32:22680 noteholder.innerHTML +=
681 "<div class='footnote' id='_footnote_" + n + "'>" +
682 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
683 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22684 var id =spans[i].getAttribute("id");
685 if (id != null) refs["#"+id] = n;
686 }
687 }
688 if (n == 0)
689 noteholder.parentNode.removeChild(noteholder);
690 else {
691 // Process footnoterefs.
692 for (i=0; i<spans.length; i++) {
693 if (spans[i].className == "footnoteref") {
694 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
695 href = href.match(/#.*/)[0]; // Because IE return full URL.
696 n = refs[href];
697 spans[i].innerHTML =
698 "[<a href='#_footnote_" + n +
699 "' title='View footnote' class='footnote'>" + n + "</a>]";
700 }
701 }
702 }
Junio C Hamano9629d4f2012-12-19 00:28:27703},
704
705install: function(toclevels) {
706 var timerId;
707
708 function reinstall() {
709 asciidoc.footnotes();
710 if (toclevels) {
711 asciidoc.toc(toclevels);
712 }
713 }
714
715 function reinstallAndRemoveTimer() {
716 clearInterval(timerId);
717 reinstall();
718 }
719
720 timerId = setInterval(reinstall, 500);
721 if (document.addEventListener)
722 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
723 else
724 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22725}
726
727}
Junio C Hamano9629d4f2012-12-19 00:28:27728asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22729/*]]>*/
730</script>
Junio C Hamano1a4e8412005-12-27 08:17:23731</head>
Junio C Hamano9629d4f2012-12-19 00:28:27732<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23733<div id="header">
734<h1>
735git-diff(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-diff -
Junio C Hamano01078922006-03-10 00:31:47740 Show changes between commits, commit and working tree, etc
Junio C Hamano1a4e8412005-12-27 08:17:23741</p>
742</div>
743</div>
Junio C Hamano7bd050f2011-09-22 06:32:22744<div id="content">
Junio C Hamano9629d4f2012-12-19 00:28:27745<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23747<div class="sectionbody">
Junio C Hamano2e6ded82010-12-05 06:20:48748<div class="verseblock">
Junio C Hamano9629d4f2012-12-19 00:28:27749<pre class="content"><em>git diff</em> [options] [&lt;commit&gt;] [--] [&lt;path&gt;&#8230;]
Junio C Hamano2e6ded82010-12-05 06:20:48750<em>git diff</em> [options] --cached [&lt;commit&gt;] [--] [&lt;path&gt;&#8230;]
751<em>git diff</em> [options] &lt;commit&gt; &lt;commit&gt; [--] [&lt;path&gt;&#8230;]
Junio C Hamanodb81b992012-12-21 23:49:12752<em>git diff</em> [options] &lt;blob&gt; &lt;blob&gt;
Junio C Hamano9629d4f2012-12-19 00:28:27753<em>git diff</em> [options] [--no-index] [--] &lt;path&gt; &lt;path&gt;</pre>
754<div class="attribution">
Junio C Hamano2e6ded82010-12-05 06:20:48755</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23756</div>
Junio C Hamano9629d4f2012-12-19 00:28:27757</div>
758<div class="sect1">
Junio C Hamano0868a302008-07-22 09:20:44759<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23760<div class="sectionbody">
Junio C Hamano2e6ded82010-12-05 06:20:48761<div class="paragraph"><p>Show changes between the working tree and the index or a tree, changes
762between the index and a tree, changes between two trees, or changes
763between two files on disk.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59764<div class="dlist"><dl>
765<dt class="hdlist1">
Junio C Hamanofce7c7e2008-07-02 03:06:38766<em>git diff</em> [--options] [--] [&lt;path&gt;&#8230;]
Junio C Hamano47848ae2006-12-14 11:20:06767</dt>
768<dd>
Junio C Hamano1a4e8412005-12-27 08:17:23769<p>
Junio C Hamano47848ae2006-12-14 11:20:06770 This form is to view the changes you made relative to
771 the index (staging area for the next commit). In other
Junio C Hamano68cf15a2010-11-06 01:01:59772 words, the differences are what you <em>could</em> tell git to
773 further add to the index but you still haven&#8217;t. You can
Junio C Hamanoa28a9202012-06-21 07:08:23774 stage these changes by using <a href="git-add.html">git-add(1)</a>.
Junio C Hamano1a4e8412005-12-27 08:17:23775</p>
Junio C Hamano68cf15a2010-11-06 01:01:59776<div class="paragraph"><p>If exactly two paths are given and at least one points outside
Junio C Hamanoc27b7332010-10-14 04:37:28777the current repository, <em>git diff</em> will compare the two files /
778directories. This behavior can be forced by --no-index.</p></div>
Junio C Hamano47848ae2006-12-14 11:20:06779</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59780<dt class="hdlist1">
Junio C Hamanofce7c7e2008-07-02 03:06:38781<em>git diff</em> [--options] --cached [&lt;commit&gt;] [--] [&lt;path&gt;&#8230;]
Junio C Hamano47848ae2006-12-14 11:20:06782</dt>
783<dd>
Junio C Hamano1a4e8412005-12-27 08:17:23784<p>
Junio C Hamano47848ae2006-12-14 11:20:06785 This form is to view the changes you staged for the next
Junio C Hamano4bf6dca2006-12-21 02:25:57786 commit relative to the named &lt;commit&gt;. Typically you
Junio C Hamano47848ae2006-12-14 11:20:06787 would want comparison with the latest commit, so if you
788 do not give &lt;commit&gt;, it defaults to HEAD.
Junio C Hamanoe6116832011-02-08 00:49:45789 If HEAD does not exist (e.g. unborned branches) and
790 &lt;commit&gt; is not given, it shows all staged changes.
Junio C Hamano8b4977b2008-11-12 04:57:48791 --staged is a synonym of --cached.
Junio C Hamano1a4e8412005-12-27 08:17:23792</p>
Junio C Hamano47848ae2006-12-14 11:20:06793</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59794<dt class="hdlist1">
Junio C Hamanofce7c7e2008-07-02 03:06:38795<em>git diff</em> [--options] &lt;commit&gt; [--] [&lt;path&gt;&#8230;]
Junio C Hamano47848ae2006-12-14 11:20:06796</dt>
797<dd>
Junio C Hamano1a4e8412005-12-27 08:17:23798<p>
Junio C Hamano47848ae2006-12-14 11:20:06799 This form is to view the changes you have in your
800 working tree relative to the named &lt;commit&gt;. You can
801 use HEAD to compare it with the latest commit, or a
802 branch name to compare with the tip of a different
803 branch.
Junio C Hamano1a4e8412005-12-27 08:17:23804</p>
Junio C Hamano47848ae2006-12-14 11:20:06805</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59806<dt class="hdlist1">
Junio C Hamanofce7c7e2008-07-02 03:06:38807<em>git diff</em> [--options] &lt;commit&gt; &lt;commit&gt; [--] [&lt;path&gt;&#8230;]
Junio C Hamano47848ae2006-12-14 11:20:06808</dt>
809<dd>
810<p>
Junio C Hamanoc435b1c2007-08-28 06:25:35811 This is to view the changes between two arbitrary
812 &lt;commit&gt;.
813</p>
814</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59815<dt class="hdlist1">
Junio C Hamanodb81b992012-12-21 23:49:12816<em>git diff</em> [options] &lt;blob&gt; &lt;blob&gt;
817</dt>
818<dd>
819<p>
820 This form is to view the differences between the raw
821 contents of two blob objects.
822</p>
823</dd>
824<dt class="hdlist1">
Junio C Hamanofce7c7e2008-07-02 03:06:38825<em>git diff</em> [--options] &lt;commit&gt;..&lt;commit&gt; [--] [&lt;path&gt;&#8230;]
Junio C Hamanoc435b1c2007-08-28 06:25:35826</dt>
827<dd>
828<p>
829 This is synonymous to the previous form. If &lt;commit&gt; on
830 one side is omitted, it will have the same effect as
831 using HEAD instead.
832</p>
833</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59834<dt class="hdlist1">
Junio C Hamanofce7c7e2008-07-02 03:06:38835<em>git diff</em> [--options] &lt;commit&gt;...&lt;commit&gt; [--] [&lt;path&gt;&#8230;]
Junio C Hamanoc435b1c2007-08-28 06:25:35836</dt>
837<dd>
838<p>
839 This form is to view the changes on the branch containing
840 and up to the second &lt;commit&gt;, starting at a common ancestor
Junio C Hamanofce7c7e2008-07-02 03:06:38841 of both &lt;commit&gt;. "git diff A...B" is equivalent to
842 "git diff $(git-merge-base A B) B". You can omit any one
Junio C Hamanoc435b1c2007-08-28 06:25:35843 of &lt;commit&gt;, which has the same effect as using HEAD instead.
Junio C Hamano47848ae2006-12-14 11:20:06844</p>
845</dd>
Junio C Hamano0868a302008-07-22 09:20:44846</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:59847<div class="paragraph"><p>Just in case if you are doing something exotic, it should be
Junio C Hamano7d9e9bd2007-08-29 07:31:47848noted that all of the &lt;commit&gt; in the above description, except
Junio C Hamanoc27b7332010-10-14 04:37:28849in the last two forms that use ".." notations, can be any
Junio C Hamanodb81b992012-12-21 23:49:12850&lt;tree&gt;.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59851<div class="paragraph"><p>For a more complete list of ways to spell &lt;commit&gt;, see
Junio C Hamanoa28a9202012-06-21 07:08:23852"SPECIFYING REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>.
Junio C Hamano68cf15a2010-11-06 01:01:59853However, "diff" is about comparing two <em>endpoints</em>, not ranges,
Junio C Hamanoc435b1c2007-08-28 06:25:35854and the range notations ("&lt;commit&gt;..&lt;commit&gt;" and
Junio C Hamano7d9e9bd2007-08-29 07:31:47855"&lt;commit&gt;...&lt;commit&gt;") do not mean a range as defined in the
Junio C Hamanoa28a9202012-06-21 07:08:23856"SPECIFYING RANGES" section in <a href="gitrevisions.html">gitrevisions(7)</a>.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23857</div>
Junio C Hamano9629d4f2012-12-19 00:28:27858</div>
859<div class="sect1">
Junio C Hamano0868a302008-07-22 09:20:44860<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23861<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59862<div class="dlist"><dl>
863<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:06864-p
Junio C Hamano1a4e8412005-12-27 08:17:23865</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59866<dt class="hdlist1">
Junio C Hamanobbbb8652008-12-29 10:34:22867-u
868</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59869<dt class="hdlist1">
Junio C Hamanoe97d5772010-05-19 08:13:58870--patch
871</dt>
Junio C Hamano1a4e8412005-12-27 08:17:23872<dd>
873<p>
Junio C Hamanoff979792007-11-16 10:11:30874 Generate patch (see section on generating patches).
875 This is the default.
Junio C Hamano1a4e8412005-12-27 08:17:23876</p>
877</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59878<dt class="hdlist1">
Junio C Hamano69361562007-07-26 02:14:34879-U&lt;n&gt;
880</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59881<dt class="hdlist1">
Junio C Hamano69361562007-07-26 02:14:34882--unified=&lt;n&gt;
883</dt>
884<dd>
885<p>
886 Generate diffs with &lt;n&gt; lines of context instead of
Junio C Hamano3b70d3c2009-11-21 17:37:37887 the usual three.
Junio C Hamano9629d4f2012-12-19 00:28:27888 Implies <code>-p</code>.
Junio C Hamano69361562007-07-26 02:14:34889</p>
890</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59891<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:06892--raw
893</dt>
894<dd>
895<p>
896 Generate the raw format.
Junio C Hamanoff979792007-11-16 10:11:30897
Junio C Hamano47848ae2006-12-14 11:20:06898</p>
899</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59900<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:06901--patch-with-raw
902</dt>
903<dd>
904<p>
Junio C Hamano9629d4f2012-12-19 00:28:27905 Synonym for <code>-p --raw</code>.
Junio C Hamano47848ae2006-12-14 11:20:06906</p>
907</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59908<dt class="hdlist1">
Junio C Hamano5a73f302011-10-14 05:58:34909--minimal
910</dt>
911<dd>
912<p>
913 Spend extra time to make sure the smallest possible
914 diff is produced.
915</p>
916</dd>
917<dt class="hdlist1">
Junio C Hamano20d47e32009-01-26 06:36:02918--patience
919</dt>
920<dd>
921<p>
922 Generate a diff using the "patience diff" algorithm.
923</p>
924</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59925<dt class="hdlist1">
Junio C Hamanoaea9e6b2012-03-07 00:17:11926--histogram
927</dt>
928<dd>
929<p>
930 Generate a diff using the "histogram diff" algorithm.
931</p>
932</dd>
933<dt class="hdlist1">
Junio C Hamano4c4b0122011-06-30 01:19:32934--stat[=&lt;width&gt;[,&lt;name-width&gt;[,&lt;count&gt;]]]
Junio C Hamano47848ae2006-12-14 11:20:06935</dt>
936<dd>
937<p>
Junio C Hamanoaea9e6b2012-03-07 00:17:11938 Generate a diffstat. By default, as much space as necessary
939 will be used for the filename part, and the rest for the graph
940 part. Maximum width defaults to terminal width, or 80 columns
Junio C Hamano7f2b3cb2012-06-22 22:42:39941 if not connected to a terminal, and can be overridden by
Junio C Hamano9629d4f2012-12-19 00:28:27942 <code>&lt;width&gt;</code>. The width of the filename part can be limited by
943 giving another width <code>&lt;name-width&gt;</code> after a comma. The width
Junio C Hamanoaea9e6b2012-03-07 00:17:11944 of the graph part can be limited by using
Junio C Hamano9629d4f2012-12-19 00:28:27945 <code>--stat-graph-width=&lt;width&gt;</code> (affects all commands generating
946 a stat graph) or by setting <code>diff.statGraphWidth=&lt;width&gt;</code>
947 (does not affect <code>git format-patch</code>).
948 By giving a third parameter <code>&lt;count&gt;</code>, you can limit the
949 output to the first <code>&lt;count&gt;</code> lines, followed by <code>...</code> if
Junio C Hamanoaea9e6b2012-03-07 00:17:11950 there are more.
Junio C Hamano47848ae2006-12-14 11:20:06951</p>
Junio C Hamano9629d4f2012-12-19 00:28:27952<div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=&lt;width&gt;</code>,
953<code>--stat-name-width=&lt;name-width&gt;</code> and <code>--stat-count=&lt;count&gt;</code>.</p></div>
Junio C Hamano47848ae2006-12-14 11:20:06954</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59955<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:06956--numstat
957</dt>
958<dd>
959<p>
Junio C Hamano9629d4f2012-12-19 00:28:27960 Similar to <code>--stat</code>, but shows number of added and
Junio C Hamano47848ae2006-12-14 11:20:06961 deleted lines in decimal notation and pathname without
Junio C Hamanod793de52006-12-26 09:11:43962 abbreviation, to make it more machine friendly. For
Junio C Hamano9629d4f2012-12-19 00:28:27963 binary files, outputs two <code>-</code> instead of saying
964 <code>0 0</code>.
Junio C Hamano47848ae2006-12-14 11:20:06965</p>
966</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59967<dt class="hdlist1">
Junio C Hamano7d23f5e2006-12-16 07:44:04968--shortstat
969</dt>
970<dd>
971<p>
Junio C Hamano9629d4f2012-12-19 00:28:27972 Output only the last line of the <code>--stat</code> format containing total
Junio C Hamano7d23f5e2006-12-16 07:44:04973 number of modified files, as well as number of added and deleted
974 lines.
975</p>
976</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59977<dt class="hdlist1">
Junio C Hamano1c222c52011-05-13 19:55:32978--dirstat[=&lt;param1,param2,&#8230;&gt;]
Junio C Hamano6a45be92008-04-22 08:19:03979</dt>
980<dd>
981<p>
Junio C Hamano1c222c52011-05-13 19:55:32982 Output the distribution of relative amount of changes for each
Junio C Hamano9629d4f2012-12-19 00:28:27983 sub-directory. The behavior of <code>--dirstat</code> can be customized by
Junio C Hamano1c222c52011-05-13 19:55:32984 passing it a comma separated list of parameters.
Junio C Hamano9629d4f2012-12-19 00:28:27985 The defaults are controlled by the <code>diff.dirstat</code> configuration
Junio C Hamanoa28a9202012-06-21 07:08:23986 variable (see <a href="git-config.html">git-config(1)</a>).
Junio C Hamano1c222c52011-05-13 19:55:32987 The following parameters are available:
Junio C Hamano6a45be92008-04-22 08:19:03988</p>
Junio C Hamano9629d4f2012-12-19 00:28:27989<div class="openblock">
990<div class="content">
Junio C Hamano1c222c52011-05-13 19:55:32991<div class="dlist"><dl>
992<dt class="hdlist1">
Junio C Hamano9629d4f2012-12-19 00:28:27993<code>changes</code>
Junio C Hamano1c222c52011-05-13 19:55:32994</dt>
995<dd>
996<p>
997 Compute the dirstat numbers by counting the lines that have been
998 removed from the source, or added to the destination. This ignores
999 the amount of pure code movements within a file. In other words,
1000 rearranging lines in a file is not counted as much as other changes.
1001 This is the default behavior when no parameter is given.
1002</p>
Junio C Hamano6a45be92008-04-22 08:19:031003</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591004<dt class="hdlist1">
Junio C Hamano9629d4f2012-12-19 00:28:271005<code>lines</code>
Junio C Hamanoa476efa2008-10-10 15:31:421006</dt>
1007<dd>
1008<p>
Junio C Hamano1c222c52011-05-13 19:55:321009 Compute the dirstat numbers by doing the regular line-based diff
1010 analysis, and summing the removed/added line counts. (For binary
1011 files, count 64-byte chunks instead, since binary files have no
Junio C Hamano9629d4f2012-12-19 00:28:271012 natural concept of lines). This is a more expensive <code>--dirstat</code>
1013 behavior than the <code>changes</code> behavior, but it does count rearranged
Junio C Hamano1c222c52011-05-13 19:55:321014 lines within a file as much as other changes. The resulting output
Junio C Hamano9629d4f2012-12-19 00:28:271015 is consistent with what you get from the other <code>--*stat</code> options.
Junio C Hamanoa476efa2008-10-10 15:31:421016</p>
1017</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591018<dt class="hdlist1">
Junio C Hamano9629d4f2012-12-19 00:28:271019<code>files</code>
Junio C Hamano1c222c52011-05-13 19:55:321020</dt>
1021<dd>
1022<p>
1023 Compute the dirstat numbers by counting the number of files changed.
1024 Each changed file counts equally in the dirstat analysis. This is
Junio C Hamano9629d4f2012-12-19 00:28:271025 the computationally cheapest <code>--dirstat</code> behavior, since it does
Junio C Hamano1c222c52011-05-13 19:55:321026 not have to look at the file contents at all.
1027</p>
1028</dd>
1029<dt class="hdlist1">
Junio C Hamano9629d4f2012-12-19 00:28:271030<code>cumulative</code>
Junio C Hamano1c222c52011-05-13 19:55:321031</dt>
1032<dd>
1033<p>
1034 Count changes in a child directory for the parent directory as well.
Junio C Hamano9629d4f2012-12-19 00:28:271035 Note that when using <code>cumulative</code>, the sum of the percentages
Junio C Hamano1c222c52011-05-13 19:55:321036 reported may exceed 100%. The default (non-cumulative) behavior can
Junio C Hamano9629d4f2012-12-19 00:28:271037 be specified with the <code>noncumulative</code> parameter.
Junio C Hamano1c222c52011-05-13 19:55:321038</p>
1039</dd>
1040<dt class="hdlist1">
1041&lt;limit&gt;
1042</dt>
1043<dd>
1044<p>
1045 An integer parameter specifies a cut-off percent (3% by default).
1046 Directories contributing less than this percentage of the changes
1047 are not shown in the output.
1048</p>
1049</dd>
1050</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271051</div></div>
Junio C Hamano1c222c52011-05-13 19:55:321052<div class="paragraph"><p>Example: The following will count changed files, while ignoring
1053directories with less than 10% of the total amount of changed files,
1054and accumulating child directory counts in the parent directories:
Junio C Hamano9629d4f2012-12-19 00:28:271055<code>--dirstat=files,10,cumulative</code>.</p></div>
Junio C Hamano1c222c52011-05-13 19:55:321056</dd>
1057<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061058--summary
1059</dt>
1060<dd>
1061<p>
1062 Output a condensed summary of extended header information
1063 such as creations, renames and mode changes.
1064</p>
1065</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591066<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061067--patch-with-stat
1068</dt>
1069<dd>
1070<p>
Junio C Hamano9629d4f2012-12-19 00:28:271071 Synonym for <code>-p --stat</code>.
Junio C Hamano47848ae2006-12-14 11:20:061072</p>
1073</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591074<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061075-z
1076</dt>
1077<dd>
1078<p>
Junio C Hamano9629d4f2012-12-19 00:28:271079 When <code>--raw</code>, <code>--numstat</code>, <code>--name-only</code> or <code>--name-status</code> has been
Junio C Hamano0c053e82010-04-19 06:46:341080 given, do not munge pathnames and use NULs as output field terminators.
Junio C Hamano47848ae2006-12-14 11:20:061081</p>
Junio C Hamano68cf15a2010-11-06 01:01:591082<div class="paragraph"><p>Without this option, each pathname output will have TAB, LF, double quotes,
Junio C Hamano9629d4f2012-12-19 00:28:271083and backslash characters replaced with <code>\t</code>, <code>\n</code>, <code>\"</code>, and <code>\\</code>,
Junio C Hamano5706e0b2009-11-24 10:54:161084respectively, and the pathname will be enclosed in double quotes if
1085any of those replacements occurred.</p></div>
Junio C Hamano47848ae2006-12-14 11:20:061086</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591087<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061088--name-only
1089</dt>
1090<dd>
1091<p>
1092 Show only names of changed files.
1093</p>
1094</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591095<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061096--name-status
1097</dt>
1098<dd>
1099<p>
Junio C Hamanoa9aee782008-04-23 16:09:201100 Show only names and status of changed files. See the description
Junio C Hamano9629d4f2012-12-19 00:28:271101 of the <code>--diff-filter</code> option on what the status letters mean.
Junio C Hamano47848ae2006-12-14 11:20:061102</p>
1103</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591104<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:551105--submodule[=&lt;format&gt;]
1106</dt>
1107<dd>
1108<p>
Junio C Hamano9629d4f2012-12-19 00:28:271109 Specify how differences in submodules are shown. When <code>--submodule</code>
1110 or <code>--submodule=log</code> is given, the <em>log</em> format is used. This format lists
1111 the commits in the range like <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does.
1112 Omitting the <code>--submodule</code> option or specifying <code>--submodule=short</code>,
Junio C Hamanoe768cc12012-03-16 05:43:051113 uses the <em>short</em> format. This format just shows the names of the commits
Junio C Hamanob4e58b12012-11-26 03:13:061114 at the beginning and end of the range. Can be tweaked via the
Junio C Hamano9629d4f2012-12-19 00:28:271115 <code>diff.submodule</code> configuration variable.
Junio C Hamanoc21ab052009-10-31 04:03:551116</p>
1117</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591118<dt class="hdlist1">
Junio C Hamano4aa0bcc2010-03-03 05:13:121119--color[=&lt;when&gt;]
Junio C Hamano47848ae2006-12-14 11:20:061120</dt>
1121<dd>
1122<p>
1123 Show colored diff.
Junio C Hamano9629d4f2012-12-19 00:28:271124 The value must be <code>always</code> (the default for <code>&lt;when&gt;</code>), <code>never</code>, or <code>auto</code>.
1125 The default value is <code>never</code>.
1126 It can be changed by the <code>color.ui</code> and <code>color.diff</code>
Junio C Hamano5f2627d2011-05-06 20:23:481127 configuration settings.
Junio C Hamano47848ae2006-12-14 11:20:061128</p>
1129</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591130<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061131--no-color
1132</dt>
1133<dd>
1134<p>
Junio C Hamano5f2627d2011-05-06 20:23:481135 Turn off colored diff.
1136 This can be used to override configuration settings.
Junio C Hamano9629d4f2012-12-19 00:28:271137 It is the same as <code>--color=never</code>.
Junio C Hamano47848ae2006-12-14 11:20:061138</p>
1139</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591140<dt class="hdlist1">
Junio C Hamanocc7636a2010-05-21 14:57:531141--word-diff[=&lt;mode&gt;]
Junio C Hamano47848ae2006-12-14 11:20:061142</dt>
1143<dd>
1144<p>
Junio C Hamanocc7636a2010-05-21 14:57:531145 Show a word diff, using the &lt;mode&gt; to delimit changed words.
1146 By default, words are delimited by whitespace; see
Junio C Hamano9629d4f2012-12-19 00:28:271147 <code>--word-diff-regex</code> below. The &lt;mode&gt; defaults to <em>plain</em>, and
Junio C Hamanocc7636a2010-05-21 14:57:531148 must be one of:
Junio C Hamano47848ae2006-12-14 11:20:061149</p>
Junio C Hamano9629d4f2012-12-19 00:28:271150<div class="openblock">
1151<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591152<div class="dlist"><dl>
1153<dt class="hdlist1">
Junio C Hamanocc7636a2010-05-21 14:57:531154color
1155</dt>
1156<dd>
1157<p>
Junio C Hamano9629d4f2012-12-19 00:28:271158 Highlight changed words using only colors. Implies <code>--color</code>.
Junio C Hamanocc7636a2010-05-21 14:57:531159</p>
1160</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591161<dt class="hdlist1">
Junio C Hamanocc7636a2010-05-21 14:57:531162plain
1163</dt>
1164<dd>
1165<p>
Junio C Hamano9629d4f2012-12-19 00:28:271166 Show words as <code>[-removed-]</code> and <code>{+added+}</code>. Makes no
Junio C Hamanocc7636a2010-05-21 14:57:531167 attempts to escape the delimiters if they appear in the input,
1168 so the output may be ambiguous.
1169</p>
1170</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591171<dt class="hdlist1">
Junio C Hamanocc7636a2010-05-21 14:57:531172porcelain
1173</dt>
1174<dd>
1175<p>
1176 Use a special line-based format intended for script
1177 consumption. Added/removed/unchanged runs are printed in the
Junio C Hamano9629d4f2012-12-19 00:28:271178 usual unified diff format, starting with a <code>+</code>/<code>-</code>/` `
Junio C Hamanocc7636a2010-05-21 14:57:531179 character at the beginning of the line and extending to the
1180 end of the line. Newlines in the input are represented by a
Junio C Hamano9629d4f2012-12-19 00:28:271181 tilde <code>~</code> on a line of its own.
Junio C Hamanocc7636a2010-05-21 14:57:531182</p>
1183</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591184<dt class="hdlist1">
Junio C Hamanocc7636a2010-05-21 14:57:531185none
1186</dt>
1187<dd>
1188<p>
1189 Disable word diff again.
1190</p>
1191</dd>
1192</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271193</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591194<div class="paragraph"><p>Note that despite the name of the first mode, color is used to
Junio C Hamanocc7636a2010-05-21 14:57:531195highlight the changed parts in all modes if enabled.</p></div>
1196</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591197<dt class="hdlist1">
Junio C Hamanocc7636a2010-05-21 14:57:531198--word-diff-regex=&lt;regex&gt;
1199</dt>
1200<dd>
1201<p>
1202 Use &lt;regex&gt; to decide what a word is, instead of considering
1203 runs of non-whitespace to be a word. Also implies
Junio C Hamano9629d4f2012-12-19 00:28:271204 <code>--word-diff</code> unless it was already enabled.
Junio C Hamanocc7636a2010-05-21 14:57:531205</p>
Junio C Hamano68cf15a2010-11-06 01:01:591206<div class="paragraph"><p>Every non-overlapping match of the
Junio C Hamano20d47e32009-01-26 06:36:021207&lt;regex&gt; is considered a word. Anything between these matches is
1208considered whitespace and ignored(!) for the purposes of finding
Junio C Hamano9629d4f2012-12-19 00:28:271209differences. You may want to append <code>|[^[:space:]]</code> to your regular
Junio C Hamano20d47e32009-01-26 06:36:021210expression to make sure that it matches all non-whitespace characters.
1211A match that contains a newline is silently truncated(!) at the
1212newline.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591213<div class="paragraph"><p>The regex can also be set via a diff driver or configuration option, see
Junio C Hamanoa28a9202012-06-21 07:08:231214<a href="gitattributes.html">gitattributes(1)</a> or <a href="git-config.html">git-config(1)</a>. Giving it explicitly
Junio C Hamano20d47e32009-01-26 06:36:021215overrides any diff driver or configuration setting. Diff drivers
1216override configuration settings.</p></div>
Junio C Hamano47848ae2006-12-14 11:20:061217</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591218<dt class="hdlist1">
Junio C Hamanocc7636a2010-05-21 14:57:531219--color-words[=&lt;regex&gt;]
1220</dt>
1221<dd>
1222<p>
Junio C Hamano9629d4f2012-12-19 00:28:271223 Equivalent to <code>--word-diff=color</code> plus (if a regex was
1224 specified) <code>--word-diff-regex=&lt;regex&gt;</code>.
Junio C Hamanocc7636a2010-05-21 14:57:531225</p>
1226</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591227<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061228--no-renames
1229</dt>
1230<dd>
1231<p>
1232 Turn off rename detection, even when the configuration
1233 file gives the default to do so.
1234</p>
1235</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591236<dt class="hdlist1">
Junio C Hamanoa890c4f2007-01-28 10:29:211237--check
1238</dt>
1239<dd>
1240<p>
Junio C Hamano6005bfa2011-06-23 00:51:221241 Warn if changes introduce whitespace errors. What are
Junio C Hamano9629d4f2012-12-19 00:28:271242 considered whitespace errors is controlled by <code>core.whitespace</code>
Junio C Hamano6005bfa2011-06-23 00:51:221243 configuration. By default, trailing whitespaces (including
1244 lines that solely consist of whitespaces) and a space character
1245 that is immediately followed by a tab character inside the
1246 initial indent of the line are considered whitespace errors.
1247 Exits with non-zero status if problems are found. Not compatible
1248 with --exit-code.
Junio C Hamanoa890c4f2007-01-28 10:29:211249</p>
1250</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591251<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061252--full-index
1253</dt>
1254<dd>
1255<p>
Junio C Hamano5cf43ca2008-08-20 09:14:141256 Instead of the first handful of characters, show the full
1257 pre- and post-image blob object names on the "index"
1258 line when generating patch format output.
Junio C Hamano47848ae2006-12-14 11:20:061259</p>
1260</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591261<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061262--binary
1263</dt>
1264<dd>
1265<p>
Junio C Hamano9629d4f2012-12-19 00:28:271266 In addition to <code>--full-index</code>, output a binary diff that
1267 can be applied with <code>git-apply</code>.
Junio C Hamano47848ae2006-12-14 11:20:061268</p>
1269</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591270<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061271--abbrev[=&lt;n&gt;]
1272</dt>
1273<dd>
1274<p>
1275 Instead of showing the full 40-byte hexadecimal object
1276 name in diff-raw format output and diff-tree header
Junio C Hamano6efe3022009-01-13 16:47:561277 lines, show only a partial prefix. This is
Junio C Hamano9629d4f2012-12-19 00:28:271278 independent of the <code>--full-index</code> option above, which controls
Junio C Hamano47848ae2006-12-14 11:20:061279 the diff-patch output format. Non default number of
Junio C Hamano9629d4f2012-12-19 00:28:271280 digits can be specified with <code>--abbrev=&lt;n&gt;</code>.
Junio C Hamano47848ae2006-12-14 11:20:061281</p>
1282</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591283<dt class="hdlist1">
Junio C Hamanoe85e36f2010-08-10 05:30:141284-B[&lt;n&gt;][/&lt;m&gt;]
Junio C Hamano47848ae2006-12-14 11:20:061285</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591286<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541287--break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]
1288</dt>
Junio C Hamano47848ae2006-12-14 11:20:061289<dd>
1290<p>
Junio C Hamanoe85e36f2010-08-10 05:30:141291 Break complete rewrite changes into pairs of delete and
1292 create. This serves two purposes:
Junio C Hamano47848ae2006-12-14 11:20:061293</p>
Junio C Hamano68cf15a2010-11-06 01:01:591294<div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file
Junio C Hamanoe85e36f2010-08-10 05:30:141295not as a series of deletion and insertion mixed together with a very
1296few lines that happen to match textually as the context, but as a
1297single deletion of everything old followed by a single insertion of
Junio C Hamano9629d4f2012-12-19 00:28:271298everything new, and the number <code>m</code> controls this aspect of the -B
1299option (defaults to 60%). <code>-B/70%</code> specifies that less than 30% of the
Junio C Hamanoe85e36f2010-08-10 05:30:141300original should remain in the result for git to consider it a total
1301rewrite (i.e. otherwise the resulting patch will be a series of
1302deletion and insertion mixed together with context lines).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591303<div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
Junio C Hamanoe85e36f2010-08-10 05:30:141304source of a rename (usually -M only considers a file that disappeared
Junio C Hamano9629d4f2012-12-19 00:28:271305as the source of a rename), and the number <code>n</code> controls this aspect of
1306the -B option (defaults to 50%). <code>-B20%</code> specifies that a change with
Junio C Hamano68cf15a2010-11-06 01:01:591307addition and deletion compared to 20% or more of the file&#8217;s size are
Junio C Hamanoe85e36f2010-08-10 05:30:141308eligible for being picked up as a possible source of a rename to
1309another file.</p></div>
Junio C Hamano47848ae2006-12-14 11:20:061310</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591311<dt class="hdlist1">
Junio C Hamanoe85e36f2010-08-10 05:30:141312-M[&lt;n&gt;]
Junio C Hamano47848ae2006-12-14 11:20:061313</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591314<dt class="hdlist1">
Junio C Hamano0d75e872010-12-17 06:57:261315--find-renames[=&lt;n&gt;]
Junio C Hamano39c7a692010-10-27 06:08:541316</dt>
Junio C Hamano47848ae2006-12-14 11:20:061317<dd>
1318<p>
1319 Detect renames.
Junio C Hamano9629d4f2012-12-19 00:28:271320 If <code>n</code> is specified, it is a threshold on the similarity
Junio C Hamanoe85e36f2010-08-10 05:30:141321 index (i.e. amount of addition/deletions compared to the
Junio C Hamano9629d4f2012-12-19 00:28:271322 file&#8217;s size). For example, <code>-M90%</code> means git should consider a
Junio C Hamanoe85e36f2010-08-10 05:30:141323 delete/add pair to be a rename if more than 90% of the file
Junio C Hamano9629d4f2012-12-19 00:28:271324 hasn&#8217;t changed. Without a <code>%</code> sign, the number is to be read as
1325 a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes
1326 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is
1327 the same as <code>-M5%</code>. To limit detection to exact renames, use
1328 <code>-M100%</code>.
Junio C Hamano47848ae2006-12-14 11:20:061329</p>
1330</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591331<dt class="hdlist1">
Junio C Hamanoe85e36f2010-08-10 05:30:141332-C[&lt;n&gt;]
Junio C Hamano47848ae2006-12-14 11:20:061333</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591334<dt class="hdlist1">
Junio C Hamano0d75e872010-12-17 06:57:261335--find-copies[=&lt;n&gt;]
Junio C Hamano39c7a692010-10-27 06:08:541336</dt>
Junio C Hamano47848ae2006-12-14 11:20:061337<dd>
1338<p>
Junio C Hamano9629d4f2012-12-19 00:28:271339 Detect copies as well as renames. See also <code>--find-copies-harder</code>.
1340 If <code>n</code> is specified, it has the same meaning as for <code>-M&lt;n&gt;</code>.
Junio C Hamano47848ae2006-12-14 11:20:061341</p>
1342</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591343<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061344--find-copies-harder
1345</dt>
1346<dd>
1347<p>
Junio C Hamano9629d4f2012-12-19 00:28:271348 For performance reasons, by default, <code>-C</code> option finds copies only
Junio C Hamano47848ae2006-12-14 11:20:061349 if the original file of the copy was modified in the same
1350 changeset. This flag makes the command
1351 inspect unmodified files as candidates for the source of
1352 copy. This is a very expensive operation for large
Junio C Hamano16f98872007-06-12 16:09:141353 projects, so use it with caution. Giving more than one
Junio C Hamano9629d4f2012-12-19 00:28:271354 <code>-C</code> option has the same effect.
Junio C Hamano47848ae2006-12-14 11:20:061355</p>
1356</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591357<dt class="hdlist1">
Junio C Hamanob02377c2011-04-28 22:26:021358-D
1359</dt>
1360<dt class="hdlist1">
1361--irreversible-delete
1362</dt>
1363<dd>
1364<p>
1365 Omit the preimage for deletes, i.e. print only the header but not
Junio C Hamano9629d4f2012-12-19 00:28:271366 the diff between the preimage and <code>/dev/null</code>. The resulting patch
1367 is not meant to be applied with <code>patch</code> nor <code>git apply</code>; this is
Junio C Hamanob02377c2011-04-28 22:26:021368 solely for people who want to just concentrate on reviewing the
1369 text after the change. In addition, the output obviously lack
1370 enough information to apply such a patch in reverse, even manually,
1371 hence the name of the option.
1372</p>
Junio C Hamano9629d4f2012-12-19 00:28:271373<div class="paragraph"><p>When used together with <code>-B</code>, omit also the preimage in the deletion part
Junio C Hamanob02377c2011-04-28 22:26:021374of a delete/create pair.</p></div>
1375</dd>
1376<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061377-l&lt;num&gt;
1378</dt>
1379<dd>
1380<p>
Junio C Hamano9629d4f2012-12-19 00:28:271381 The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n
Junio C Hamano47848ae2006-12-14 11:20:061382 is the number of potential rename/copy targets. This
1383 option prevents rename/copy detection from running if
1384 the number of rename/copy targets exceeds the specified
1385 number.
1386</p>
1387</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591388<dt class="hdlist1">
Junio C Hamano982eb112010-11-18 00:53:091389--diff-filter=[(A|C|D|M|R|T|U|X|B)&#8230;[*]]
1390</dt>
1391<dd>
1392<p>
Junio C Hamano9629d4f2012-12-19 00:28:271393 Select only files that are Added (<code>A</code>), Copied (<code>C</code>),
1394 Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their
1395 type (i.e. regular file, symlink, submodule, &#8230;) changed (<code>T</code>),
1396 are Unmerged (<code>U</code>), are
1397 Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>).
Junio C Hamano982eb112010-11-18 00:53:091398 Any combination of the filter characters (including none) can be used.
Junio C Hamano9629d4f2012-12-19 00:28:271399 When <code>*</code> (All-or-none) is added to the combination, all
Junio C Hamano982eb112010-11-18 00:53:091400 paths are selected if there is any file that matches
1401 other criteria in the comparison; if there is no file
1402 that matches other criteria, nothing is selected.
1403</p>
1404</dd>
1405<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061406-S&lt;string&gt;
1407</dt>
1408<dd>
1409<p>
Junio C Hamano5217a272009-03-21 00:39:331410 Look for differences that introduce or remove an instance of
1411 &lt;string&gt;. Note that this is different than the string simply
1412 appearing in diff output; see the <em>pickaxe</em> entry in
Junio C Hamanoa28a9202012-06-21 07:08:231413 <a href="gitdiffcore.html">gitdiffcore(7)</a> for more details.
Junio C Hamano47848ae2006-12-14 11:20:061414</p>
1415</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591416<dt class="hdlist1">
Junio C Hamano3b4609d2010-09-30 00:04:341417-G&lt;regex&gt;
1418</dt>
1419<dd>
1420<p>
1421 Look for differences whose added or removed line matches
1422 the given &lt;regex&gt;.
1423</p>
1424</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591425<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061426--pickaxe-all
1427</dt>
1428<dd>
1429<p>
Junio C Hamano9629d4f2012-12-19 00:28:271430 When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that
Junio C Hamano47848ae2006-12-14 11:20:061431 changeset, not just the files that contain the change
1432 in &lt;string&gt;.
1433</p>
1434</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591435<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061436--pickaxe-regex
1437</dt>
1438<dd>
1439<p>
1440 Make the &lt;string&gt; not a plain string but an extended POSIX
1441 regex to match.
1442</p>
1443</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591444<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061445-O&lt;orderfile&gt;
1446</dt>
1447<dd>
1448<p>
1449 Output the patch in the order specified in the
1450 &lt;orderfile&gt;, which has one shell glob pattern per line.
1451</p>
1452</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591453<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061454-R
1455</dt>
1456<dd>
1457<p>
1458 Swap two inputs; that is, show differences from index or
1459 on-disk file to tree contents.
1460</p>
1461</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591462<dt class="hdlist1">
Junio C Hamano24bc09a2008-02-28 00:27:441463--relative[=&lt;path&gt;]
1464</dt>
1465<dd>
1466<p>
1467 When run from a subdirectory of the project, it can be
1468 told to exclude changes outside the directory and show
1469 pathnames relative to it with this option. When you are
1470 not in a subdirectory (e.g. in a bare repository), you
1471 can name which subdirectory to make the output relative
1472 to by giving a &lt;path&gt; as an argument.
1473</p>
1474</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591475<dt class="hdlist1">
Junio C Hamanobbbb8652008-12-29 10:34:221476-a
1477</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591478<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061479--text
1480</dt>
1481<dd>
1482<p>
1483 Treat all files as text.
1484</p>
1485</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591486<dt class="hdlist1">
Junio C Hamanofd468962007-02-14 23:45:041487--ignore-space-at-eol
1488</dt>
1489<dd>
1490<p>
Junio C Hamano3a702342007-12-12 21:34:021491 Ignore changes in whitespace at EOL.
Junio C Hamanofd468962007-02-14 23:45:041492</p>
1493</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591494<dt class="hdlist1">
Junio C Hamanobbbb8652008-12-29 10:34:221495-b
1496</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591497<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061498--ignore-space-change
1499</dt>
1500<dd>
1501<p>
Junio C Hamano3a702342007-12-12 21:34:021502 Ignore changes in amount of whitespace. This ignores whitespace
1503 at line end, and considers all other sequences of one or
1504 more whitespace characters to be equivalent.
Junio C Hamano47848ae2006-12-14 11:20:061505</p>
1506</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591507<dt class="hdlist1">
Junio C Hamanobbbb8652008-12-29 10:34:221508-w
Junio C Hamano47848ae2006-12-14 11:20:061509</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591510<dt class="hdlist1">
Junio C Hamano47848ae2006-12-14 11:20:061511--ignore-all-space
1512</dt>
1513<dd>
1514<p>
Junio C Hamano3a702342007-12-12 21:34:021515 Ignore whitespace when comparing lines. This ignores
1516 differences even if one line has whitespace where the other
Junio C Hamano47848ae2006-12-14 11:20:061517 line has none.
1518</p>
1519</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591520<dt class="hdlist1">
Junio C Hamano1d40ee82009-01-07 10:14:161521--inter-hunk-context=&lt;lines&gt;
1522</dt>
1523<dd>
1524<p>
1525 Show the context between diff hunks, up to the specified number
1526 of lines, thereby fusing hunks that are close to each other.
1527</p>
1528</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591529<dt class="hdlist1">
Junio C Hamano11821ed2011-10-19 18:42:091530-W
1531</dt>
1532<dt class="hdlist1">
1533--function-context
1534</dt>
1535<dd>
1536<p>
1537 Show whole surrounding functions of changes.
1538</p>
1539</dd>
1540<dt class="hdlist1">
Junio C Hamano48fd2f62007-03-19 02:02:301541--exit-code
1542</dt>
1543<dd>
1544<p>
1545 Make the program exit with codes similar to diff(1).
1546 That is, it exits with 1 if there were differences and
1547 0 means no differences.
1548</p>
1549</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591550<dt class="hdlist1">
Junio C Hamano35e57552007-03-25 07:54:351551--quiet
1552</dt>
1553<dd>
1554<p>
Junio C Hamano9629d4f2012-12-19 00:28:271555 Disable all output of the program. Implies <code>--exit-code</code>.
Junio C Hamano35e57552007-03-25 07:54:351556</p>
1557</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591558<dt class="hdlist1">
Junio C Hamanobb0f4042007-07-04 06:41:401559--ext-diff
1560</dt>
1561<dd>
1562<p>
1563 Allow an external diff helper to be executed. If you set an
Junio C Hamanoa28a9202012-06-21 07:08:231564 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
1565 to use this option with <a href="git-log.html">git-log(1)</a> and friends.
Junio C Hamanobb0f4042007-07-04 06:41:401566</p>
1567</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591568<dt class="hdlist1">
Junio C Hamanobb0f4042007-07-04 06:41:401569--no-ext-diff
1570</dt>
1571<dd>
1572<p>
1573 Disallow external diff drivers.
1574</p>
1575</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591576<dt class="hdlist1">
Junio C Hamanoc652aed2011-07-07 01:14:311577--textconv
1578</dt>
1579<dt class="hdlist1">
1580--no-textconv
1581</dt>
1582<dd>
1583<p>
1584 Allow (or disallow) external text conversion filters to be run
Junio C Hamanoa28a9202012-06-21 07:08:231585 when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for
Junio C Hamanoc652aed2011-07-07 01:14:311586 details. Because textconv filters are typically a one-way
1587 conversion, the resulting diff is suitable for human
1588 consumption, but cannot be applied. For this reason, textconv
Junio C Hamanoa28a9202012-06-21 07:08:231589 filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and
1590 <a href="git-log.html">git-log(1)</a>, but not for <a href="git-format-patch.html">git-format-patch(1)</a> or
Junio C Hamanoc652aed2011-07-07 01:14:311591 diff plumbing commands.
1592</p>
1593</dd>
1594<dt class="hdlist1">
Junio C Hamano7d449522010-07-01 00:08:511595--ignore-submodules[=&lt;when&gt;]
Junio C Hamanodfccbb02008-05-26 01:16:141596</dt>
1597<dd>
1598<p>
Junio C Hamano7d449522010-07-01 00:08:511599 Ignore changes to submodules in the diff generation. &lt;when&gt; can be
Junio C Hamano619596a2010-08-18 22:15:351600 either "none", "untracked", "dirty" or "all", which is the default
1601 Using "none" will consider the submodule modified when it either contains
1602 untracked or modified files or its HEAD differs from the commit recorded
1603 in the superproject and can be used to override any settings of the
Junio C Hamanoa28a9202012-06-21 07:08:231604 <em>ignore</em> option in <a href="git-config.html">git-config(1)</a> or <a href="gitmodules.html">gitmodules(5)</a>. When
Junio C Hamano7d449522010-07-01 00:08:511605 "untracked" is used submodules are not considered dirty when they only
1606 contain untracked content (but they are still scanned for modified
1607 content). Using "dirty" ignores all changes to the work tree of submodules,
1608 only changes to the commits stored in the superproject are shown (this was
1609 the behavior until 1.7.0). Using "all" hides all changes to submodules.
Junio C Hamanodfccbb02008-05-26 01:16:141610</p>
1611</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591612<dt class="hdlist1">
Junio C Hamanoe27cbd22007-12-21 17:57:331613--src-prefix=&lt;prefix&gt;
1614</dt>
1615<dd>
1616<p>
1617 Show the given source prefix instead of "a/".
1618</p>
1619</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591620<dt class="hdlist1">
Junio C Hamanoe27cbd22007-12-21 17:57:331621--dst-prefix=&lt;prefix&gt;
1622</dt>
1623<dd>
1624<p>
1625 Show the given destination prefix instead of "b/".
1626</p>
1627</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591628<dt class="hdlist1">
Junio C Hamanoe27cbd22007-12-21 17:57:331629--no-prefix
1630</dt>
1631<dd>
1632<p>
1633 Do not show any source or destination prefix.
1634</p>
1635</dd>
Junio C Hamano0868a302008-07-22 09:20:441636</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591637<div class="paragraph"><p>For more detailed explanation on these common options, see also
Junio C Hamanoa28a9202012-06-21 07:08:231638<a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591639<div class="dlist"><dl>
1640<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231641&lt;path&gt;&#8230;
1642</dt>
1643<dd>
1644<p>
Junio C Hamano47848ae2006-12-14 11:20:061645 The &lt;paths&gt; parameters, when given, are used to limit
1646 the diff to the named paths (you can give directory
1647 names and get diff for all files under them).
Junio C Hamano1a4e8412005-12-27 08:17:231648</p>
1649</dd>
Junio C Hamano0868a302008-07-22 09:20:441650</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:231651</div>
Junio C Hamano9629d4f2012-12-19 00:28:271652</div>
1653<div class="sect1">
Junio C Hamano543f8d62009-07-29 08:35:211654<h2 id="_raw_output_format">Raw output format</h2>
Junio C Hamano7ae0ab22007-11-03 02:46:461655<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591656<div class="paragraph"><p>The raw output format from "git-diff-index", "git-diff-tree",
Junio C Hamano0868a302008-07-22 09:20:441657"git-diff-files" and "git diff --raw" are very similar.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591658<div class="paragraph"><p>These commands all compare two sets of things; what is
Junio C Hamano0868a302008-07-22 09:20:441659compared differs:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591660<div class="dlist"><dl>
1661<dt class="hdlist1">
Junio C Hamano7ae0ab22007-11-03 02:46:461662git-diff-index &lt;tree-ish&gt;
1663</dt>
1664<dd>
1665<p>
1666 compares the &lt;tree-ish&gt; and the files on the filesystem.
1667</p>
1668</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591669<dt class="hdlist1">
Junio C Hamano7ae0ab22007-11-03 02:46:461670git-diff-index --cached &lt;tree-ish&gt;
1671</dt>
1672<dd>
1673<p>
1674 compares the &lt;tree-ish&gt; and the index.
1675</p>
1676</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591677<dt class="hdlist1">
Junio C Hamano7ae0ab22007-11-03 02:46:461678git-diff-tree [-r] &lt;tree-ish-1&gt; &lt;tree-ish-2&gt; [&lt;pattern&gt;&#8230;]
1679</dt>
1680<dd>
1681<p>
1682 compares the trees named by the two arguments.
1683</p>
1684</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591685<dt class="hdlist1">
Junio C Hamano7ae0ab22007-11-03 02:46:461686git-diff-files [&lt;pattern&gt;&#8230;]
1687</dt>
1688<dd>
1689<p>
1690 compares the index and the files on the filesystem.
1691</p>
1692</dd>
Junio C Hamano0868a302008-07-22 09:20:441693</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591694<div class="paragraph"><p>The "git-diff-tree" command begins its output by printing the hash of
Junio C Hamano543f8d62009-07-29 08:35:211695what is being compared. After that, all the commands print one output
1696line per changed file.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591697<div class="paragraph"><p>An output line is formatted this way:</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:461698<div class="listingblock">
1699<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271700<pre><code>in-place edit :100644 100644 bcd1234... 0123456... M file0
Junio C Hamano7ae0ab22007-11-03 02:46:461701copy-edit :100644 100644 abcd123... 1234567... C68 file1 file2
1702rename-edit :100644 100644 abcd123... 1234567... R86 file1 file3
1703create :000000 100644 0000000... 1234567... A file4
1704delete :100644 000000 1234567... 0000000... D file5
Junio C Hamano9629d4f2012-12-19 00:28:271705unmerged :000000 000000 0000000... 0000000... U file6</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:461706</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591707<div class="paragraph"><p>That is, from the left to the right:</p></div>
1708<div class="olist arabic"><ol class="arabic">
Junio C Hamano7ae0ab22007-11-03 02:46:461709<li>
1710<p>
1711a colon.
1712</p>
1713</li>
1714<li>
1715<p>
1716mode for "src"; 000000 if creation or unmerged.
1717</p>
1718</li>
1719<li>
1720<p>
1721a space.
1722</p>
1723</li>
1724<li>
1725<p>
1726mode for "dst"; 000000 if deletion or unmerged.
1727</p>
1728</li>
1729<li>
1730<p>
1731a space.
1732</p>
1733</li>
1734<li>
1735<p>
1736sha1 for "src"; 0{40} if creation or unmerged.
1737</p>
1738</li>
1739<li>
1740<p>
1741a space.
1742</p>
1743</li>
1744<li>
1745<p>
1746sha1 for "dst"; 0{40} if creation, unmerged or "look at work tree".
1747</p>
1748</li>
1749<li>
1750<p>
1751a space.
1752</p>
1753</li>
1754<li>
1755<p>
1756status, followed by optional "score" number.
1757</p>
1758</li>
1759<li>
1760<p>
1761a tab or a NUL when <em>-z</em> option is used.
1762</p>
1763</li>
1764<li>
1765<p>
1766path for "src"
1767</p>
1768</li>
1769<li>
1770<p>
1771a tab or a NUL when <em>-z</em> option is used; only exists for C or R.
1772</p>
1773</li>
1774<li>
1775<p>
1776path for "dst"; only exists for C or R.
1777</p>
1778</li>
1779<li>
1780<p>
1781an LF or a NUL when <em>-z</em> option is used, to terminate the record.
1782</p>
1783</li>
Junio C Hamano0868a302008-07-22 09:20:441784</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:591785<div class="paragraph"><p>Possible status letters are:</p></div>
1786<div class="ulist"><ul>
Junio C Hamanoaa17c7c2008-11-03 04:36:581787<li>
1788<p>
1789A: addition of a file
1790</p>
1791</li>
1792<li>
1793<p>
1794C: copy of a file into a new one
1795</p>
1796</li>
1797<li>
1798<p>
1799D: deletion of a file
1800</p>
1801</li>
1802<li>
1803<p>
1804M: modification of the contents or mode of a file
1805</p>
1806</li>
1807<li>
1808<p>
1809R: renaming of a file
1810</p>
1811</li>
1812<li>
1813<p>
1814T: change in the type of the file
1815</p>
1816</li>
1817<li>
1818<p>
1819U: file is unmerged (you must complete the merge before it can
1820be committed)
1821</p>
1822</li>
1823<li>
1824<p>
1825X: "unknown" change type (most probably a bug, please report it)
1826</p>
1827</li>
1828</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:591829<div class="paragraph"><p>Status letters C and R are always followed by a score (denoting the
Junio C Hamanoaa17c7c2008-11-03 04:36:581830percentage of similarity between the source and target of the move or
1831copy), and are the only ones to be so.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591832<div class="paragraph"><p>&lt;sha1&gt; is shown as all 0&#8217;s if a file is new on the filesystem
Junio C Hamano0868a302008-07-22 09:20:441833and it is out of sync with the index.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591834<div class="paragraph"><p>Example:</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:461835<div class="listingblock">
1836<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271837<pre><code>:100644 100644 5be4a4...... 000000...... M file.c</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:461838</div></div>
Junio C Hamano9629d4f2012-12-19 00:28:271839<div class="paragraph"><p>When <code>-z</code> option is not used, TAB, LF, and backslash characters
1840in pathnames are represented as <code>\t</code>, <code>\n</code>, and <code>\\</code>,
Junio C Hamano0868a302008-07-22 09:20:441841respectively.</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:461842</div>
Junio C Hamano9629d4f2012-12-19 00:28:271843</div>
1844<div class="sect1">
Junio C Hamano0868a302008-07-22 09:20:441845<h2 id="_diff_format_for_merges">diff format for merges</h2>
Junio C Hamano7ae0ab22007-11-03 02:46:461846<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591847<div class="paragraph"><p>"git-diff-tree", "git-diff-files" and "git-diff --raw"
Junio C Hamano7ae0ab22007-11-03 02:46:461848can take <em>-c</em> or <em>--cc</em> option
1849to generate diff output also for merge commits. The output differs
Junio C Hamano0868a302008-07-22 09:20:441850from the format described above in the following way:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591851<div class="olist arabic"><ol class="arabic">
Junio C Hamano7ae0ab22007-11-03 02:46:461852<li>
1853<p>
1854there is a colon for each parent
1855</p>
1856</li>
1857<li>
1858<p>
1859there are more "src" modes and "src" sha1
1860</p>
1861</li>
1862<li>
1863<p>
1864status is concatenated status characters for each parent
1865</p>
1866</li>
1867<li>
1868<p>
1869no optional "score" number
1870</p>
1871</li>
1872<li>
1873<p>
1874single path, only for "dst"
1875</p>
1876</li>
Junio C Hamano0868a302008-07-22 09:20:441877</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:591878<div class="paragraph"><p>Example:</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:461879<div class="listingblock">
1880<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271881<pre><code>::100644 100644 100644 fabadb8... cc95eb0... 4866510... MM describe.c</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:461882</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591883<div class="paragraph"><p>Note that <em>combined diff</em> lists only files which were modified from
Junio C Hamano0868a302008-07-22 09:20:441884all parents.</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:461885</div>
Junio C Hamano9629d4f2012-12-19 00:28:271886</div>
1887<div class="sect1">
Junio C Hamano0868a302008-07-22 09:20:441888<h2 id="_generating_patches_with_p">Generating patches with -p</h2>
Junio C Hamano7ae0ab22007-11-03 02:46:461889<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591890<div class="paragraph"><p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
Junio C Hamano00b8b632007-12-07 09:50:491891with a <em>-p</em> option, "git diff" without the <em>--raw</em> option, or
1892"git log" with the "-p" option, they
Junio C Hamano7ae0ab22007-11-03 02:46:461893do not produce the output described above; instead they produce a
1894patch file. You can customize the creation of such patches via the
Junio C Hamano0868a302008-07-22 09:20:441895GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591896<div class="paragraph"><p>What the -p option produces is slightly different from the traditional
Junio C Hamano7f9fa862010-10-19 23:51:141897diff format:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591898<div class="olist arabic"><ol class="arabic">
Junio C Hamano7ae0ab22007-11-03 02:46:461899<li>
1900<p>
Junio C Hamano7f9fa862010-10-19 23:51:141901It is preceded with a "git diff" header that looks like this:
Junio C Hamano7ae0ab22007-11-03 02:46:461902</p>
1903<div class="literalblock">
1904<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271905<pre><code>diff --git a/file1 b/file2</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:461906</div></div>
Junio C Hamano9629d4f2012-12-19 00:28:271907<div class="paragraph"><p>The <code>a/</code> and <code>b/</code> filenames are the same unless rename/copy is
Junio C Hamano7ae0ab22007-11-03 02:46:461908involved. Especially, even for a creation or a deletion,
Junio C Hamano9629d4f2012-12-19 00:28:271909<code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p></div>
1910<div class="paragraph"><p>When rename/copy is involved, <code>file1</code> and <code>file2</code> show the
Junio C Hamano7ae0ab22007-11-03 02:46:461911name of the source file of the rename/copy and the name of
Junio C Hamano0868a302008-07-22 09:20:441912the file that rename/copy produces, respectively.</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:461913</li>
1914<li>
1915<p>
1916It is followed by one or more extended header lines:
1917</p>
1918<div class="literalblock">
1919<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271920<pre><code>old mode &lt;mode&gt;
Junio C Hamano7ae0ab22007-11-03 02:46:461921new mode &lt;mode&gt;
1922deleted file mode &lt;mode&gt;
1923new file mode &lt;mode&gt;
1924copy from &lt;path&gt;
1925copy to &lt;path&gt;
1926rename from &lt;path&gt;
1927rename to &lt;path&gt;
1928similarity index &lt;number&gt;
1929dissimilarity index &lt;number&gt;
Junio C Hamano9629d4f2012-12-19 00:28:271930index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:461931</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591932<div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type
Junio C Hamano7f9fa862010-10-19 23:51:141933and file permission bits.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271934<div class="paragraph"><p>Path names in extended headers do not include the <code>a/</code> and <code>b/</code> prefixes.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591935<div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and
Junio C Hamano7f9fa862010-10-19 23:51:141936the dissimilarity index is the percentage of changed lines. It
1937is a rounded down integer, followed by a percent sign. The
1938similarity index value of 100% is thus reserved for two equal
1939files, while 100% dissimilarity means that no line from the old
1940file made it into the new one.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591941<div class="paragraph"><p>The index line includes the SHA-1 checksum before and after the change.
Junio C Hamano7f9fa862010-10-19 23:51:141942The &lt;mode&gt; is included if the file mode does not change; otherwise,
1943separate lines indicate the old and the new mode.</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:461944</li>
1945<li>
1946<p>
1947TAB, LF, double quote and backslash characters in pathnames
Junio C Hamano9629d4f2012-12-19 00:28:271948 are represented as <code>\t</code>, <code>\n</code>, <code>\"</code> and <code>\\</code>, respectively.
Junio C Hamano7ae0ab22007-11-03 02:46:461949 If there is need for such substitution then the whole
1950 pathname is put in double quotes.
1951</p>
1952</li>
Junio C Hamano7f9fa862010-10-19 23:51:141953<li>
1954<p>
Junio C Hamano9629d4f2012-12-19 00:28:271955All the <code>file1</code> files in the output refer to files before the
1956 commit, and all the <code>file2</code> files refer to files after the commit.
Junio C Hamano7f9fa862010-10-19 23:51:141957 It is incorrect to apply each change to each file sequentially. For
1958 example, this patch will swap a and b:
1959</p>
1960<div class="literalblock">
1961<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271962<pre><code>diff --git a/a b/b
Junio C Hamano7f9fa862010-10-19 23:51:141963rename from a
1964rename to b
1965diff --git a/b b/a
1966rename from b
Junio C Hamano9629d4f2012-12-19 00:28:271967rename to a</code></pre>
Junio C Hamano7f9fa862010-10-19 23:51:141968</div></div>
1969</li>
Junio C Hamano0868a302008-07-22 09:20:441970</ol></div>
Junio C Hamano7ae0ab22007-11-03 02:46:461971</div>
Junio C Hamano9629d4f2012-12-19 00:28:271972</div>
1973<div class="sect1">
Junio C Hamano0868a302008-07-22 09:20:441974<h2 id="_combined_diff_format">combined diff format</h2>
Junio C Hamano7ae0ab22007-11-03 02:46:461975<div class="sectionbody">
Junio C Hamano9629d4f2012-12-19 00:28:271976<div class="paragraph"><p>Any diff-generating command can take the &#8216;-c` or <code>--cc</code> option to
Junio C Hamanoc5be4cc2011-03-09 07:20:431977produce a <em>combined diff</em> when showing a merge. This is the default
Junio C Hamanoa28a9202012-06-21 07:08:231978format when showing merges with <a href="git-diff.html">git-diff(1)</a> or
1979<a href="git-show.html">git-show(1)</a>. Note also that you can give the `-m&#8217; option to any
Junio C Hamanoc5be4cc2011-03-09 07:20:431980of these commands to force generation of diffs with individual parents
1981of a merge.</p></div>
1982<div class="paragraph"><p>A <em>combined diff</em> format looks like this:</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:461983<div class="listingblock">
1984<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:271985<pre><code>diff --combined describe.c
Junio C Hamano7ae0ab22007-11-03 02:46:461986index fabadb8,cc95eb0..4866510
1987--- a/describe.c
1988+++ b/describe.c
1989@@@ -98,20 -98,12 +98,20 @@@
1990 return (a_date &gt; b_date) ? -1 : (a_date == b_date) ? 0 : 1;
1991 }
1992
1993- static void describe(char *arg)
1994 -static void describe(struct commit *cmit, int last_one)
1995++static void describe(char *arg, int last_one)
1996 {
1997 + unsigned char sha1[20];
1998 + struct commit *cmit;
1999 struct commit_list *list;
2000 static int initialized = 0;
2001 struct commit_name *n;
2002
2003 + if (get_sha1(arg, sha1) &lt; 0)
2004 + usage(describe_usage);
2005 + cmit = lookup_commit_reference(sha1);
2006 + if (!cmit)
2007 + usage(describe_usage);
2008 +
2009 if (!initialized) {
2010 initialized = 1;
Junio C Hamano9629d4f2012-12-19 00:28:272011 for_each_ref(get_name);</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:462012</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592013<div class="olist arabic"><ol class="arabic">
Junio C Hamano7ae0ab22007-11-03 02:46:462014<li>
2015<p>
2016It is preceded with a "git diff" header, that looks like
2017 this (when <em>-c</em> option is used):
2018</p>
2019<div class="literalblock">
2020<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272021<pre><code>diff --combined file</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:462022</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592023<div class="paragraph"><p>or like this (when <em>--cc</em> option is used):</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:462024<div class="literalblock">
2025<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272026<pre><code>diff --cc file</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:462027</div></div>
2028</li>
2029<li>
2030<p>
2031It is followed by one or more extended header lines
2032 (this example shows a merge with two parents):
2033</p>
2034<div class="literalblock">
2035<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272036<pre><code>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
Junio C Hamano7ae0ab22007-11-03 02:46:462037mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;
2038new file mode &lt;mode&gt;
Junio C Hamano9629d4f2012-12-19 00:28:272039deleted file mode &lt;mode&gt;,&lt;mode&gt;</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:462040</div></div>
Junio C Hamano9629d4f2012-12-19 00:28:272041<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
Junio C Hamano7ae0ab22007-11-03 02:46:462042the &lt;mode&gt; is different from the rest. Extended headers with
2043information about detected contents movement (renames and
2044copying detection) are designed to work with diff of two
Junio C Hamano0868a302008-07-22 09:20:442045&lt;tree-ish&gt; and are not used by combined diff format.</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:462046</li>
2047<li>
2048<p>
2049It is followed by two-line from-file/to-file header
2050</p>
2051<div class="literalblock">
2052<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272053<pre><code>--- a/file
2054+++ b/file</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:462055</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592056<div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff
Junio C Hamano9629d4f2012-12-19 00:28:272057format, <code>/dev/null</code> is used to signal created or deleted
Junio C Hamano0868a302008-07-22 09:20:442058files.</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:462059</li>
2060<li>
2061<p>
2062Chunk header format is modified to prevent people from
Junio C Hamano9629d4f2012-12-19 00:28:272063 accidentally feeding it to <code>patch -p1</code>. Combined diff format
Junio C Hamano7ae0ab22007-11-03 02:46:462064 was created for review of merge commit changes, and was not
2065 meant for apply. The change is similar to the change in the
2066 extended <em>index</em> header:
2067</p>
2068<div class="literalblock">
2069<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272070<pre><code>@@@ &lt;from-file-range&gt; &lt;from-file-range&gt; &lt;to-file-range&gt; @@@</code></pre>
Junio C Hamano7ae0ab22007-11-03 02:46:462071</div></div>
Junio C Hamano9629d4f2012-12-19 00:28:272072<div class="paragraph"><p>There are (number of parents + 1) <code>@</code> characters in the chunk
Junio C Hamano0868a302008-07-22 09:20:442073header for combined diff format.</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:462074</li>
Junio C Hamano0868a302008-07-22 09:20:442075</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:592076<div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two
Junio C Hamano9629d4f2012-12-19 00:28:272077files 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
2078added to B), or <code>" "</code> (space&#8201;&#8212;&#8201;unchanged) prefix, this format
Junio C Hamano7ae0ab22007-11-03 02:46:462079compares two or more files file1, file2,&#8230; with one file X, and
2080shows how X differs from each of fileN. One column for each of
Junio C Hamano68cf15a2010-11-06 01:01:592081fileN is prepended to the output line to note how X&#8217;s line is
Junio C Hamano0868a302008-07-22 09:20:442082different from it.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:272083<div class="paragraph"><p>A <code>-</code> character in the column N means that the line appears in
2084fileN but it does not appear in the result. A <code>+</code> character
Junio C Hamano54bf1e22008-12-20 06:30:112085in the column N means that the line appears in the result,
Junio C Hamano7ae0ab22007-11-03 02:46:462086and fileN does not have that line (in other words, the line was
Junio C Hamano0868a302008-07-22 09:20:442087added, from the point of view of that parent).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592088<div class="paragraph"><p>In the above example output, the function signature was changed
Junio C Hamano9629d4f2012-12-19 00:28:272089from both files (hence two <code>-</code> removals from both file1 and
2090file2, plus <code>++</code> to mean one line that was added does not appear
Junio C Hamano54bf1e22008-12-20 06:30:112091in either file1 nor file2). Also eight other lines are the same
Junio C Hamano9629d4f2012-12-19 00:28:272092from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p></div>
2093<div class="paragraph"><p>When shown by <code>git diff-tree -c</code>, it compares the parents of a
Junio C Hamano7ae0ab22007-11-03 02:46:462094merge commit with the merge result (i.e. file1..fileN are the
Junio C Hamano9629d4f2012-12-19 00:28:272095parents). When shown by <code>git diff-files -c</code>, it compares the
Junio C Hamano7ae0ab22007-11-03 02:46:462096two unresolved merge parents with the working tree file
2097(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
Junio C Hamano0868a302008-07-22 09:20:442098"their version").</p></div>
Junio C Hamano7ae0ab22007-11-03 02:46:462099</div>
Junio C Hamano9629d4f2012-12-19 00:28:272100</div>
2101<div class="sect1">
Junio C Hamano0868a302008-07-22 09:20:442102<h2 id="_other_diff_formats">other diff formats</h2>
Junio C Hamano3a702342007-12-12 21:34:022103<div class="sectionbody">
Junio C Hamano9629d4f2012-12-19 00:28:272104<div class="paragraph"><p>The <code>--summary</code> option describes newly added, deleted, renamed and
2105copied files. The <code>--stat</code> option adds diffstat(1) graph to the
Junio C Hamano3a702342007-12-12 21:34:022106output. These options can be combined with other options, such as
Junio C Hamano9629d4f2012-12-19 00:28:272107<code>-p</code>, and are meant for human consumption.</p></div>
2108<div class="paragraph"><p>When showing a change that involves a rename or a copy, <code>--stat</code> output
Junio C Hamano3a702342007-12-12 21:34:022109formats the pathnames compactly by combining common prefix and suffix of
Junio C Hamano9629d4f2012-12-19 00:28:272110the pathnames. For example, a change that moves <code>arch/i386/Makefile</code> to
2111<code>arch/x86/Makefile</code> while modifying 4 lines will be shown like this:</p></div>
Junio C Hamano3a702342007-12-12 21:34:022112<div class="listingblock">
2113<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272114<pre><code>arch/{i386 =&gt; x86}/Makefile | 4 +--</code></pre>
Junio C Hamano3a702342007-12-12 21:34:022115</div></div>
Junio C Hamano9629d4f2012-12-19 00:28:272116<div class="paragraph"><p>The <code>--numstat</code> option gives the diffstat(1) information but is designed
2117for easier machine consumption. An entry in <code>--numstat</code> output looks
Junio C Hamano0868a302008-07-22 09:20:442118like this:</p></div>
Junio C Hamano3a702342007-12-12 21:34:022119<div class="listingblock">
2120<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272121<pre><code>1 2 README
21223 1 arch/{i386 =&gt; x86}/Makefile</code></pre>
Junio C Hamano3a702342007-12-12 21:34:022123</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592124<div class="paragraph"><p>That is, from left to right:</p></div>
2125<div class="olist arabic"><ol class="arabic">
Junio C Hamano3a702342007-12-12 21:34:022126<li>
2127<p>
2128the number of added lines;
2129</p>
2130</li>
2131<li>
2132<p>
2133a tab;
2134</p>
2135</li>
2136<li>
2137<p>
2138the number of deleted lines;
2139</p>
2140</li>
2141<li>
2142<p>
2143a tab;
2144</p>
2145</li>
2146<li>
2147<p>
2148pathname (possibly with rename/copy information);
2149</p>
2150</li>
2151<li>
2152<p>
2153a newline.
2154</p>
2155</li>
Junio C Hamano0868a302008-07-22 09:20:442156</ol></div>
Junio C Hamano9629d4f2012-12-19 00:28:272157<div class="paragraph"><p>When <code>-z</code> output option is in effect, the output is formatted this way:</p></div>
Junio C Hamano3a702342007-12-12 21:34:022158<div class="listingblock">
2159<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272160<pre><code>1 2 README NUL
21613 1 NUL arch/i386/Makefile NUL arch/x86/Makefile NUL</code></pre>
Junio C Hamano3a702342007-12-12 21:34:022162</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592163<div class="paragraph"><p>That is:</p></div>
2164<div class="olist arabic"><ol class="arabic">
Junio C Hamano3a702342007-12-12 21:34:022165<li>
2166<p>
2167the number of added lines;
2168</p>
2169</li>
2170<li>
2171<p>
2172a tab;
2173</p>
2174</li>
2175<li>
2176<p>
2177the number of deleted lines;
2178</p>
2179</li>
2180<li>
2181<p>
2182a tab;
2183</p>
2184</li>
2185<li>
2186<p>
2187a NUL (only exists if renamed/copied);
2188</p>
2189</li>
2190<li>
2191<p>
2192pathname in preimage;
2193</p>
2194</li>
2195<li>
2196<p>
2197a NUL (only exists if renamed/copied);
2198</p>
2199</li>
2200<li>
2201<p>
2202pathname in postimage (only exists if renamed/copied);
2203</p>
2204</li>
2205<li>
2206<p>
2207a NUL.
2208</p>
2209</li>
Junio C Hamano0868a302008-07-22 09:20:442210</ol></div>
Junio C Hamano9629d4f2012-12-19 00:28:272211<div class="paragraph"><p>The extra <code>NUL</code> before the preimage path in renamed case is to allow
Junio C Hamano3a702342007-12-12 21:34:022212scripts that read the output to tell if the current record being read is
2213a single-path record or a rename/copy record without reading ahead.
Junio C Hamano9629d4f2012-12-19 00:28:272214After reading added and deleted lines, reading up to <code>NUL</code> would yield
2215the pathname, but if that is <code>NUL</code>, the record will show two paths.</p></div>
Junio C Hamano3a702342007-12-12 21:34:022216</div>
Junio C Hamano9629d4f2012-12-19 00:28:272217</div>
2218<div class="sect1">
Junio C Hamano0868a302008-07-22 09:20:442219<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:232220<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592221<div class="dlist"><dl>
2222<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:232223Various ways to check your working tree
2224</dt>
2225<dd>
2226<div class="listingblock">
2227<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272228<pre><code>$ git diff <b>&lt;1&gt;</b>
Junio C Hamano68cf15a2010-11-06 01:01:592229$ git diff --cached <b>&lt;2&gt;</b>
Junio C Hamano9629d4f2012-12-19 00:28:272230$ git diff HEAD <b>&lt;3&gt;</b></code></pre>
Junio C Hamano1a4e8412005-12-27 08:17:232231</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592232<div class="colist arabic"><ol>
Junio C Hamanoc8d88c22006-04-29 07:02:012233<li>
2234<p>
Junio C Hamano092f5f02007-08-02 07:23:382235Changes in the working tree not yet staged for the next commit.
Junio C Hamanoc8d88c22006-04-29 07:02:012236</p>
2237</li>
2238<li>
2239<p>
Junio C Hamano092f5f02007-08-02 07:23:382240Changes between the index and your last commit; what you
Junio C Hamanoc8d88c22006-04-29 07:02:012241would be committing if you run "git commit" without "-a" option.
2242</p>
2243</li>
2244<li>
2245<p>
Junio C Hamano092f5f02007-08-02 07:23:382246Changes in the working tree since your last commit; what you
Junio C Hamanoc8d88c22006-04-29 07:02:012247would be committing if you run "git commit -a"
2248</p>
2249</li>
Junio C Hamano0868a302008-07-22 09:20:442250</ol></div>
Junio C Hamano1a4e8412005-12-27 08:17:232251</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592252<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:232253Comparing with arbitrary commits
2254</dt>
2255<dd>
2256<div class="listingblock">
2257<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272258<pre><code>$ git diff test <b>&lt;1&gt;</b>
Junio C Hamano68cf15a2010-11-06 01:01:592259$ git diff HEAD -- ./test <b>&lt;2&gt;</b>
Junio C Hamano9629d4f2012-12-19 00:28:272260$ git diff HEAD^ HEAD <b>&lt;3&gt;</b></code></pre>
Junio C Hamanoc8d88c22006-04-29 07:02:012261</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592262<div class="colist arabic"><ol>
Junio C Hamanoc8d88c22006-04-29 07:02:012263<li>
2264<p>
Junio C Hamano092f5f02007-08-02 07:23:382265Instead of using the tip of the current branch, compare with the
Junio C Hamano1a4e8412005-12-27 08:17:232266tip of "test" branch.
Junio C Hamanoc8d88c22006-04-29 07:02:012267</p>
2268</li>
2269<li>
2270<p>
Junio C Hamano092f5f02007-08-02 07:23:382271Instead of comparing with the tip of "test" branch, compare with
Junio C Hamano235a91e2006-01-07 01:13:582272the tip of the current branch, but limit the comparison to the
Junio C Hamano1a4e8412005-12-27 08:17:232273file "test".
Junio C Hamanoc8d88c22006-04-29 07:02:012274</p>
2275</li>
2276<li>
2277<p>
Junio C Hamano092f5f02007-08-02 07:23:382278Compare the version before the last commit and the last commit.
Junio C Hamanoc8d88c22006-04-29 07:02:012279</p>
2280</li>
Junio C Hamano0868a302008-07-22 09:20:442281</ol></div>
Junio C Hamano1a4e8412005-12-27 08:17:232282</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592283<dt class="hdlist1">
Junio C Hamanoc435b1c2007-08-28 06:25:352284Comparing branches
2285</dt>
2286<dd>
2287<div class="listingblock">
2288<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272289<pre><code>$ git diff topic master <b>&lt;1&gt;</b>
Junio C Hamano68cf15a2010-11-06 01:01:592290$ git diff topic..master <b>&lt;2&gt;</b>
Junio C Hamano9629d4f2012-12-19 00:28:272291$ git diff topic...master <b>&lt;3&gt;</b></code></pre>
Junio C Hamanoc435b1c2007-08-28 06:25:352292</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592293<div class="colist arabic"><ol>
Junio C Hamanoc435b1c2007-08-28 06:25:352294<li>
2295<p>
2296Changes between the tips of the topic and the master branches.
2297</p>
2298</li>
2299<li>
2300<p>
2301Same as above.
2302</p>
2303</li>
2304<li>
2305<p>
Junio C Hamano764a6672007-10-23 01:23:312306Changes that occurred on the master branch since when the topic
Junio C Hamanoc435b1c2007-08-28 06:25:352307branch was started off it.
2308</p>
2309</li>
Junio C Hamano0868a302008-07-22 09:20:442310</ol></div>
Junio C Hamanoc435b1c2007-08-28 06:25:352311</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592312<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:232313Limiting the diff output
2314</dt>
2315<dd>
2316<div class="listingblock">
2317<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272318<pre><code>$ git diff --diff-filter=MRC <b>&lt;1&gt;</b>
Junio C Hamano68cf15a2010-11-06 01:01:592319$ git diff --name-status <b>&lt;2&gt;</b>
Junio C Hamano9629d4f2012-12-19 00:28:272320$ git diff arch/i386 include/asm-i386 <b>&lt;3&gt;</b></code></pre>
Junio C Hamanoc8d88c22006-04-29 07:02:012321</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592322<div class="colist arabic"><ol>
Junio C Hamanoc8d88c22006-04-29 07:02:012323<li>
2324<p>
Junio C Hamano092f5f02007-08-02 07:23:382325Show only modification, rename and copy, but not addition
Junio C Hamano1a4e8412005-12-27 08:17:232326nor deletion.
Junio C Hamanoc8d88c22006-04-29 07:02:012327</p>
2328</li>
2329<li>
2330<p>
Junio C Hamano092f5f02007-08-02 07:23:382331Show only names and the nature of change, but not actual
Junio C Hamanobdeff822007-07-30 09:07:172332diff output.
Junio C Hamanoc8d88c22006-04-29 07:02:012333</p>
2334</li>
2335<li>
2336<p>
Junio C Hamano092f5f02007-08-02 07:23:382337Limit diff output to named subtrees.
Junio C Hamanoc8d88c22006-04-29 07:02:012338</p>
2339</li>
Junio C Hamano0868a302008-07-22 09:20:442340</ol></div>
Junio C Hamano1a4e8412005-12-27 08:17:232341</dd>
Junio C Hamano68cf15a2010-11-06 01:01:592342<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:232343Munging the diff output
2344</dt>
2345<dd>
2346<div class="listingblock">
2347<div class="content">
Junio C Hamano9629d4f2012-12-19 00:28:272348<pre><code>$ git diff --find-copies-harder -B -C <b>&lt;1&gt;</b>
2349$ git diff -R <b>&lt;2&gt;</b></code></pre>
Junio C Hamano1a4e8412005-12-27 08:17:232350</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592351<div class="colist arabic"><ol>
Junio C Hamanoc8d88c22006-04-29 07:02:012352<li>
2353<p>
Junio C Hamano092f5f02007-08-02 07:23:382354Spend extra cycles to find renames, copies and complete
Junio C Hamanoc8d88c22006-04-29 07:02:012355rewrites (very expensive).
2356</p>
2357</li>
2358<li>
2359<p>
Junio C Hamano092f5f02007-08-02 07:23:382360Output diff in reverse.
Junio C Hamanoc8d88c22006-04-29 07:02:012361</p>
2362</li>
Junio C Hamano0868a302008-07-22 09:20:442363</ol></div>
Junio C Hamano1a4e8412005-12-27 08:17:232364</dd>
Junio C Hamano0868a302008-07-22 09:20:442365</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:232366</div>
Junio C Hamano9629d4f2012-12-19 00:28:272367</div>
2368<div class="sect1">
Junio C Hamanoa9701f02010-01-21 00:42:162369<h2 id="_see_also">SEE ALSO</h2>
2370<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592371<div class="paragraph"><p>diff(1),
Junio C Hamanoa28a9202012-06-21 07:08:232372<a href="git-difftool.html">git-difftool(1)</a>,
2373<a href="git-log.html">git-log(1)</a>,
2374<a href="gitdiffcore.html">gitdiffcore(7)</a>,
2375<a href="git-format-patch.html">git-format-patch(1)</a>,
2376<a href="git-apply.html">git-apply(1)</a></p></div>
Junio C Hamanoa9701f02010-01-21 00:42:162377</div>
Junio C Hamano9629d4f2012-12-19 00:28:272378</div>
2379<div class="sect1">
Junio C Hamano0868a302008-07-22 09:20:442380<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:232381<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:232382<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:232383</div>
Junio C Hamano7bd050f2011-09-22 06:32:222384</div>
Junio C Hamano9629d4f2012-12-19 00:28:272385</div>
Junio C Hamano7bd050f2011-09-22 06:32:222386<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:232387<div id="footer">
2388<div id="footer-text">
Junio C Hamanodb81b992012-12-21 23:49:122389Last updated 2012-12-21 15:43:33 PST
Junio C Hamano1a4e8412005-12-27 08:17:232390</div>
2391</div>
2392</body>
2393</html>