blob: 05edde9e0b0eab8bb7b2cee56adf66ed4b1684a7 [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" />
Junio C Hamanoac12f0e2014-09-19 22:32:516<meta name="generator" content="AsciiDoc 8.6.9" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-log(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 Hamanoba4b9282008-07-06 05:20:3130a {
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 Hamanoba4b9282008-07-06 05:20:3155h1, 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 Hamanoba4b9282008-07-06 05:20:3161h3 {
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 Hamanoac12f0e2014-09-19 22:32:5190.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}
Junio C Hamanoac12f0e2014-09-19 22:32:5197pre {
98 white-space: pre-wrap;
99}
Junio C Hamano1a4e8412005-12-27 08:17:23100
Junio C Hamano9629d4f2012-12-19 00:28:27101#author {
Junio C Hamano1a4e8412005-12-27 08:17:23102 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23103 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31104 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23105}
Junio C Hamano9629d4f2012-12-19 00:28:27106#email {
Junio C Hamano1a4e8412005-12-27 08:17:23107}
Junio C Hamano9629d4f2012-12-19 00:28:27108#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23109}
110
Junio C Hamano9629d4f2012-12-19 00:28:27111#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23112 font-size: small;
113 border-top: 2px solid silver;
114 padding-top: 0.5em;
115 margin-top: 4.0em;
116}
Junio C Hamano9629d4f2012-12-19 00:28:27117#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23118 float: left;
119 padding-bottom: 0.5em;
120}
Junio C Hamano9629d4f2012-12-19 00:28:27121#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23122 float: right;
123 padding-bottom: 0.5em;
124}
125
Junio C Hamano9629d4f2012-12-19 00:28:27126#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59127 margin-top: 1.5em;
128 margin-bottom: 1.5em;
129}
Junio C Hamano9629d4f2012-12-19 00:28:27130div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23131div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
132div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22133 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23134 margin-bottom: 1.5em;
135}
136div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22137 margin-top: 2.0em;
138 margin-bottom: 2.0em;
139 margin-right: 10%;
140 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23141}
142
143div.content { /* Block element content. */
144 padding: 0;
145}
146
147/* Block element titles. */
148div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59149 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23150 font-weight: bold;
151 text-align: left;
152 margin-top: 1.0em;
153 margin-bottom: 0.5em;
154}
155div.title + * {
156 margin-top: 0;
157}
158
159td div.title:first-child {
160 margin-top: 0.0em;
161}
162div.content div.title:first-child {
163 margin-top: 0.0em;
164}
165div.content + div.title {
166 margin-top: 0.0em;
167}
168
169div.sidebarblock > div.content {
170 background: #ffffee;
Junio C Hamano9629d4f2012-12-19 00:28:27171 border: 1px solid #dddddd;
172 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23173 padding: 0.5em;
174}
175
176div.listingblock > div.content {
Junio C Hamano9629d4f2012-12-19 00:28:27177 border: 1px solid #dddddd;
178 border-left: 5px solid #f0f0f0;
179 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23180 padding: 0.5em;
181}
182
Junio C Hamano7bd050f2011-09-22 06:32:22183div.quoteblock, div.verseblock {
184 padding-left: 1.0em;
185 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59186 margin-right: 10%;
Junio C Hamano9629d4f2012-12-19 00:28:27187 border-left: 5px solid #f0f0f0;
188 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23189}
Junio C Hamano7bd050f2011-09-22 06:32:22190
Junio C Hamano68cf15a2010-11-06 01:01:59191div.quoteblock > div.attribution {
192 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23193 text-align: right;
194}
Junio C Hamano68cf15a2010-11-06 01:01:59195
Junio C Hamano9629d4f2012-12-19 00:28:27196div.verseblock > pre.content {
197 font-family: inherit;
198 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59199}
200div.verseblock > div.attribution {
201 padding-top: 0.75em;
202 text-align: left;
203}
204/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31205div.verseblock + div.attribution {
206 text-align: left;
207}
Junio C Hamano1a4e8412005-12-27 08:17:23208
209div.admonitionblock .icon {
210 vertical-align: top;
211 font-size: 1.1em;
212 font-weight: bold;
213 text-decoration: underline;
214 color: #527bbd;
215 padding-right: 0.5em;
216}
217div.admonitionblock td.content {
218 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22219 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23220}
221
222div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22223 border-left: 3px solid #dddddd;
224 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23225}
226
Junio C Hamano1a4e8412005-12-27 08:17:23227div.imageblock div.content { padding-left: 0; }
Junio C Hamanoac12f0e2014-09-19 22:32:51228span.image img { border-style: none; vertical-align: text-bottom; }
Junio C Hamano68cf15a2010-11-06 01:01:59229a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23230
231dl {
232 margin-top: 0.8em;
233 margin-bottom: 0.8em;
234}
235dt {
236 margin-top: 0.5em;
237 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59238 font-style: normal;
239 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23240}
241dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59242 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23243}
244
245ul, ol {
246 list-style-position: outside;
247}
Junio C Hamano68cf15a2010-11-06 01:01:59248ol.arabic {
249 list-style-type: decimal;
250}
251ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23252 list-style-type: lower-alpha;
253}
Junio C Hamano68cf15a2010-11-06 01:01:59254ol.upperalpha {
255 list-style-type: upper-alpha;
256}
257ol.lowerroman {
258 list-style-type: lower-roman;
259}
260ol.upperroman {
261 list-style-type: upper-roman;
262}
263
264div.compact ul, div.compact ol,
265div.compact p, div.compact p,
266div.compact div, div.compact div {
267 margin-top: 0.1em;
268 margin-bottom: 0.1em;
269}
Junio C Hamano1a4e8412005-12-27 08:17:23270
Junio C Hamano1a4e8412005-12-27 08:17:23271tfoot {
272 font-weight: bold;
273}
Junio C Hamano68cf15a2010-11-06 01:01:59274td > div.verse {
275 white-space: pre;
276}
Junio C Hamano68cf15a2010-11-06 01:01:59277
278div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23279 margin-top: 0.8em;
280 margin-bottom: 0.8em;
281}
Junio C Hamano68cf15a2010-11-06 01:01:59282div.hdlist tr {
283 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31284}
Junio C Hamano68cf15a2010-11-06 01:01:59285dt.hdlist1.strong, td.hdlist1.strong {
286 font-weight: bold;
287}
288td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23289 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59290 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23291 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59292 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23293}
Junio C Hamano68cf15a2010-11-06 01:01:59294td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23295 vertical-align: top;
296}
Junio C Hamano68cf15a2010-11-06 01:01:59297div.hdlist.compact tr {
298 margin: 0;
299 padding-bottom: 0;
300}
301
302.comment {
303 background: yellow;
304}
Junio C Hamano1a4e8412005-12-27 08:17:23305
Junio C Hamano7bd050f2011-09-22 06:32:22306.footnote, .footnoteref {
307 font-size: 0.8em;
308}
309
310span.footnote, span.footnoteref {
311 vertical-align: super;
312}
313
314#footnotes {
315 margin: 20px 0 20px 0;
316 padding: 7px 0 0 0;
317}
318
319#footnotes div.footnote {
320 margin: 0 0 5px 0;
321}
322
323#footnotes hr {
324 border: none;
325 border-top: 1px solid silver;
326 height: 1px;
327 text-align: left;
328 margin-left: 0;
329 width: 20%;
330 min-width: 100px;
331}
332
Junio C Hamano9629d4f2012-12-19 00:28:27333div.colist td {
334 padding-right: 0.5em;
335 padding-bottom: 0.3em;
336 vertical-align: top;
337}
338div.colist td img {
339 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23340}
Junio C Hamanoba4b9282008-07-06 05:20:31341
Junio C Hamano9629d4f2012-12-19 00:28:27342@media print {
343 #footer-badges { display: none; }
344}
345
346#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22347 margin-bottom: 2.5em;
348}
349
Junio C Hamano9629d4f2012-12-19 00:28:27350#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31351 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31352 font-size: 1.1em;
353 font-weight: bold;
354 margin-top: 1.0em;
355 margin-bottom: 0.1em;
356}
357
Junio C Hamanoac12f0e2014-09-19 22:32:51358div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31359 margin-top: 0;
360 margin-bottom: 0;
361}
362div.toclevel2 {
363 margin-left: 2em;
364 font-size: 0.9em;
365}
366div.toclevel3 {
367 margin-left: 4em;
368 font-size: 0.9em;
369}
370div.toclevel4 {
371 margin-left: 6em;
372 font-size: 0.9em;
373}
Junio C Hamano9629d4f2012-12-19 00:28:27374
375span.aqua { color: aqua; }
376span.black { color: black; }
377span.blue { color: blue; }
378span.fuchsia { color: fuchsia; }
379span.gray { color: gray; }
380span.green { color: green; }
381span.lime { color: lime; }
382span.maroon { color: maroon; }
383span.navy { color: navy; }
384span.olive { color: olive; }
385span.purple { color: purple; }
386span.red { color: red; }
387span.silver { color: silver; }
388span.teal { color: teal; }
389span.white { color: white; }
390span.yellow { color: yellow; }
391
392span.aqua-background { background: aqua; }
393span.black-background { background: black; }
394span.blue-background { background: blue; }
395span.fuchsia-background { background: fuchsia; }
396span.gray-background { background: gray; }
397span.green-background { background: green; }
398span.lime-background { background: lime; }
399span.maroon-background { background: maroon; }
400span.navy-background { background: navy; }
401span.olive-background { background: olive; }
402span.purple-background { background: purple; }
403span.red-background { background: red; }
404span.silver-background { background: silver; }
405span.teal-background { background: teal; }
406span.white-background { background: white; }
407span.yellow-background { background: yellow; }
408
409span.big { font-size: 2em; }
410span.small { font-size: 0.6em; }
411
412span.underline { text-decoration: underline; }
413span.overline { text-decoration: overline; }
414span.line-through { text-decoration: line-through; }
415
Junio C Hamanoac12f0e2014-09-19 22:32:51416div.unbreakable { page-break-inside: avoid; }
417
Junio C Hamano9629d4f2012-12-19 00:28:27418
419/*
420 * xhtml11 specific
421 *
422 * */
423
424div.tableblock {
425 margin-top: 1.0em;
426 margin-bottom: 1.5em;
427}
428div.tableblock > table {
429 border: 3px solid #527bbd;
430}
431thead, p.table.header {
432 font-weight: bold;
433 color: #527bbd;
434}
435p.table {
436 margin-top: 0;
437}
438/* Because the table frame attribute is overriden by CSS in most browsers. */
439div.tableblock > table[frame="void"] {
440 border-style: none;
441}
442div.tableblock > table[frame="hsides"] {
443 border-left-style: none;
444 border-right-style: none;
445}
446div.tableblock > table[frame="vsides"] {
447 border-top-style: none;
448 border-bottom-style: none;
449}
450
451
452/*
453 * html5 specific
454 *
455 * */
456
457table.tableblock {
458 margin-top: 1.0em;
459 margin-bottom: 1.5em;
460}
461thead, p.tableblock.header {
462 font-weight: bold;
463 color: #527bbd;
464}
465p.tableblock {
466 margin-top: 0;
467}
468table.tableblock {
469 border-width: 3px;
470 border-spacing: 0px;
471 border-style: solid;
472 border-color: #527bbd;
473 border-collapse: collapse;
474}
475th.tableblock, td.tableblock {
476 border-width: 1px;
477 padding: 4px;
478 border-style: solid;
479 border-color: #527bbd;
480}
481
482table.tableblock.frame-topbot {
483 border-left-style: hidden;
484 border-right-style: hidden;
485}
486table.tableblock.frame-sides {
487 border-top-style: hidden;
488 border-bottom-style: hidden;
489}
490table.tableblock.frame-none {
491 border-style: hidden;
492}
493
494th.tableblock.halign-left, td.tableblock.halign-left {
495 text-align: left;
496}
497th.tableblock.halign-center, td.tableblock.halign-center {
498 text-align: center;
499}
500th.tableblock.halign-right, td.tableblock.halign-right {
501 text-align: right;
502}
503
504th.tableblock.valign-top, td.tableblock.valign-top {
505 vertical-align: top;
506}
507th.tableblock.valign-middle, td.tableblock.valign-middle {
508 vertical-align: middle;
509}
510th.tableblock.valign-bottom, td.tableblock.valign-bottom {
511 vertical-align: bottom;
512}
513
514
515/*
516 * manpage specific
517 *
518 * */
519
520body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59521 padding-top: 0.5em;
522 padding-bottom: 0.5em;
523 border-top: 2px solid silver;
524 border-bottom: 2px solid silver;
525}
Junio C Hamano9629d4f2012-12-19 00:28:27526body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59527 border-style: none;
528}
Junio C Hamano9629d4f2012-12-19 00:28:27529body.manpage div.sectionbody {
530 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59531}
532
533@media print {
Junio C Hamano9629d4f2012-12-19 00:28:27534 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59535}
Junio C Hamanoac12f0e2014-09-19 22:32:51536
537
Junio C Hamano1a4e8412005-12-27 08:17:23538</style>
Junio C Hamano7bd050f2011-09-22 06:32:22539<script type="text/javascript">
540/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22541var asciidoc = { // Namespace.
542
543/////////////////////////////////////////////////////////////////////
544// Table Of Contents generator
545/////////////////////////////////////////////////////////////////////
546
547/* Author: Mihai Bazon, September 2002
548 * http://students.infoiasi.ro/~mishoo
549 *
550 * Table Of Content generator
551 * Version: 0.4
552 *
553 * Feel free to use this script under the terms of the GNU General Public
554 * License, as long as you do not remove or alter this notice.
555 */
556
557 /* modified by Troy D. Hanson, September 2006. License: GPL */
558 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
559
560// toclevels = 1..4.
561toc: function (toclevels) {
562
563 function getText(el) {
564 var text = "";
565 for (var i = el.firstChild; i != null; i = i.nextSibling) {
566 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
567 text += i.data;
568 else if (i.firstChild != null)
569 text += getText(i);
570 }
571 return text;
572 }
573
574 function TocEntry(el, text, toclevel) {
575 this.element = el;
576 this.text = text;
577 this.toclevel = toclevel;
578 }
579
580 function tocEntries(el, toclevels) {
581 var result = new Array;
Junio C Hamanoac12f0e2014-09-19 22:32:51582 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22583 // Function that scans the DOM tree for header elements (the DOM2
584 // nodeIterator API would be a better technique but not supported by all
585 // browsers).
586 var iterate = function (el) {
587 for (var i = el.firstChild; i != null; i = i.nextSibling) {
588 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
589 var mo = re.exec(i.tagName);
590 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
591 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
592 }
593 iterate(i);
594 }
595 }
596 }
597 iterate(el);
598 return result;
599 }
600
601 var toc = document.getElementById("toc");
Junio C Hamano9629d4f2012-12-19 00:28:27602 if (!toc) {
603 return;
604 }
605
606 // Delete existing TOC entries in case we're reloading the TOC.
607 var tocEntriesToRemove = [];
608 var i;
609 for (i = 0; i < toc.childNodes.length; i++) {
610 var entry = toc.childNodes[i];
Junio C Hamanoac12f0e2014-09-19 22:32:51611 if (entry.nodeName.toLowerCase() == 'div'
Junio C Hamano9629d4f2012-12-19 00:28:27612 && entry.getAttribute("class")
613 && entry.getAttribute("class").match(/^toclevel/))
614 tocEntriesToRemove.push(entry);
615 }
616 for (i = 0; i < tocEntriesToRemove.length; i++) {
617 toc.removeChild(tocEntriesToRemove[i]);
618 }
619
620 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22621 var entries = tocEntries(document.getElementById("content"), toclevels);
622 for (var i = 0; i < entries.length; ++i) {
623 var entry = entries[i];
624 if (entry.element.id == "")
625 entry.element.id = "_toc_" + i;
626 var a = document.createElement("a");
627 a.href = "#" + entry.element.id;
628 a.appendChild(document.createTextNode(entry.text));
629 var div = document.createElement("div");
630 div.appendChild(a);
631 div.className = "toclevel" + entry.toclevel;
632 toc.appendChild(div);
633 }
634 if (entries.length == 0)
635 toc.parentNode.removeChild(toc);
636},
637
638
639/////////////////////////////////////////////////////////////////////
640// Footnotes generator
641/////////////////////////////////////////////////////////////////////
642
643/* Based on footnote generation code from:
644 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
645 */
646
647footnotes: function () {
Junio C Hamano9629d4f2012-12-19 00:28:27648 // Delete existing footnote entries in case we're reloading the footnodes.
649 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22650 var noteholder = document.getElementById("footnotes");
Junio C Hamano9629d4f2012-12-19 00:28:27651 if (!noteholder) {
652 return;
653 }
654 var entriesToRemove = [];
655 for (i = 0; i < noteholder.childNodes.length; i++) {
656 var entry = noteholder.childNodes[i];
Junio C Hamanoac12f0e2014-09-19 22:32:51657 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
Junio C Hamano9629d4f2012-12-19 00:28:27658 entriesToRemove.push(entry);
659 }
660 for (i = 0; i < entriesToRemove.length; i++) {
661 noteholder.removeChild(entriesToRemove[i]);
662 }
663
664 // Rebuild footnote entries.
665 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22666 var spans = cont.getElementsByTagName("span");
667 var refs = {};
668 var n = 0;
669 for (i=0; i<spans.length; i++) {
670 if (spans[i].className == "footnote") {
671 n++;
Junio C Hamano9629d4f2012-12-19 00:28:27672 var note = spans[i].getAttribute("data-note");
673 if (!note) {
674 // Use [\s\S] in place of . so multi-line matches work.
675 // Because JavaScript has no s (dotall) regex flag.
676 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
677 spans[i].innerHTML =
678 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
679 "' title='View footnote' class='footnote'>" + n + "</a>]";
680 spans[i].setAttribute("data-note", note);
681 }
Junio C Hamano7bd050f2011-09-22 06:32:22682 noteholder.innerHTML +=
683 "<div class='footnote' id='_footnote_" + n + "'>" +
684 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
685 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22686 var id =spans[i].getAttribute("id");
687 if (id != null) refs["#"+id] = n;
688 }
689 }
690 if (n == 0)
691 noteholder.parentNode.removeChild(noteholder);
692 else {
693 // Process footnoterefs.
694 for (i=0; i<spans.length; i++) {
695 if (spans[i].className == "footnoteref") {
696 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
697 href = href.match(/#.*/)[0]; // Because IE return full URL.
698 n = refs[href];
699 spans[i].innerHTML =
700 "[<a href='#_footnote_" + n +
701 "' title='View footnote' class='footnote'>" + n + "</a>]";
702 }
703 }
704 }
Junio C Hamano9629d4f2012-12-19 00:28:27705},
706
707install: function(toclevels) {
708 var timerId;
709
710 function reinstall() {
711 asciidoc.footnotes();
712 if (toclevels) {
713 asciidoc.toc(toclevels);
714 }
715 }
716
717 function reinstallAndRemoveTimer() {
718 clearInterval(timerId);
719 reinstall();
720 }
721
722 timerId = setInterval(reinstall, 500);
723 if (document.addEventListener)
724 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
725 else
726 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22727}
728
729}
Junio C Hamano9629d4f2012-12-19 00:28:27730asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22731/*]]>*/
732</script>
Junio C Hamano1a4e8412005-12-27 08:17:23733</head>
Junio C Hamano9629d4f2012-12-19 00:28:27734<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23735<div id="header">
736<h1>
737git-log(1) Manual Page
738</h1>
739<h2>NAME</h2>
740<div class="sectionbody">
741<p>git-log -
742 Show commit logs
743</p>
744</div>
745</div>
Junio C Hamano7bd050f2011-09-22 06:32:22746<div id="content">
Junio C Hamano9629d4f2012-12-19 00:28:27747<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59748<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23749<div class="sectionbody">
Junio C Hamano15567bc2011-07-23 00:51:59750<div class="verseblock">
Junio C Hamanof26c77e2013-04-27 00:06:04751<pre class="content"><em>git log</em> [&lt;options&gt;] [&lt;revision range&gt;] [[--] &lt;path&gt;&#8230;]</pre>
Junio C Hamano9629d4f2012-12-19 00:28:27752<div class="attribution">
Junio C Hamano15567bc2011-07-23 00:51:59753</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23754</div>
Junio C Hamano9629d4f2012-12-19 00:28:27755</div>
756<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31757<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23758<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59759<div class="paragraph"><p>Shows the commit logs.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:51760<div class="paragraph"><p>The command takes options applicable to the <code>git rev-list</code>
Junio C Hamanoba7c8d82006-04-15 06:17:42761command to control what is shown and how, and options applicable to
Junio C Hamanoac12f0e2014-09-19 22:32:51762the <code>git diff-*</code> commands to control how the changes
Junio C Hamanoba4b9282008-07-06 05:20:31763each commit introduces are shown.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23764</div>
Junio C Hamano9629d4f2012-12-19 00:28:27765</div>
766<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31767<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23768<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59769<div class="dlist"><dl>
770<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45771--follow
772</dt>
773<dd>
774<p>
775 Continue listing the history of a file beyond renames
776 (works only for a single file).
777</p>
778</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59779<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45780--no-decorate
781</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59782<dt class="hdlist1">
Junio C Hamano37cf4082016-05-30 01:22:14783--decorate[=short|full|auto|no]
Junio C Hamano78e3a782010-07-15 22:24:45784</dt>
785<dd>
786<p>
787 Print out the ref names of any commits that are shown. If <em>short</em> is
788 specified, the ref name prefixes <em>refs/heads/</em>, <em>refs/tags/</em> and
789 <em>refs/remotes/</em> will not be printed. If <em>full</em> is specified, the
Junio C Hamano37cf4082016-05-30 01:22:14790 full ref name (including prefix) will be printed. If <em>auto</em> is
791 specified, then if the output is going to a terminal, the ref names
792 are shown as if <em>short</em> were given, otherwise no ref names are
793 shown. The default option is <em>short</em>.
Junio C Hamano78e3a782010-07-15 22:24:45794</p>
795</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59796<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45797--source
798</dt>
799<dd>
800<p>
801 Print out the ref name given on the command line by which each
802 commit was reached.
803</p>
804</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59805<dt class="hdlist1">
Junio C Hamanoce836cc2013-01-21 02:01:53806--use-mailmap
807</dt>
808<dd>
809<p>
810 Use mailmap file to map author and committer names and email
Junio C Hamanob73af6c2013-12-03 22:07:11811 addresses to canonical real names and email addresses. See
Junio C Hamanoce836cc2013-01-21 02:01:53812 <a href="git-shortlog.html">git-shortlog(1)</a>.
813</p>
814</dd>
815<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45816--full-diff
817</dt>
818<dd>
819<p>
Junio C Hamanoac12f0e2014-09-19 22:32:51820 Without this flag, <code>git log -p &lt;path&gt;...</code> shows commits that
Junio C Hamano78e3a782010-07-15 22:24:45821 touch the specified paths, and diffs about the same specified
822 paths. With this, the full diff is shown for commits that touch
823 the specified paths; this means that "&lt;path&gt;&#8230;" limits only
Junio C Hamano68cf15a2010-11-06 01:01:59824 commits, and doesn&#8217;t limit diff for those commits.
Junio C Hamano78e3a782010-07-15 22:24:45825</p>
Junio C Hamano68cf15a2010-11-06 01:01:59826<div class="paragraph"><p>Note that this affects all diff-based output types, e.g. those
Junio C Hamanoac12f0e2014-09-19 22:32:51827produced by <code>--stat</code>, etc.</p></div>
Junio C Hamano78e3a782010-07-15 22:24:45828</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59829<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45830--log-size
831</dt>
832<dd>
833<p>
Junio C Hamanob73af6c2013-12-03 22:07:11834 Include a line &#8220;log size &lt;number&gt;&#8221; in the output for each commit,
835 where &lt;number&gt; is the length of that commit&#8217;s message in bytes.
Junio C Hamanoac12f0e2014-09-19 22:32:51836 Intended to speed up tools that read log messages from <code>git log</code>
Junio C Hamanob73af6c2013-12-03 22:07:11837 output by allowing them to allocate space in advance.
Junio C Hamano78e3a782010-07-15 22:24:45838</p>
839</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59840<dt class="hdlist1">
Junio C Hamano8eac2682013-09-09 22:35:20841-L &lt;start&gt;,&lt;end&gt;:&lt;file&gt;
842</dt>
843<dt class="hdlist1">
Junio C Hamanodd5004a2015-05-06 19:33:32844-L :&lt;funcname&gt;:&lt;file&gt;
Junio C Hamano7e590a12013-06-02 23:46:52845</dt>
846<dd>
847<p>
848 Trace the evolution of the line range given by "&lt;start&gt;,&lt;end&gt;"
Junio C Hamanodd5004a2015-05-06 19:33:32849 (or the function name regex &lt;funcname&gt;) within the &lt;file&gt;. You may
Junio C Hamano7e590a12013-06-02 23:46:52850 not give any pathspec limiters. This is currently limited to
851 a walk starting from a single revision, i.e., you may only
852 give zero or one positive revision arguments.
853 You can specify this option more than once.
854</p>
855<div class="paragraph"><p>&lt;start&gt; and &lt;end&gt; can take one of these forms:</p></div>
856<div class="ulist"><ul>
857<li>
858<p>
859number
860</p>
861<div class="paragraph"><p>If &lt;start&gt; or &lt;end&gt; is a number, it specifies an
862absolute line number (lines count from 1).</p></div>
863</li>
864<li>
865<p>
866/regex/
867</p>
868<div class="paragraph"><p>This form will use the first line matching the given
Junio C Hamano8eac2682013-09-09 22:35:20869POSIX regex. If &lt;start&gt; is a regex, it will search from the end of
Junio C Hamanoac12f0e2014-09-19 22:32:51870the previous <code>-L</code> range, if any, otherwise from the start of file.
Junio C Hamano8eac2682013-09-09 22:35:20871If &lt;start&gt; is &#8220;^/regex/&#8221;, it will search from the start of file.
872If &lt;end&gt; is a regex, it will search
Junio C Hamano7e590a12013-06-02 23:46:52873starting at the line given by &lt;start&gt;.</p></div>
874</li>
875<li>
876<p>
877+offset or -offset
878</p>
879<div class="paragraph"><p>This is only valid for &lt;end&gt; and will specify a number
880of lines before or after the line given by &lt;start&gt;.</p></div>
881</li>
Junio C Hamano7e590a12013-06-02 23:46:52882</ul></div>
Junio C Hamanodd5004a2015-05-06 19:33:32883<div class="paragraph"><p>If &#8220;:&lt;funcname&gt;&#8221; is given in place of &lt;start&gt; and &lt;end&gt;, it is a
884regular expression that denotes the range from the first funcname line
885that matches &lt;funcname&gt;, up to the next funcname line. &#8220;:&lt;funcname&gt;&#8221;
886searches from the end of the previous <code>-L</code> range, if any, otherwise
887from the start of file. &#8220;^:&lt;funcname&gt;&#8221; searches from the start of
888file.</p></div>
Junio C Hamano7e590a12013-06-02 23:46:52889</dd>
890<dt class="hdlist1">
Junio C Hamanof26c77e2013-04-27 00:06:04891&lt;revision range&gt;
892</dt>
893<dd>
894<p>
895 Show only commits in the specified revision range. When no
Junio C Hamanoac12f0e2014-09-19 22:32:51896 &lt;revision range&gt; is specified, it defaults to <code>HEAD</code> (i.e. the
897 whole history leading to the current commit). <code>origin..HEAD</code>
Junio C Hamanof26c77e2013-04-27 00:06:04898 specifies all the commits reachable from the current commit
Junio C Hamanoac12f0e2014-09-19 22:32:51899 (i.e. <code>HEAD</code>), but not from <code>origin</code>. For a complete list of
Junio C Hamanob73af6c2013-12-03 22:07:11900 ways to spell &lt;revision range&gt;, see the <em>Specifying Ranges</em>
Junio C Hamanof26c77e2013-04-27 00:06:04901 section of <a href="gitrevisions.html">gitrevisions(7)</a>.
902</p>
903</dd>
904<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45905[--] &lt;path&gt;&#8230;
906</dt>
907<dd>
908<p>
Junio C Hamano5723afa2011-08-31 00:49:23909 Show only commits that are enough to explain how the files
Junio C Hamanob73af6c2013-12-03 22:07:11910 that match the specified paths came to be. See <em>History
911 Simplification</em> below for details and other simplification
Junio C Hamano5723afa2011-08-31 00:49:23912 modes.
Junio C Hamano78e3a782010-07-15 22:24:45913</p>
Junio C Hamanob73af6c2013-12-03 22:07:11914<div class="paragraph"><p>Paths may need to be prefixed with &#8216;`-- '&#8217; to separate them from
Junio C Hamanof26c77e2013-04-27 00:06:04915options or the revision range, when confusion arises.</p></div>
Junio C Hamano78e3a782010-07-15 22:24:45916</dd>
917</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:27918<div class="sect2">
919<h3 id="_commit_limiting">Commit Limiting</h3>
Junio C Hamano68cf15a2010-11-06 01:01:59920<div class="paragraph"><p>Besides specifying a range of commits that should be listed using the
Junio C Hamanob0e02952008-01-19 08:02:00921special notations explained in the description, additional commit
Junio C Hamano8ce35d72012-09-18 22:30:42922limiting may be applied.</p></div>
923<div class="paragraph"><p>Using more options generally further limits the output (e.g.
Junio C Hamanoac12f0e2014-09-19 22:32:51924<code>--since=&lt;date1&gt;</code> limits to commits newer than <code>&lt;date1&gt;</code>, and using it
925with <code>--grep=&lt;pattern&gt;</code> further limits to commits whose log message
926has a line that matches <code>&lt;pattern&gt;</code>), unless otherwise noted.</p></div>
Junio C Hamano8ce35d72012-09-18 22:30:42927<div class="paragraph"><p>Note that these are applied before commit
Junio C Hamanoac12f0e2014-09-19 22:32:51928ordering and formatting options, such as <code>--reverse</code>.</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:27929<div class="openblock">
930<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:59931<div class="dlist"><dl>
932<dt class="hdlist1">
Junio C Hamano693e7092012-09-12 22:56:53933-&lt;number&gt;
934</dt>
935<dt class="hdlist1">
936-n &lt;number&gt;
Junio C Hamanoeb415992008-06-08 22:49:47937</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59938<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32939--max-count=&lt;number&gt;
Junio C Hamanob0e02952008-01-19 08:02:00940</dt>
941<dd>
942<p>
Junio C Hamanoc5be4cc2011-03-09 07:20:43943 Limit the number of commits to output.
Junio C Hamanob0e02952008-01-19 08:02:00944</p>
945</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59946<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32947--skip=&lt;number&gt;
Junio C Hamanob0e02952008-01-19 08:02:00948</dt>
949<dd>
950<p>
951 Skip <em>number</em> commits before starting to show the commit output.
952</p>
953</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59954<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32955--since=&lt;date&gt;
Junio C Hamanoeb415992008-06-08 22:49:47956</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59957<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32958--after=&lt;date&gt;
Junio C Hamanob0e02952008-01-19 08:02:00959</dt>
960<dd>
961<p>
962 Show commits more recent than a specific date.
963</p>
964</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59965<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32966--until=&lt;date&gt;
Junio C Hamanoeb415992008-06-08 22:49:47967</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59968<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32969--before=&lt;date&gt;
Junio C Hamanob0e02952008-01-19 08:02:00970</dt>
971<dd>
972<p>
973 Show commits older than a specific date.
974</p>
975</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59976<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32977--author=&lt;pattern&gt;
Junio C Hamanoeb415992008-06-08 22:49:47978</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59979<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32980--committer=&lt;pattern&gt;
Junio C Hamanob0e02952008-01-19 08:02:00981</dt>
982<dd>
983<p>
984 Limit the commits output to ones with author/committer
Junio C Hamano8ce35d72012-09-18 22:30:42985 header lines that match the specified pattern (regular
Junio C Hamanoac12f0e2014-09-19 22:32:51986 expression). With more than one <code>--author=&lt;pattern&gt;</code>,
Junio C Hamano8ce35d72012-09-18 22:30:42987 commits whose author matches any of the given patterns are
Junio C Hamanoac12f0e2014-09-19 22:32:51988 chosen (similarly for multiple <code>--committer=&lt;pattern&gt;</code>).
Junio C Hamanob0e02952008-01-19 08:02:00989</p>
990</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59991<dt class="hdlist1">
Junio C Hamano9954ed72012-10-03 04:54:00992--grep-reflog=&lt;pattern&gt;
993</dt>
994<dd>
995<p>
996 Limit the commits output to ones with reflog entries that
997 match the specified pattern (regular expression). With
Junio C Hamanoac12f0e2014-09-19 22:32:51998 more than one <code>--grep-reflog</code>, commits whose reflog message
Junio C Hamano9954ed72012-10-03 04:54:00999 matches any of the given patterns are chosen. It is an
Junio C Hamanoac12f0e2014-09-19 22:32:511000 error to use this option unless <code>--walk-reflogs</code> is in use.
Junio C Hamano9954ed72012-10-03 04:54:001001</p>
1002</dd>
1003<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:321004--grep=&lt;pattern&gt;
Junio C Hamanob0e02952008-01-19 08:02:001005</dt>
1006<dd>
1007<p>
1008 Limit the commits output to ones with log message that
Junio C Hamano8ce35d72012-09-18 22:30:421009 matches the specified pattern (regular expression). With
Junio C Hamanoac12f0e2014-09-19 22:32:511010 more than one <code>--grep=&lt;pattern&gt;</code>, commits whose message
Junio C Hamano8ce35d72012-09-18 22:30:421011 matches any of the given patterns are chosen (but see
Junio C Hamanoac12f0e2014-09-19 22:32:511012 <code>--all-match</code>).
Junio C Hamanob0e02952008-01-19 08:02:001013</p>
Junio C Hamano8152abf2015-04-28 22:48:021014<div class="paragraph"><p>When <code>--show-notes</code> is in effect, the message from the notes is
1015matched as if it were part of the log message.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001016</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591017<dt class="hdlist1">
Junio C Hamanoaa17c7c2008-11-03 04:36:581018--all-match
1019</dt>
1020<dd>
1021<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511022 Limit the commits output to ones that match all given <code>--grep</code>,
Junio C Hamano8ce35d72012-09-18 22:30:421023 instead of ones that match at least one.
Junio C Hamanoaa17c7c2008-11-03 04:36:581024</p>
1025</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591026<dt class="hdlist1">
Junio C Hamano6bb32e62015-02-17 22:11:261027--invert-grep
1028</dt>
1029<dd>
1030<p>
1031 Limit the commits output to ones with log message that do not
1032 match the pattern specified with <code>--grep=&lt;pattern&gt;</code>.
1033</p>
1034</dd>
1035<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471036-i
1037</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591038<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471039--regexp-ignore-case
Junio C Hamanob0e02952008-01-19 08:02:001040</dt>
1041<dd>
1042<p>
Junio C Hamanob73af6c2013-12-03 22:07:111043 Match the regular expression limiting patterns without regard to letter
1044 case.
Junio C Hamanob0e02952008-01-19 08:02:001045</p>
1046</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591047<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:041048--basic-regexp
1049</dt>
1050<dd>
1051<p>
1052 Consider the limiting patterns to be basic regular expressions;
1053 this is the default.
1054</p>
1055</dd>
1056<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471057-E
1058</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591059<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471060--extended-regexp
Junio C Hamanob0e02952008-01-19 08:02:001061</dt>
1062<dd>
1063<p>
1064 Consider the limiting patterns to be extended regular expressions
1065 instead of the default basic regular expressions.
1066</p>
1067</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591068<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471069-F
1070</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591071<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471072--fixed-strings
Junio C Hamano24bc09a2008-02-28 00:27:441073</dt>
1074<dd>
1075<p>
Junio C Hamano68cf15a2010-11-06 01:01:591076 Consider the limiting patterns to be fixed strings (don&#8217;t interpret
Junio C Hamano24bc09a2008-02-28 00:27:441077 pattern as a regular expression).
1078</p>
1079</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591080<dt class="hdlist1">
Junio C Hamanoa275c1f2017-06-19 20:10:121081-P
1082</dt>
1083<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:041084--perl-regexp
1085</dt>
1086<dd>
1087<p>
Junio C Hamano222ed822017-06-02 06:24:061088 Consider the limiting patterns to be Perl-compatible regular
1089 expressions.
Junio C Hamanoa1295452012-11-13 22:32:041090</p>
Junio C Hamano222ed822017-06-02 06:24:061091<div class="paragraph"><p>Support for these types of regular expressions is an optional
1092compile-time dependency. If Git wasn&#8217;t compiled with support for them
1093providing this option will cause it to die.</p></div>
Junio C Hamanoa1295452012-11-13 22:32:041094</dd>
1095<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001096--remove-empty
1097</dt>
1098<dd>
1099<p>
1100 Stop when a given path disappears from the tree.
1101</p>
1102</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591103<dt class="hdlist1">
Junio C Hamano934e1782009-07-16 06:59:151104--merges
1105</dt>
1106<dd>
1107<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511108 Print only merge commits. This is exactly the same as <code>--min-parents=2</code>.
Junio C Hamano934e1782009-07-16 06:59:151109</p>
1110</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591111<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001112--no-merges
1113</dt>
1114<dd>
1115<p>
Junio C Hamanof32ce262011-03-27 07:35:111116 Do not print commits with more than one parent. This is
Junio C Hamanoac12f0e2014-09-19 22:32:511117 exactly the same as <code>--max-parents=1</code>.
Junio C Hamanob0e02952008-01-19 08:02:001118</p>
1119</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591120<dt class="hdlist1">
Junio C Hamanof32ce262011-03-27 07:35:111121--min-parents=&lt;number&gt;
1122</dt>
1123<dt class="hdlist1">
1124--max-parents=&lt;number&gt;
1125</dt>
1126<dt class="hdlist1">
1127--no-min-parents
1128</dt>
1129<dt class="hdlist1">
1130--no-max-parents
1131</dt>
1132<dd>
1133<p>
Junio C Hamanoc5bb3b32013-08-05 22:43:361134 Show only commits which have at least (or at most) that many parent
Junio C Hamanoac12f0e2014-09-19 22:32:511135 commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>,
1136 <code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code>
1137 gives all root commits and <code>--min-parents=3</code> all octopus merges.
Junio C Hamanof32ce262011-03-27 07:35:111138</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511139<div class="paragraph"><p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit)
1140again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more
1141parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p></div>
Junio C Hamanof32ce262011-03-27 07:35:111142</dd>
1143<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001144--first-parent
1145</dt>
1146<dd>
1147<p>
1148 Follow only the first parent commit upon seeing a merge
1149 commit. This option can give a better overview when
1150 viewing the evolution of a particular topic branch,
1151 because merges into a topic branch tend to be only about
1152 adjusting to updated upstream from time to time, and
1153 this option allows you to ignore the individual commits
Junio C Hamanoef57d1e2015-03-25 21:23:001154 brought in to your history by such a merge. Cannot be
1155 combined with --bisect.
Junio C Hamanob0e02952008-01-19 08:02:001156</p>
1157</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591158<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001159--not
1160</dt>
1161<dd>
1162<p>
1163 Reverses the meaning of the <em>&#94;</em> prefix (or lack thereof)
Junio C Hamanoac12f0e2014-09-19 22:32:511164 for all following revision specifiers, up to the next <code>--not</code>.
Junio C Hamanob0e02952008-01-19 08:02:001165</p>
1166</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591167<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001168--all
1169</dt>
1170<dd>
1171<p>
Junio C Hamanoe89102f2017-02-15 23:18:151172 Pretend as if all the refs in <code>refs/</code>, along with <code>HEAD</code>, are
1173 listed on the command line as <em>&lt;commit&gt;</em>.
Junio C Hamanob0e02952008-01-19 08:02:001174</p>
1175</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591176<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171177--branches[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561178</dt>
1179<dd>
1180<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511181 Pretend as if all the refs in <code>refs/heads</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171182 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
Junio C Hamano57827fb2010-01-23 03:02:501183 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
Junio C Hamano81d540a2012-03-02 19:52:471184 <em>&#42;</em>, or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561185</p>
1186</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591187<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171188--tags[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561189</dt>
1190<dd>
1191<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511192 Pretend as if all the refs in <code>refs/tags</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171193 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
Junio C Hamano81d540a2012-03-02 19:52:471194 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>&#42;</em>,
1195 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561196</p>
1197</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591198<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171199--remotes[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561200</dt>
1201<dd>
1202<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511203 Pretend as if all the refs in <code>refs/remotes</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171204 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
Junio C Hamano97bcb482010-11-25 03:16:071205 remote-tracking branches to ones matching given shell glob.
Junio C Hamano81d540a2012-03-02 19:52:471206 If pattern lacks <em>?</em>, <em>&#42;</em>, or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano57827fb2010-01-23 03:02:501207</p>
1208</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591209<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171210--glob=&lt;glob-pattern&gt;
Junio C Hamano57827fb2010-01-23 03:02:501211</dt>
1212<dd>
1213<p>
Junio C Hamanod2179ef2010-10-22 04:12:171214 Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
Junio C Hamano57827fb2010-01-23 03:02:501215 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
Junio C Hamano81d540a2012-03-02 19:52:471216 is automatically prepended if missing. If pattern lacks <em>?</em>, <em>&#42;</em>,
1217 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561218</p>
1219</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591220<dt class="hdlist1">
Junio C Hamanof079f702013-12-06 23:43:181221--exclude=&lt;glob-pattern&gt;
1222</dt>
1223<dd>
1224<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511225 Do not include refs matching <em>&lt;glob-pattern&gt;</em> that the next <code>--all</code>,
1226 <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or <code>--glob</code> would otherwise
Junio C Hamanof079f702013-12-06 23:43:181227 consider. Repetitions of this option accumulate exclusion patterns
Junio C Hamanoac12f0e2014-09-19 22:32:511228 up to the next <code>--all</code>, <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or
1229 <code>--glob</code> option (other options or arguments do not clear
Junio C Hamanofb5ffde2014-11-04 22:38:561230 accumulated patterns).
Junio C Hamanof079f702013-12-06 23:43:181231</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511232<div class="paragraph"><p>The patterns given should not begin with <code>refs/heads</code>, <code>refs/tags</code>, or
1233<code>refs/remotes</code> when applied to <code>--branches</code>, <code>--tags</code>, or <code>--remotes</code>,
1234respectively, and they must begin with <code>refs/</code> when applied to <code>--glob</code>
1235or <code>--all</code>. If a trailing <em>/&#42;</em> is intended, it must be given
Junio C Hamanof079f702013-12-06 23:43:181236explicitly.</p></div>
1237</dd>
1238<dt class="hdlist1">
Junio C Hamano2a4bcbc2014-10-29 20:07:391239--reflog
1240</dt>
1241<dd>
1242<p>
1243 Pretend as if all objects mentioned by reflogs are listed on the
1244 command line as <code>&lt;commit&gt;</code>.
1245</p>
1246</dd>
1247<dt class="hdlist1">
Junio C Hamano084228c2011-05-30 08:13:521248--ignore-missing
1249</dt>
1250<dd>
1251<p>
1252 Upon seeing an invalid object name in the input, pretend as if
1253 the bad input was not given.
1254</p>
1255</dd>
1256<dt class="hdlist1">
Junio C Hamano5706e0b2009-11-24 10:54:161257--bisect
1258</dt>
1259<dd>
1260<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511261 Pretend as if the bad bisection ref <code>refs/bisect/bad</code>
1262 was listed and as if it was followed by <code>--not</code> and the good
1263 bisection refs <code>refs/bisect/good-*</code> on the command
Junio C Hamanoef57d1e2015-03-25 21:23:001264 line. Cannot be combined with --first-parent.
Junio C Hamano5706e0b2009-11-24 10:54:161265</p>
1266</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591267<dt class="hdlist1">
Junio C Hamano5706e0b2009-11-24 10:54:161268--stdin
1269</dt>
1270<dd>
1271<p>
1272 In addition to the <em>&lt;commit&gt;</em> listed on the command
Junio C Hamano92d80372016-07-13 22:00:051273 line, read them from the standard input. If a <code>--</code> separator is
Junio C Hamano5706e0b2009-11-24 10:54:161274 seen, stop reading commits and start reading paths to limit the
1275 result.
1276</p>
1277</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591278<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151279--cherry-mark
1280</dt>
1281<dd>
1282<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511283 Like <code>--cherry-pick</code> (see below) but mark equivalent commits
1284 with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151285</p>
1286</dd>
1287<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001288--cherry-pick
1289</dt>
1290<dd>
1291<p>
1292 Omit any commit that introduces the same change as
Junio C Hamanob73af6c2013-12-03 22:07:111293 another commit on the &#8220;other side&#8221; when the set of
Junio C Hamano68cf15a2010-11-06 01:01:591294 commits are limited with symmetric difference.
1295</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511296<div class="paragraph"><p>For example, if you have two branches, <code>A</code> and <code>B</code>, a usual way
Junio C Hamanob0e02952008-01-19 08:02:001297to list all commits on only one side of them is with
Junio C Hamanoac12f0e2014-09-19 22:32:511298<code>--left-right</code> (see the example below in the description of
1299the <code>--left-right</code> option). However, it shows the commits that were
Junio C Hamanob73af6c2013-12-03 22:07:111300cherry-picked from the other branch (for example, &#8220;3rd on b&#8221; may be
1301cherry-picked from branch A). With this option, such pairs of commits are
Junio C Hamano68cf15a2010-11-06 01:01:591302excluded from the output.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001303</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591304<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151305--left-only
1306</dt>
1307<dt class="hdlist1">
1308--right-only
1309</dt>
1310<dd>
1311<p>
Junio C Hamanocd451662016-09-13 00:54:091312 List only commits on the respective side of a symmetric difference,
Junio C Hamanoac12f0e2014-09-19 22:32:511313 i.e. only those which would be marked <code>&lt;</code> resp. <code>&gt;</code> by
1314 <code>--left-right</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151315</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511316<div class="paragraph"><p>For example, <code>--cherry-pick --right-only A...B</code> omits those
1317commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in
1318<code>A</code>. In other words, this lists the <code>+</code> commits from <code>git cherry A B</code>.
1319More precisely, <code>--cherry-pick --right-only --no-merges</code> gives the exact
Junio C Hamano9a2fb2d2011-03-23 05:40:151320list.</p></div>
1321</dd>
1322<dt class="hdlist1">
1323--cherry
1324</dt>
1325<dd>
1326<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511327 A synonym for <code>--right-only --cherry-mark --no-merges</code>; useful to
Junio C Hamano9a2fb2d2011-03-23 05:40:151328 limit the output to the commits on our side and mark those that
1329 have been applied to the other side of a forked history with
Junio C Hamanoac12f0e2014-09-19 22:32:511330 <code>git log --cherry upstream...mybranch</code>, similar to
1331 <code>git cherry upstream mybranch</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151332</p>
1333</dd>
1334<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471335-g
1336</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591337<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471338--walk-reflogs
Junio C Hamanob0e02952008-01-19 08:02:001339</dt>
1340<dd>
1341<p>
1342 Instead of walking the commit ancestry chain, walk
1343 reflog entries from the most recent one to older ones.
1344 When this option is used you cannot specify commits to
1345 exclude (that is, <em>&#94;commit</em>, <em>commit1..commit2</em>,
Junio C Hamanod75148a2014-04-08 19:48:381346 and <em>commit1...commit2</em> notations cannot be used).
Junio C Hamano68cf15a2010-11-06 01:01:591347</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511348<div class="paragraph"><p>With <code>--pretty</code> format other than <code>oneline</code> (for obvious reasons),
Junio C Hamanob0e02952008-01-19 08:02:001349this causes the output to have two extra lines of information
Junio C Hamanoe548d1b2016-08-08 22:26:491350taken from the reflog. The reflog designator in the output may be shown
1351as <code>ref@{Nth}</code> (where <code>Nth</code> is the reverse-chronological index in the
1352reflog) or as <code>ref@{timestamp}</code> (with the timestamp for that entry),
1353depending on a few rules:</p></div>
1354<div class="openblock">
1355<div class="content">
1356<div class="olist arabic"><ol class="arabic">
1357<li>
1358<p>
1359If the starting point is specified as <code>ref@{Nth}</code>, show the index
1360format.
1361</p>
1362</li>
1363<li>
1364<p>
1365If the starting point was specified as <code>ref@{now}</code>, show the
1366timestamp format.
1367</p>
1368</li>
1369<li>
1370<p>
1371If neither was used, but <code>--date</code> was given on the command line, show
1372the timestamp in the format requested by <code>--date</code>.
1373</p>
1374</li>
1375<li>
1376<p>
1377Otherwise, show the index format.
1378</p>
1379</li>
1380</ol></div>
1381</div></div>
1382<div class="paragraph"><p>Under <code>--pretty=oneline</code>, the commit message is
Junio C Hamanob0e02952008-01-19 08:02:001383prefixed with this information on the same line.
Junio C Hamanoac12f0e2014-09-19 22:32:511384This option cannot be combined with <code>--reverse</code>.
Junio C Hamanoa28a9202012-06-21 07:08:231385See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001386</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591387<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001388--merge
1389</dt>
1390<dd>
1391<p>
1392 After a failed merge, show refs that touch files having a
Junio C Hamano68cf15a2010-11-06 01:01:591393 conflict and don&#8217;t exist on all heads to merge.
Junio C Hamanob0e02952008-01-19 08:02:001394</p>
1395</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591396<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001397--boundary
1398</dt>
1399<dd>
1400<p>
Junio C Hamano27159f82013-06-14 17:19:221401 Output excluded boundary commits. Boundary commits are
Junio C Hamanoac12f0e2014-09-19 22:32:511402 prefixed with <code>-</code>.
Junio C Hamanob0e02952008-01-19 08:02:001403</p>
1404</dd>
Junio C Hamanoa76cb0d2008-08-13 20:04:101405</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271406</div></div>
1407</div>
1408<div class="sect2">
1409<h3 id="_history_simplification">History Simplification</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591410<div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the
Junio C Hamano28363492008-11-14 08:26:311411commits modifying a particular &lt;path&gt;. But there are two parts of
1412<em>History Simplification</em>, one part is selecting the commits and the other
1413is how to do it, as there are various strategies to simplify the history.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591414<div class="paragraph"><p>The following options select the commits to be shown:</p></div>
1415<div class="dlist"><dl>
1416<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311417&lt;paths&gt;
1418</dt>
1419<dd>
1420<p>
1421 Commits modifying the given &lt;paths&gt; are selected.
1422</p>
1423</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591424<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311425--simplify-by-decoration
1426</dt>
1427<dd>
1428<p>
1429 Commits that are referred by some branch or tag are selected.
1430</p>
1431</dd>
1432</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591433<div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div>
1434<div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div>
1435<div class="dlist"><dl>
1436<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311437Default mode
1438</dt>
1439<dd>
1440<p>
1441 Simplifies the history to the simplest history explaining the
1442 final state of the tree. Simplest because it prunes some side
1443 branches if the end result is the same (i.e. merging branches
1444 with the same content)
1445</p>
1446</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591447<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311448--full-history
1449</dt>
1450<dd>
1451<p>
Junio C Hamano15567bc2011-07-23 00:51:591452 Same as the default mode, but does not prune some history.
Junio C Hamano28363492008-11-14 08:26:311453</p>
1454</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591455<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311456--dense
1457</dt>
1458<dd>
1459<p>
1460 Only the selected commits are shown, plus some to have a
1461 meaningful history.
1462</p>
1463</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591464<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311465--sparse
1466</dt>
1467<dd>
1468<p>
1469 All commits in the simplified history are shown.
1470</p>
1471</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591472<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311473--simplify-merges
1474</dt>
1475<dd>
1476<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511477 Additional option to <code>--full-history</code> to remove some needless
Junio C Hamano28363492008-11-14 08:26:311478 merges from the resulting history, as there are no selected
1479 commits contributing to this merge.
1480</p>
1481</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591482<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551483--ancestry-path
1484</dt>
1485<dd>
1486<p>
1487 When given a range of commits to display (e.g. <em>commit1..commit2</em>
1488 or <em>commit2 &#94;commit1</em>), only display commits that exist
1489 directly on the ancestry chain between the <em>commit1</em> and
1490 <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>,
1491 and ancestors of <em>commit2</em>.
1492</p>
1493</dd>
Junio C Hamano28363492008-11-14 08:26:311494</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591495<div class="paragraph"><p>A more detailed explanation follows.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511496<div class="paragraph"><p>Suppose you specified <code>foo</code> as the &lt;paths&gt;. We shall call commits
1497that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff
1498filtered for <code>foo</code>, they look different and equal, respectively.)</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591499<div class="paragraph"><p>In the following, we will always refer to the same example history to
Junio C Hamanoa76cb0d2008-08-13 20:04:101500illustrate the differences between simplification settings. We assume
Junio C Hamanoac12f0e2014-09-19 22:32:511501that you are filtering for a file <code>foo</code> in this commit graph:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101502<div class="listingblock">
1503<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511504<pre><code> .-A---M---N---O---P---Q
Junio C Hamano27159f82013-06-14 17:19:221505 / / / / / /
1506 I B C D E Y
1507 \ / / / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511508 `-------------' X</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101509</div></div>
Junio C Hamano27159f82013-06-14 17:19:221510<div class="paragraph"><p>The horizontal line of history A---Q is taken to be the first parent of
Junio C Hamanoa76cb0d2008-08-13 20:04:101511each merge. The commits are:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591512<div class="ulist"><ul>
Junio C Hamanoa76cb0d2008-08-13 20:04:101513<li>
1514<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511515<code>I</code> is the initial commit, in which <code>foo</code> exists with contents
1516 &#8220;asdf&#8221;, and a file <code>quux</code> exists with contents &#8220;quux&#8221;. Initial
1517 commits are compared to an empty tree, so <code>I</code> is !TREESAME.
Junio C Hamanoa76cb0d2008-08-13 20:04:101518</p>
1519</li>
1520<li>
1521<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511522In <code>A</code>, <code>foo</code> contains just &#8220;foo&#8221;.
Junio C Hamanoa76cb0d2008-08-13 20:04:101523</p>
1524</li>
1525<li>
1526<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511527<code>B</code> contains the same change as <code>A</code>. Its merge <code>M</code> is trivial and
Junio C Hamanoa76cb0d2008-08-13 20:04:101528 hence TREESAME to all parents.
1529</p>
1530</li>
1531<li>
1532<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511533<code>C</code> does not change <code>foo</code>, but its merge <code>N</code> changes it to &#8220;foobar&#8221;,
Junio C Hamanoa76cb0d2008-08-13 20:04:101534 so it is not TREESAME to any parent.
1535</p>
1536</li>
1537<li>
1538<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511539<code>D</code> sets <code>foo</code> to &#8220;baz&#8221;. Its merge <code>O</code> combines the strings from
1540 <code>N</code> and <code>D</code> to &#8220;foobarbaz&#8221;; i.e., it is not TREESAME to any parent.
Junio C Hamanoa76cb0d2008-08-13 20:04:101541</p>
1542</li>
1543<li>
1544<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511545<code>E</code> changes <code>quux</code> to &#8220;xyzzy&#8221;, and its merge <code>P</code> combines the
1546 strings to &#8220;quux xyzzy&#8221;. <code>P</code> is TREESAME to <code>O</code>, but not to <code>E</code>.
Junio C Hamano27159f82013-06-14 17:19:221547</p>
1548</li>
1549<li>
1550<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511551<code>X</code> is an independent root commit that added a new file <code>side</code>, and <code>Y</code>
1552 modified it. <code>Y</code> is TREESAME to <code>X</code>. Its merge <code>Q</code> added <code>side</code> to <code>P</code>, and
1553 <code>Q</code> is TREESAME to <code>P</code>, but not to <code>Y</code>.
Junio C Hamanoa76cb0d2008-08-13 20:04:101554</p>
1555</li>
1556</ul></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511557<div class="paragraph"><p><code>rev-list</code> walks backwards through history, including or excluding
1558commits based on whether <code>--full-history</code> and/or parent rewriting
1559(via <code>--parents</code> or <code>--children</code>) are used. The following settings
Junio C Hamanoa76cb0d2008-08-13 20:04:101560are available.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591561<div class="dlist"><dl>
1562<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101563Default mode
1564</dt>
1565<dd>
1566<p>
1567 Commits are included if they are not TREESAME to any parent
Junio C Hamanoac12f0e2014-09-19 22:32:511568 (though this can be changed, see <code>--sparse</code> below). If the
Junio C Hamanoa76cb0d2008-08-13 20:04:101569 commit was a merge, and it was TREESAME to one parent, follow
1570 only that parent. (Even if there are several TREESAME
1571 parents, follow only one of them.) Otherwise, follow all
1572 parents.
1573</p>
Junio C Hamano68cf15a2010-11-06 01:01:591574<div class="paragraph"><p>This results in:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101575<div class="listingblock">
1576<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511577<pre><code> .-A---N---O
Junio C Hamano89a57342010-06-22 23:22:551578 / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511579 I---------D</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101580</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591581<div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is
Junio C Hamanoac12f0e2014-09-19 22:32:511582available, removed <code>B</code> from consideration entirely. <code>C</code> was
1583considered via <code>N</code>, but is TREESAME. Root commits are compared to an
1584empty tree, so <code>I</code> is !TREESAME.</p></div>
1585<div class="paragraph"><p>Parent/child relations are only visible with <code>--parents</code>, but that does
Junio C Hamanoa76cb0d2008-08-13 20:04:101586not affect the commits selected in default mode, so we have shown the
1587parent lines.</p></div>
1588</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591589<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101590--full-history without parent rewriting
1591</dt>
1592<dd>
1593<p>
1594 This mode differs from the default in one point: always follow
1595 all parents of a merge, even if it is TREESAME to one of them.
1596 Even if more than one side of the merge has commits that are
1597 included, this does not imply that the merge itself is! In
1598 the example, we get
1599</p>
1600<div class="listingblock">
1601<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511602<pre><code> I A B N D O P Q</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101603</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511604<div class="paragraph"><p><code>M</code> was excluded because it is TREESAME to both parents. <code>E</code>,
1605<code>C</code> and <code>B</code> were all walked, but only <code>B</code> was !TREESAME, so the others
Junio C Hamanoa76cb0d2008-08-13 20:04:101606do not appear.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591607<div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk
Junio C Hamanoa76cb0d2008-08-13 20:04:101608about the parent/child relationships between the commits, so we show
1609them disconnected.</p></div>
1610</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591611<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101612--full-history with parent rewriting
1613</dt>
1614<dd>
1615<p>
1616 Ordinary commits are only included if they are !TREESAME
Junio C Hamanoac12f0e2014-09-19 22:32:511617 (though this can be changed, see <code>--sparse</code> below).
Junio C Hamanoa76cb0d2008-08-13 20:04:101618</p>
Junio C Hamano68cf15a2010-11-06 01:01:591619<div class="paragraph"><p>Merges are always included. However, their parent list is rewritten:
Junio C Hamanoa76cb0d2008-08-13 20:04:101620Along each parent, prune away commits that are not included
1621themselves. This results in</p></div>
1622<div class="listingblock">
1623<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511624<pre><code> .-A---M---N---O---P---Q
Junio C Hamanoa76cb0d2008-08-13 20:04:101625 / / / / /
1626 I B / D /
1627 \ / / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511628 `-------------'</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101629</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511630<div class="paragraph"><p>Compare to <code>--full-history</code> without rewriting above. Note that <code>E</code>
Junio C Hamanoa76cb0d2008-08-13 20:04:101631was pruned away because it is TREESAME, but the parent list of P was
Junio C Hamanoac12f0e2014-09-19 22:32:511632rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and
1633<code>N</code>, and <code>X</code>, <code>Y</code> and <code>Q</code>.</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101634</dd>
1635</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591636<div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME
Junio C Hamanoa76cb0d2008-08-13 20:04:101637affects inclusion:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591638<div class="dlist"><dl>
1639<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471640--dense
1641</dt>
Junio C Hamanoa76cb0d2008-08-13 20:04:101642<dd>
1643<p>
1644 Commits that are walked are included if they are not TREESAME
1645 to any parent.
1646</p>
1647</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591648<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471649--sparse
Junio C Hamanob0e02952008-01-19 08:02:001650</dt>
1651<dd>
1652<p>
Junio C Hamanoa76cb0d2008-08-13 20:04:101653 All commits that are walked are included.
Junio C Hamanob0e02952008-01-19 08:02:001654</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511655<div class="paragraph"><p>Note that without <code>--full-history</code>, this still simplifies merges: if
Junio C Hamanoa76cb0d2008-08-13 20:04:101656one of the parents is TREESAME, we follow only that one, so the other
1657sides of the merge are never walked.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001658</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591659<dt class="hdlist1">
Junio C Hamanoa2f46622008-09-03 05:20:311660--simplify-merges
1661</dt>
1662<dd>
1663<p>
1664 First, build a history graph in the same way that
Junio C Hamanoac12f0e2014-09-19 22:32:511665 <code>--full-history</code> with parent rewriting does (see above).
Junio C Hamanoa2f46622008-09-03 05:20:311666</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511667<div class="paragraph"><p>Then simplify each commit <code>C</code> to its replacement <code>C'</code> in the final
Junio C Hamanoa2f46622008-09-03 05:20:311668history according to the following rules:</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271669<div class="openblock">
1670<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591671<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311672<li>
1673<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511674Set <code>C'</code> to <code>C</code>.
Junio C Hamanoa2f46622008-09-03 05:20:311675</p>
1676</li>
1677<li>
1678<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511679Replace each parent <code>P</code> of <code>C'</code> with its simplification <code>P'</code>. In
Junio C Hamano27159f82013-06-14 17:19:221680 the process, drop parents that are ancestors of other parents or that are
1681 root commits TREESAME to an empty tree, and remove duplicates, but take care
1682 to never drop all parents that we are TREESAME to.
Junio C Hamanoa2f46622008-09-03 05:20:311683</p>
1684</li>
1685<li>
1686<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511687If after this parent rewriting, <code>C'</code> is a root or merge commit (has
Junio C Hamanoa2f46622008-09-03 05:20:311688 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1689 Otherwise, it is replaced with its only parent.
1690</p>
1691</li>
1692</ul></div>
Junio C Hamano9629d4f2012-12-19 00:28:271693</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591694<div class="paragraph"><p>The effect of this is best shown by way of comparing to
Junio C Hamanoac12f0e2014-09-19 22:32:511695<code>--full-history</code> with parent rewriting. The example turns into:</p></div>
Junio C Hamanoa2f46622008-09-03 05:20:311696<div class="listingblock">
1697<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511698<pre><code> .-A---M---N---O
Junio C Hamanoa2f46622008-09-03 05:20:311699 / / /
1700 I B D
1701 \ / /
Junio C Hamanoac12f0e2014-09-19 22:32:511702 `---------'</code></pre>
Junio C Hamanoa2f46622008-09-03 05:20:311703</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511704<div class="paragraph"><p>Note the major differences in <code>N</code>, <code>P</code>, and <code>Q</code> over <code>--full-history</code>:</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271705<div class="openblock">
1706<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591707<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311708<li>
1709<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511710<code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the
1711 other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME.
Junio C Hamanoa2f46622008-09-03 05:20:311712</p>
1713</li>
1714<li>
1715<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511716<code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then
Junio C Hamanoa2f46622008-09-03 05:20:311717 removed completely, because it had one parent and is TREESAME.
1718</p>
1719</li>
Junio C Hamano27159f82013-06-14 17:19:221720<li>
1721<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511722<code>Q</code>'s parent list had <code>Y</code> simplified to <code>X</code>. <code>X</code> was then removed, because it
1723 was a TREESAME root. <code>Q</code> was then removed completely, because it had one
Junio C Hamano27159f82013-06-14 17:19:221724 parent and is TREESAME.
1725</p>
1726</li>
Junio C Hamanoa2f46622008-09-03 05:20:311727</ul></div>
Junio C Hamano9629d4f2012-12-19 00:28:271728</div></div>
Junio C Hamanoa2f46622008-09-03 05:20:311729</dd>
1730</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591731<div class="paragraph"><p>Finally, there is a fifth simplification mode available:</p></div>
1732<div class="dlist"><dl>
1733<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551734--ancestry-path
1735</dt>
1736<dd>
1737<p>
1738 Limit the displayed commits to those directly on the ancestry
Junio C Hamanob73af6c2013-12-03 22:07:111739 chain between the &#8220;from&#8221; and &#8220;to&#8221; commits in the given commit
1740 range. I.e. only display commits that are ancestor of the &#8220;to&#8221;
1741 commit and descendants of the &#8220;from&#8221; commit.
Junio C Hamano89a57342010-06-22 23:22:551742</p>
Junio C Hamano68cf15a2010-11-06 01:01:591743<div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
Junio C Hamano89a57342010-06-22 23:22:551744<div class="listingblock">
1745<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511746<pre><code> D---E-------F
Junio C Hamano89a57342010-06-22 23:22:551747 / \ \
1748 B---C---G---H---I---J
1749 / \
Junio C Hamanoac12f0e2014-09-19 22:32:511750 A-------K---------------L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551751</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511752<div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>,
1753but excludes the ones that are ancestors of <code>D</code>. This is useful to see
1754what happened to the history leading to <code>M</code> since <code>D</code>, in the sense
1755that &#8220;what does <code>M</code> have that did not exist in <code>D</code>&#8221;. The result in this
1756example would be all the commits, except <code>A</code> and <code>B</code> (and <code>D</code> itself,
Junio C Hamano89a57342010-06-22 23:22:551757of course).</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511758<div class="paragraph"><p>When we want to find out what commits in <code>M</code> are contaminated with the
1759bug introduced by <code>D</code> and need fixing, however, we might want to view
1760only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e.
1761excluding <code>C</code> and <code>K</code>. This is exactly what the <code>--ancestry-path</code>
Junio C Hamano89a57342010-06-22 23:22:551762option does. Applied to the <em>D..M</em> range, it results in:</p></div>
1763<div class="listingblock">
1764<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511765<pre><code> E-------F
Junio C Hamano89a57342010-06-22 23:22:551766 \ \
1767 G---H---I---J
1768 \
Junio C Hamanoac12f0e2014-09-19 22:32:511769 L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551770</div></div>
1771</dd>
1772</dl></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511773<div class="paragraph"><p>The <code>--simplify-by-decoration</code> option allows you to view only the
Junio C Hamano28363492008-11-14 08:26:311774big picture of the topology of the history, by omitting commits
1775that are not referenced by tags. Commits are marked as !TREESAME
1776(in other words, kept after history simplification rules described
1777above) if (1) they are referenced by tags, or (2) they change the
1778contents of the paths given on the command line. All other
1779commits are marked as TREESAME (subject to be simplified away).</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271780</div>
1781<div class="sect2">
1782<h3 id="_commit_ordering">Commit Ordering</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591783<div class="paragraph"><p>By default, the commits are shown in reverse chronological order.</p></div>
1784<div class="dlist"><dl>
1785<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001786--date-order
1787</dt>
1788<dd>
1789<p>
Junio C Hamanod0316112012-08-22 19:55:291790 Show no parents before all of its children are shown, but
1791 otherwise show commits in the commit timestamp order.
Junio C Hamanob0e02952008-01-19 08:02:001792</p>
1793</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591794<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:181795--author-date-order
1796</dt>
1797<dd>
1798<p>
1799 Show no parents before all of its children are shown, but
1800 otherwise show commits in the author timestamp order.
1801</p>
1802</dd>
1803<dt class="hdlist1">
Junio C Hamanod0316112012-08-22 19:55:291804--topo-order
1805</dt>
1806<dd>
1807<p>
1808 Show no parents before all of its children are shown, and
1809 avoid showing commits on multiple lines of history
1810 intermixed.
1811</p>
1812<div class="paragraph"><p>For example, in a commit history like this:</p></div>
1813<div class="listingblock">
1814<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511815<pre><code> ---1----2----4----7
Junio C Hamanod0316112012-08-22 19:55:291816 \ \
Junio C Hamanoac12f0e2014-09-19 22:32:511817 3----5----6----8---</code></pre>
Junio C Hamanod0316112012-08-22 19:55:291818</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511819<div class="paragraph"><p>where the numbers denote the order of commit timestamps, <code>git
1820rev-list</code> and friends with <code>--date-order</code> show the commits in the
Junio C Hamanod0316112012-08-22 19:55:291821timestamp order: 8 7 6 5 4 3 2 1.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511822<div class="paragraph"><p>With <code>--topo-order</code>, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5
Junio C Hamanod0316112012-08-22 19:55:2918233 1); some older commits are shown before newer ones in order to
1824avoid showing the commits from two parallel development track mixed
1825together.</p></div>
1826</dd>
1827<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001828--reverse
1829</dt>
1830<dd>
1831<p>
Junio C Hamanof3ca7b82016-10-03 22:27:021832 Output the commits chosen to be shown (see Commit Limiting
1833 section above) in reverse order. Cannot be combined with
1834 <code>--walk-reflogs</code>.
Junio C Hamanob0e02952008-01-19 08:02:001835</p>
1836</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311837</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271838</div>
1839<div class="sect2">
1840<h3 id="_object_traversal">Object Traversal</h3>
Junio C Hamano076ffcc2013-02-06 05:13:211841<div class="paragraph"><p>These options are mostly targeted for packing of Git repositories.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591842<div class="dlist"><dl>
1843<dt class="hdlist1">
Junio C Hamanoeccdd4a2012-09-10 23:28:171844--no-walk[=(sorted|unsorted)]
Junio C Hamanob0e02952008-01-19 08:02:001845</dt>
1846<dd>
1847<p>
Junio C Hamanoeccdd4a2012-09-10 23:28:171848 Only show the given commits, but do not traverse their ancestors.
1849 This has no effect if a range is specified. If the argument
Junio C Hamanoac12f0e2014-09-19 22:32:511850 <code>unsorted</code> is given, the commits are shown in the order they were
1851 given on the command line. Otherwise (if <code>sorted</code> or no argument
Junio C Hamanob73af6c2013-12-03 22:07:111852 was given), the commits are shown in reverse chronological order
Junio C Hamanoeccdd4a2012-09-10 23:28:171853 by commit time.
Junio C Hamanoef57d1e2015-03-25 21:23:001854 Cannot be combined with <code>--graph</code>.
Junio C Hamanob0e02952008-01-19 08:02:001855</p>
1856</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591857<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001858--do-walk
1859</dt>
1860<dd>
1861<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511862 Overrides a previous <code>--no-walk</code>.
Junio C Hamanob0e02952008-01-19 08:02:001863</p>
1864</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311865</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271866</div>
1867<div class="sect2">
1868<h3 id="_commit_formatting">Commit Formatting</h3>
Junio C Hamanod2c978f2011-03-20 19:42:221869<div class="dlist"><dl>
1870<dt class="hdlist1">
1871--pretty[=&lt;format&gt;]
1872</dt>
1873<dt class="hdlist1">
1874--format=&lt;format&gt;
1875</dt>
1876<dd>
1877<p>
1878 Pretty-print the contents of the commit logs in a given format,
1879 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
Junio C Hamano6bb32e62015-02-17 22:11:261880 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em>, <em>format:&lt;string&gt;</em>
1881 and <em>tformat:&lt;string&gt;</em>. When <em>&lt;format&gt;</em> is none of the above,
1882 and has <em>%placeholder</em> in it, it acts as if
1883 <em>--pretty=tformat:&lt;format&gt;</em> were given.
Junio C Hamanod2c978f2011-03-20 19:42:221884</p>
Junio C Hamano6bb32e62015-02-17 22:11:261885<div class="paragraph"><p>See the "PRETTY FORMATS" section for some additional details for each
1886format. When <em>=&lt;format&gt;</em> part is omitted, it defaults to <em>medium</em>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221887<div class="paragraph"><p>Note: you can specify the default pretty format in the repository
Junio C Hamanoa28a9202012-06-21 07:08:231888configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221889</dd>
1890<dt class="hdlist1">
1891--abbrev-commit
1892</dt>
1893<dd>
1894<p>
1895 Instead of showing the full 40-byte hexadecimal commit object
1896 name, show only a partial prefix. Non default number of
1897 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
1898 diff output, if it is displayed).
1899</p>
1900<div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
1901people using 80-column terminals.</p></div>
1902</dd>
1903<dt class="hdlist1">
Junio C Hamanof93530e2011-05-25 23:59:591904--no-abbrev-commit
1905</dt>
1906<dd>
1907<p>
1908 Show the full 40-byte hexadecimal commit object name. This negates
Junio C Hamanoac12f0e2014-09-19 22:32:511909 <code>--abbrev-commit</code> and those options which imply it such as
Junio C Hamano042f2142016-06-27 18:05:051910 "--oneline". It also overrides the <code>log.abbrevCommit</code> variable.
Junio C Hamanof93530e2011-05-25 23:59:591911</p>
1912</dd>
1913<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221914--oneline
1915</dt>
1916<dd>
1917<p>
1918 This is a shorthand for "--pretty=oneline --abbrev-commit"
1919 used together.
1920</p>
1921</dd>
1922<dt class="hdlist1">
Junio C Hamanoc5bb3b32013-08-05 22:43:361923--encoding=&lt;encoding&gt;
Junio C Hamanod2c978f2011-03-20 19:42:221924</dt>
1925<dd>
1926<p>
1927 The commit objects record the encoding used for the log message
1928 in their encoding header; this option can be used to tell the
1929 command to re-code the commit log message in the encoding
1930 preferred by the user. For non plumbing commands this
Junio C Hamano823eebb2015-07-10 22:29:341931 defaults to UTF-8. Note that if an object claims to be encoded
1932 in <code>X</code> and we are outputting in <code>X</code>, we will output the object
1933 verbatim; this means that invalid sequences in the original
1934 commit may be copied to the output.
Junio C Hamanod2c978f2011-03-20 19:42:221935</p>
1936</dd>
1937<dt class="hdlist1">
Junio C Hamano5996b672016-04-13 22:01:411938--expand-tabs=&lt;n&gt;
1939</dt>
1940<dt class="hdlist1">
1941--expand-tabs
1942</dt>
1943<dt class="hdlist1">
1944--no-expand-tabs
1945</dt>
1946<dd>
1947<p>
1948 Perform a tab expansion (replace each tab with enough spaces
1949 to fill to the next display column that is multiple of <em>&lt;n&gt;</em>)
1950 in the log message before showing it in the output.
1951 <code>--expand-tabs</code> is a short-hand for <code>--expand-tabs=8</code>, and
1952 <code>--no-expand-tabs</code> is a short-hand for <code>--expand-tabs=0</code>,
1953 which disables tab expansion.
1954</p>
1955<div class="paragraph"><p>By default, tabs are expanded in pretty formats that indent the log
1956message by 4 spaces (i.e. <em>medium</em>, which is the default, <em>full</em>,
1957and <em>fuller</em>).</p></div>
1958</dd>
1959<dt class="hdlist1">
Junio C Hamano4e6ba272016-01-20 23:23:191960--notes[=&lt;treeish&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:221961</dt>
1962<dd>
1963<p>
Junio C Hamanoa28a9202012-06-21 07:08:231964 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
Junio C Hamanod2c978f2011-03-20 19:42:221965 commit, when showing the commit log message. This is the default
Junio C Hamanoac12f0e2014-09-19 22:32:511966 for <code>git log</code>, <code>git show</code> and <code>git whatchanged</code> commands when
1967 there is no <code>--pretty</code>, <code>--format</code>, or <code>--oneline</code> option given
Junio C Hamano60033462011-05-03 00:48:431968 on the command line.
Junio C Hamanod2c978f2011-03-20 19:42:221969</p>
Junio C Hamano60033462011-05-03 00:48:431970<div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the
Junio C Hamano042f2142016-06-27 18:05:051971<code>core.notesRef</code> and <code>notes.displayRef</code> variables (or corresponding
Junio C Hamanoa28a9202012-06-21 07:08:231972environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div>
Junio C Hamano4e6ba272016-01-20 23:23:191973<div class="paragraph"><p>With an optional <em>&lt;treeish&gt;</em> argument, use the treeish to find the notes
1974to display. The treeish can specify the full refname when it begins
Junio C Hamano1f7c4a52015-10-14 22:15:511975with <code>refs/notes/</code>; when it begins with <code>notes/</code>, <code>refs/</code> and otherwise
1976<code>refs/notes/</code> is prefixed to form a full name of the ref.</p></div>
Junio C Hamano60033462011-05-03 00:48:431977<div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
1978being displayed. Examples: "--notes=foo" will show only notes from
1979"refs/notes/foo"; "--notes=foo --notes" will show both notes from
1980"refs/notes/foo" and from the default notes ref(s).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221981</dd>
1982<dt class="hdlist1">
Junio C Hamano60033462011-05-03 00:48:431983--no-notes
1984</dt>
1985<dd>
1986<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511987 Do not show notes. This negates the above <code>--notes</code> option, by
Junio C Hamano60033462011-05-03 00:48:431988 resetting the list of notes refs from which notes are shown.
1989 Options are parsed in the order given on the command line, so e.g.
1990 "--notes --notes=foo --no-notes --notes=bar" will only show notes
1991 from "refs/notes/bar".
1992</p>
1993</dd>
1994<dt class="hdlist1">
Junio C Hamano4e6ba272016-01-20 23:23:191995--show-notes[=&lt;treeish&gt;]
Junio C Hamano60033462011-05-03 00:48:431996</dt>
1997<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221998--[no-]standard-notes
1999</dt>
2000<dd>
2001<p>
Junio C Hamano60033462011-05-03 00:48:432002 These options are deprecated. Use the above --notes/--no-notes
2003 options instead.
Junio C Hamanod2c978f2011-03-20 19:42:222004</p>
2005</dd>
2006<dt class="hdlist1">
Junio C Hamano0acb1ae2012-09-24 21:28:132007--show-signature
2008</dt>
2009<dd>
2010<p>
2011 Check the validity of a signed commit object by passing the signature
Junio C Hamanoac12f0e2014-09-19 22:32:512012 to <code>gpg --verify</code> and show the output.
Junio C Hamano0acb1ae2012-09-24 21:28:132013</p>
2014</dd>
2015<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222016--relative-date
2017</dt>
2018<dd>
2019<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512020 Synonym for <code>--date=relative</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222021</p>
2022</dd>
2023<dt class="hdlist1">
Junio C Hamano1eb56092015-10-05 20:39:532024--date=&lt;format&gt;
Junio C Hamanod2c978f2011-03-20 19:42:222025</dt>
2026<dd>
2027<p>
2028 Only takes effect for dates shown in human-readable format, such
Junio C Hamanoac12f0e2014-09-19 22:32:512029 as when using <code>--pretty</code>. <code>log.date</code> config variable sets a default
Junio C Hamano1eb56092015-10-05 20:39:532030 value for the log command&#8217;s <code>--date</code> option. By default, dates
2031 are shown in the original time zone (either committer&#8217;s or
2032 author&#8217;s). If <code>-local</code> is appended to the format (e.g.,
2033 <code>iso-local</code>), the user&#8217;s local time zone is used instead.
Junio C Hamanod2c978f2011-03-20 19:42:222034</p>
Junio C Hamanoac12f0e2014-09-19 22:32:512035<div class="paragraph"><p><code>--date=relative</code> shows dates relative to the current time,
Junio C Hamanoe548d1b2016-08-08 22:26:492036e.g. &#8220;2 hours ago&#8221;. The <code>-local</code> option has no effect for
2037<code>--date=relative</code>.</p></div>
Junio C Hamano1eb56092015-10-05 20:39:532038<div class="paragraph"><p><code>--date=local</code> is an alias for <code>--date=default-local</code>.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512039<div class="paragraph"><p><code>--date=iso</code> (or <code>--date=iso8601</code>) shows timestamps in a ISO 8601-like format.
2040The differences to the strict ISO 8601 format are:</p></div>
2041<div class="ulist"><ul>
2042<li>
2043<p>
2044a space instead of the <code>T</code> date/time delimiter
2045</p>
2046</li>
2047<li>
2048<p>
2049a space between time and time zone
2050</p>
2051</li>
2052<li>
2053<p>
2054no colon between hours and minutes of the time zone
2055</p>
2056</li>
2057</ul></div>
2058<div class="paragraph"><p><code>--date=iso-strict</code> (or <code>--date=iso8601-strict</code>) shows timestamps in strict
2059ISO 8601 format.</p></div>
2060<div class="paragraph"><p><code>--date=rfc</code> (or <code>--date=rfc2822</code>) shows timestamps in RFC 2822
Junio C Hamanob73af6c2013-12-03 22:07:112061format, often found in email messages.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512062<div class="paragraph"><p><code>--date=short</code> shows only the date, but not the time, in <code>YYYY-MM-DD</code> format.</p></div>
Junio C Hamanoe548d1b2016-08-08 22:26:492063<div class="paragraph"><p><code>--date=raw</code> shows the date as seconds since the epoch (1970-01-01
206400:00:00 UTC), followed by a space, and then the timezone as an offset
2065from UTC (a <code>+</code> or <code>-</code> with four digits; the first two are hours, and
2066the second two are minutes). I.e., as if the timestamp were formatted
2067with <code>strftime("%s %z")</code>).
2068Note that the <code>-local</code> option does not affect the seconds-since-epoch
2069value (which is always measured in UTC), but does switch the accompanying
2070timezone value.</p></div>
2071<div class="paragraph"><p><code>--date=unix</code> shows the date as a Unix epoch timestamp (seconds since
20721970). As with <code>--raw</code>, this is always in UTC and therefore <code>-local</code>
2073has no effect.</p></div>
Junio C Hamano55d91912017-06-22 22:32:462074<div class="paragraph"><p><code>--date=format:...</code> feeds the format <code>...</code> to your system <code>strftime</code>,
2075except for %z and %Z, which are handled internally.
Junio C Hamanod7ed4042015-08-03 19:43:002076Use <code>--date=format:%c</code> to show the date in your system locale&#8217;s
2077preferred format. See the <code>strftime</code> manual for a complete list of
Junio C Hamano1eb56092015-10-05 20:39:532078format placeholders. When using <code>-local</code>, the correct syntax is
2079<code>--date=format-local:...</code>.</p></div>
2080<div class="paragraph"><p><code>--date=default</code> is the default format, and is similar to
2081<code>--date=rfc2822</code>, with a few exceptions:</p></div>
2082<div class="ulist"><ul>
2083<li>
2084<p>
2085there is no comma after the day-of-week
2086</p>
2087</li>
2088<li>
2089<p>
2090the time zone is omitted when the local time zone is used
2091</p>
2092</li>
2093</ul></div>
Junio C Hamanod2c978f2011-03-20 19:42:222094</dd>
2095<dt class="hdlist1">
2096--parents
2097</dt>
2098<dd>
2099<p>
2100 Print also the parents of the commit (in the form "commit parent&#8230;").
2101 Also enables parent rewriting, see <em>History Simplification</em> below.
2102</p>
2103</dd>
2104<dt class="hdlist1">
2105--children
2106</dt>
2107<dd>
2108<p>
2109 Print also the children of the commit (in the form "commit child&#8230;").
2110 Also enables parent rewriting, see <em>History Simplification</em> below.
2111</p>
2112</dd>
2113<dt class="hdlist1">
2114--left-right
2115</dt>
2116<dd>
2117<p>
Junio C Hamanocd451662016-09-13 00:54:092118 Mark which side of a symmetric difference a commit is reachable from.
Junio C Hamanoac12f0e2014-09-19 22:32:512119 Commits from the left side are prefixed with <code>&lt;</code> and those from
2120 the right with <code>&gt;</code>. If combined with <code>--boundary</code>, those
2121 commits are prefixed with <code>-</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222122</p>
2123<div class="paragraph"><p>For example, if you have this topology:</p></div>
2124<div class="listingblock">
2125<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512126<pre><code> y---b---b branch B
Junio C Hamanod2c978f2011-03-20 19:42:222127 / \ /
2128 / .
2129 / / \
Junio C Hamanoac12f0e2014-09-19 22:32:512130 o---x---a---a branch A</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222131</div></div>
2132<div class="paragraph"><p>you would get an output like this:</p></div>
2133<div class="listingblock">
2134<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512135<pre><code> $ git rev-list --left-right --boundary --pretty=oneline A...B
Junio C Hamanod2c978f2011-03-20 19:42:222136
2137 &gt;bbbbbbb... 3rd on b
2138 &gt;bbbbbbb... 2nd on b
2139 &lt;aaaaaaa... 3rd on a
2140 &lt;aaaaaaa... 2nd on a
2141 -yyyyyyy... 1st on b
Junio C Hamanoac12f0e2014-09-19 22:32:512142 -xxxxxxx... 1st on a</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222143</div></div>
2144</dd>
2145<dt class="hdlist1">
2146--graph
2147</dt>
2148<dd>
2149<p>
2150 Draw a text-based graphical representation of the commit history
2151 on the left hand side of the output. This may cause extra lines
2152 to be printed in between commits, in order for the graph history
2153 to be drawn properly.
Junio C Hamanoef57d1e2015-03-25 21:23:002154 Cannot be combined with <code>--no-walk</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222155</p>
2156<div class="paragraph"><p>This enables parent rewriting, see <em>History Simplification</em> below.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512157<div class="paragraph"><p>This implies the <code>--topo-order</code> option by default, but the
2158<code>--date-order</code> option may also be specified.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:222159</dd>
Junio C Hamano624dd4c2014-04-03 21:56:302160<dt class="hdlist1">
2161--show-linear-break[=&lt;barrier&gt;]
2162</dt>
2163<dd>
2164<p>
2165 When --graph is not used, all history branches are flattened
2166 which can make it hard to see that the two consecutive commits
2167 do not belong to a linear branch. This option puts a barrier
Junio C Hamanoac12f0e2014-09-19 22:32:512168 in between them in that case. If <code>&lt;barrier&gt;</code> is specified, it
Junio C Hamano624dd4c2014-04-03 21:56:302169 is the string that will be shown instead of the default one.
2170</p>
2171</dd>
Junio C Hamanod2c978f2011-03-20 19:42:222172</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:272173</div>
2174<div class="sect2">
2175<h3 id="_diff_formatting">Diff Formatting</h3>
Junio C Hamanob73af6c2013-12-03 22:07:112176<div class="paragraph"><p>Listed below are options that control the formatting of diff output.
Junio C Hamanoa28a9202012-06-21 07:08:232177Some of them are specific to <a href="git-rev-list.html">git-rev-list(1)</a>, however other diff
2178options may be given. See <a href="git-diff-files.html">git-diff-files(1)</a> for more options.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:222179<div class="dlist"><dl>
2180<dt class="hdlist1">
2181-c
2182</dt>
2183<dd>
2184<p>
2185 With this option, diff output for a merge commit
2186 shows the differences from each of the parents to the merge result
2187 simultaneously instead of showing pairwise diff between a parent
2188 and the result one at a time. Furthermore, it lists only files
2189 which were modified from all parents.
2190</p>
2191</dd>
2192<dt class="hdlist1">
2193--cc
2194</dt>
2195<dd>
2196<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512197 This flag implies the <code>-c</code> option and further compresses the
Junio C Hamanod2c978f2011-03-20 19:42:222198 patch output by omitting uninteresting hunks whose contents in
2199 the parents have only two variants and the merge result picks
2200 one of them without modification.
2201</p>
2202</dd>
2203<dt class="hdlist1">
2204-m
2205</dt>
2206<dd>
2207<p>
2208 This flag makes the merge commits show the full diff like
2209 regular commits; for each merge parent, a separate log entry
2210 and diff is generated. An exception is that only diff against
Junio C Hamanoac12f0e2014-09-19 22:32:512211 the first parent is shown when <code>--first-parent</code> option is given;
Junio C Hamanod2c978f2011-03-20 19:42:222212 in that case, the output represents the changes the merge
2213 brought <em>into</em> the then-current branch.
2214</p>
2215</dd>
2216<dt class="hdlist1">
2217-r
2218</dt>
2219<dd>
2220<p>
2221 Show recursive diffs.
2222</p>
2223</dd>
2224<dt class="hdlist1">
2225-t
2226</dt>
2227<dd>
2228<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512229 Show the tree objects in the diff output. This implies <code>-r</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222230</p>
2231</dd>
Junio C Hamanod2c978f2011-03-20 19:42:222232</dl></div>
Junio C Hamano0430e3a2007-05-15 03:13:172233</div>
Junio C Hamano9629d4f2012-12-19 00:28:272234</div>
2235</div>
2236<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312237<h2 id="_pretty_formats">PRETTY FORMATS</h2>
Junio C Hamano0430e3a2007-05-15 03:13:172238<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592239<div class="paragraph"><p>If the commit is a merge, and if the pretty-format
Junio C Hamano0430e3a2007-05-15 03:13:172240is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
2241inserted before the <em>Author:</em> line. This line begins with
2242"Merge: " and the sha1s of ancestral commits are printed,
2243separated by spaces. Note that the listed commits may not
2244necessarily be the list of the <strong>direct</strong> parent commits if you
2245have limited your view of history: for example, if you are
2246only interested in changes related to a certain directory or
Junio C Hamanoba4b9282008-07-06 05:20:312247file.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592248<div class="paragraph"><p>There are several built-in formats, and you can define
Junio C Hamanoa574a092010-06-13 19:57:102249additional formats by setting a pretty.&lt;name&gt;
2250config option to either another format name, or a
2251<em>format:</em> string, as described below (see
Junio C Hamanoa28a9202012-06-21 07:08:232252<a href="git-config.html">git-config(1)</a>). Here are the details of the
Junio C Hamanoa574a092010-06-13 19:57:102253built-in formats:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592254<div class="ulist"><ul>
Junio C Hamanoa340aaa2006-11-23 02:47:332255<li>
2256<p>
2257<em>oneline</em>
2258</p>
2259<div class="literalblock">
2260<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512261<pre><code>&lt;sha1&gt; &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332262</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592263<div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:332264</li>
2265<li>
2266<p>
2267<em>short</em>
2268</p>
2269<div class="literalblock">
2270<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512271<pre><code>commit &lt;sha1&gt;
2272Author: &lt;author&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332273</div></div>
2274<div class="literalblock">
2275<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512276<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332277</div></div>
2278</li>
2279<li>
2280<p>
2281<em>medium</em>
2282</p>
2283<div class="literalblock">
2284<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512285<pre><code>commit &lt;sha1&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332286Author: &lt;author&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512287Date: &lt;author date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332288</div></div>
2289<div class="literalblock">
2290<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512291<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332292</div></div>
2293<div class="literalblock">
2294<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512295<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332296</div></div>
2297</li>
2298<li>
2299<p>
2300<em>full</em>
2301</p>
2302<div class="literalblock">
2303<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512304<pre><code>commit &lt;sha1&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332305Author: &lt;author&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512306Commit: &lt;committer&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332307</div></div>
2308<div class="literalblock">
2309<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512310<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332311</div></div>
2312<div class="literalblock">
2313<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512314<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332315</div></div>
2316</li>
2317<li>
2318<p>
2319<em>fuller</em>
2320</p>
2321<div class="literalblock">
2322<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512323<pre><code>commit &lt;sha1&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182324Author: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312325AuthorDate: &lt;author date&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182326Commit: &lt;committer&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512327CommitDate: &lt;committer date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332328</div></div>
2329<div class="literalblock">
2330<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512331<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332332</div></div>
2333<div class="literalblock">
2334<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512335<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332336</div></div>
2337</li>
2338<li>
2339<p>
2340<em>email</em>
2341</p>
2342<div class="literalblock">
2343<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512344<pre><code>From &lt;sha1&gt; &lt;date&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332345From: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312346Date: &lt;author date&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512347Subject: [PATCH] &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332348</div></div>
2349<div class="literalblock">
2350<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512351<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332352</div></div>
2353</li>
2354<li>
2355<p>
2356<em>raw</em>
2357</p>
Junio C Hamano68cf15a2010-11-06 01:01:592358<div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
Junio C Hamanoe3f080d2013-04-22 02:27:132359stored in the commit object. Notably, the SHA-1s are
Junio C Hamanoa340aaa2006-11-23 02:47:332360displayed in full, regardless of whether --abbrev or
2361--no-abbrev are used, and <em>parents</em> information show the
Junio C Hamanod75148a2014-04-08 19:48:382362true parent commits, without taking grafts or history
Junio C Hamano85f1fde2015-06-01 20:37:322363simplification into account. Note that this format affects the way
2364commits are displayed, but not the way the diff is shown e.g. with
2365<code>git log --raw</code>. To get full object names in a raw diff format,
2366use <code>--no-abbrev</code>.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:332367</li>
Junio C Hamanoa3fd83c2007-03-02 10:34:362368<li>
2369<p>
Junio C Hamanoe32ec8b2010-06-02 23:32:312370<em>format:&lt;string&gt;</em>
Junio C Hamanoa3fd83c2007-03-02 10:34:362371</p>
Junio C Hamano68cf15a2010-11-06 01:01:592372<div class="paragraph"><p>The <em>format:&lt;string&gt;</em> format allows you to specify which information
Junio C Hamanoa3fd83c2007-03-02 10:34:362373you want to show. It works a little bit like printf format,
2374with the notable exception that you get a newline with <em>%n</em>
Junio C Hamanoba4b9282008-07-06 05:20:312375instead of <em>\n</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592376<div class="paragraph"><p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was &gt;&gt;%s&lt;&lt;%n"</em>
Junio C Hamanoba4b9282008-07-06 05:20:312377would show something like this:</p></div>
Junio C Hamano0430e3a2007-05-15 03:13:172378<div class="listingblock">
2379<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512380<pre><code>The author of fe6e0ee was Junio C Hamano, 23 hours ago
2381The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172382</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592383<div class="paragraph"><p>The placeholders are:</p></div>
2384<div class="ulist"><ul>
Junio C Hamanoa3fd83c2007-03-02 10:34:362385<li>
2386<p>
2387<em>%H</em>: commit hash
2388</p>
2389</li>
2390<li>
2391<p>
2392<em>%h</em>: abbreviated commit hash
2393</p>
2394</li>
2395<li>
2396<p>
2397<em>%T</em>: tree hash
2398</p>
2399</li>
2400<li>
2401<p>
2402<em>%t</em>: abbreviated tree hash
2403</p>
2404</li>
2405<li>
2406<p>
2407<em>%P</em>: parent hashes
2408</p>
2409</li>
2410<li>
2411<p>
2412<em>%p</em>: abbreviated parent hashes
2413</p>
2414</li>
2415<li>
2416<p>
2417<em>%an</em>: author name
2418</p>
2419</li>
2420<li>
2421<p>
Junio C Hamano04e768d2013-04-23 19:19:262422<em>%aN</em>: author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2423 or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamanof5a93622008-07-16 03:23:572424</p>
2425</li>
2426<li>
2427<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362428<em>%ae</em>: author email
2429</p>
2430</li>
2431<li>
2432<p>
Junio C Hamano04e768d2013-04-23 19:19:262433<em>%aE</em>: author email (respecting .mailmap, see
2434 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamano8bc410e2009-02-15 10:38:192435</p>
2436</li>
2437<li>
2438<p>
Junio C Hamanoa387df32008-08-29 08:56:582439<em>%ad</em>: author date (format respects --date= option)
Junio C Hamanoa3fd83c2007-03-02 10:34:362440</p>
2441</li>
2442<li>
2443<p>
2444<em>%aD</em>: author date, RFC2822 style
2445</p>
2446</li>
2447<li>
2448<p>
2449<em>%ar</em>: author date, relative
2450</p>
2451</li>
2452<li>
2453<p>
2454<em>%at</em>: author date, UNIX timestamp
2455</p>
2456</li>
2457<li>
2458<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512459<em>%ai</em>: author date, ISO 8601-like format
2460</p>
2461</li>
2462<li>
2463<p>
2464<em>%aI</em>: author date, strict ISO 8601 format
Junio C Hamano02f130b2007-07-14 08:26:562465</p>
2466</li>
2467<li>
2468<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362469<em>%cn</em>: committer name
2470</p>
2471</li>
2472<li>
2473<p>
Junio C Hamano04e768d2013-04-23 19:19:262474<em>%cN</em>: committer name (respecting .mailmap, see
2475 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamanof5a93622008-07-16 03:23:572476</p>
2477</li>
2478<li>
2479<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362480<em>%ce</em>: committer email
2481</p>
2482</li>
2483<li>
2484<p>
Junio C Hamano04e768d2013-04-23 19:19:262485<em>%cE</em>: committer email (respecting .mailmap, see
2486 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamano8bc410e2009-02-15 10:38:192487</p>
2488</li>
2489<li>
2490<p>
Junio C Hamano53fe0312014-09-09 21:16:172491<em>%cd</em>: committer date (format respects --date= option)
Junio C Hamanoa3fd83c2007-03-02 10:34:362492</p>
2493</li>
2494<li>
2495<p>
2496<em>%cD</em>: committer date, RFC2822 style
2497</p>
2498</li>
2499<li>
2500<p>
2501<em>%cr</em>: committer date, relative
2502</p>
2503</li>
2504<li>
2505<p>
2506<em>%ct</em>: committer date, UNIX timestamp
2507</p>
2508</li>
2509<li>
2510<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512511<em>%ci</em>: committer date, ISO 8601-like format
2512</p>
2513</li>
2514<li>
2515<p>
2516<em>%cI</em>: committer date, strict ISO 8601 format
Junio C Hamano02f130b2007-07-14 08:26:562517</p>
2518</li>
2519<li>
2520<p>
Junio C Hamanoa28a9202012-06-21 07:08:232521<em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
Junio C Hamano5e4d8de2008-09-19 06:27:022522</p>
2523</li>
2524<li>
2525<p>
Junio C Hamano00b9f1a2014-09-29 23:11:282526<em>%D</em>: ref names without the " (", ")" wrapping.
2527</p>
2528</li>
2529<li>
2530<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362531<em>%e</em>: encoding
2532</p>
2533</li>
2534<li>
2535<p>
2536<em>%s</em>: subject
2537</p>
2538</li>
2539<li>
2540<p>
Junio C Hamano5f9a6f02009-04-06 08:26:562541<em>%f</em>: sanitized subject line, suitable for a filename
2542</p>
2543</li>
2544<li>
2545<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362546<em>%b</em>: body
2547</p>
2548</li>
2549<li>
2550<p>
Junio C Hamanocb39aea2010-05-09 07:24:482551<em>%B</em>: raw body (unwrapped subject and body)
2552</p>
2553</li>
2554<li>
2555<p>
Junio C Hamano3b70d3c2009-11-21 17:37:372556<em>%N</em>: commit notes
2557</p>
2558</li>
2559<li>
2560<p>
Junio C Hamano0acb1ae2012-09-24 21:28:132561<em>%GG</em>: raw verification message from GPG for a signed commit
2562</p>
2563</li>
2564<li>
2565<p>
Junio C Hamano4a401d52016-10-26 22:24:372566<em>%G?</em>: show "G" for a good (valid) signature,
2567 "B" for a bad signature,
2568 "U" for a good signature with unknown validity,
2569 "X" for a good signature that has expired,
2570 "Y" for a good signature made by an expired key,
2571 "R" for a good signature made by a revoked key,
2572 "E" if the signature cannot be checked (e.g. missing key)
2573 and "N" for no signature
Junio C Hamano0acb1ae2012-09-24 21:28:132574</p>
2575</li>
2576<li>
2577<p>
2578<em>%GS</em>: show the name of the signer for a signed commit
2579</p>
2580</li>
2581<li>
2582<p>
Junio C Hamano5e7f1312013-03-21 22:49:012583<em>%GK</em>: show the key used to sign a signed commit
2584</p>
2585</li>
2586<li>
2587<p>
Junio C Hamanoe548d1b2016-08-08 22:26:492588<em>%gD</em>: reflog selector, e.g., <code>refs/stash@{1}</code> or
2589 <code>refs/stash@{2 minutes ago</code>}; the format follows the rules described
2590 for the <code>-g</code> option. The portion before the <code>@</code> is the refname as
2591 given on the command line (so <code>git log -g refs/heads/master</code> would
2592 yield <code>refs/heads/master@{0}</code>).
Junio C Hamanoc21ab052009-10-31 04:03:552593</p>
2594</li>
2595<li>
2596<p>
Junio C Hamanoe548d1b2016-08-08 22:26:492597<em>%gd</em>: shortened reflog selector; same as <code>%gD</code>, but the refname
2598 portion is shortened for human readability (so <code>refs/heads/master</code>
2599 becomes just <code>master</code>).
Junio C Hamanoc21ab052009-10-31 04:03:552600</p>
2601</li>
2602<li>
2603<p>
Junio C Hamano962f3a32011-12-22 20:21:442604<em>%gn</em>: reflog identity name
2605</p>
2606</li>
2607<li>
2608<p>
Junio C Hamano04e768d2013-04-23 19:19:262609<em>%gN</em>: reflog identity name (respecting .mailmap, see
2610 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamano962f3a32011-12-22 20:21:442611</p>
2612</li>
2613<li>
2614<p>
2615<em>%ge</em>: reflog identity email
2616</p>
2617</li>
2618<li>
2619<p>
Junio C Hamano04e768d2013-04-23 19:19:262620<em>%gE</em>: reflog identity email (respecting .mailmap, see
2621 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamano962f3a32011-12-22 20:21:442622</p>
2623</li>
2624<li>
2625<p>
Junio C Hamanoc21ab052009-10-31 04:03:552626<em>%gs</em>: reflog subject
2627</p>
2628</li>
2629<li>
2630<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362631<em>%Cred</em>: switch color to red
2632</p>
2633</li>
2634<li>
2635<p>
2636<em>%Cgreen</em>: switch color to green
2637</p>
2638</li>
2639<li>
2640<p>
2641<em>%Cblue</em>: switch color to blue
2642</p>
2643</li>
2644<li>
2645<p>
2646<em>%Creset</em>: reset color
2647</p>
2648</li>
2649<li>
2650<p>
Junio C Hamanoc0859f72016-10-17 22:22:572651<em>%C(&#8230;)</em>: color specification, as described under Values in the
2652 "CONFIGURATION FILE" section of <a href="git-config.html">git-config(1)</a>;
Junio C Hamanoac12f0e2014-09-19 22:32:512653 adding <code>auto,</code> at the beginning will emit color only when colors are
2654 enabled for log output (by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and
2655 respecting the <code>auto</code> settings of the former if we are going to a
2656 terminal). <code>auto</code> alone (i.e. <code>%C(auto)</code>) will turn on auto coloring
Junio C Hamano04e768d2013-04-23 19:19:262657 on the next placeholders until the color is switched again.
Junio C Hamanocc0cb312009-01-22 03:38:502658</p>
2659</li>
2660<li>
2661<p>
Junio C Hamanocd451662016-09-13 00:54:092662<em>%m</em>: left (<code>&lt;</code>), right (<code>&gt;</code>) or boundary (<code>-</code>) mark
Junio C Hamanod9e0e5d2007-04-14 16:22:042663</p>
2664</li>
2665<li>
2666<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362667<em>%n</em>: newline
2668</p>
Junio C Hamano0430e3a2007-05-15 03:13:172669</li>
Junio C Hamanob78d2592008-04-09 09:39:082670<li>
2671<p>
Junio C Hamanoa9701f02010-01-21 00:42:162672<em>%%</em>: a raw <em>%</em>
2673</p>
2674</li>
2675<li>
2676<p>
Junio C Hamanob78d2592008-04-09 09:39:082677<em>%x00</em>: print a byte from a hex code
2678</p>
2679</li>
Junio C Hamanobf984de2009-11-23 06:11:192680<li>
2681<p>
2682<em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>: switch line wrapping, like the -w option of
Junio C Hamanoa28a9202012-06-21 07:08:232683 <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanobf984de2009-11-23 06:11:192684</p>
2685</li>
Junio C Hamano04e768d2013-04-23 19:19:262686<li>
2687<p>
2688<em>%&lt;(&lt;N&gt;[,trunc|ltrunc|mtrunc])</em>: make the next placeholder take at
2689 least N columns, padding spaces on the right if necessary.
2690 Optionally truncate at the beginning (ltrunc), the middle (mtrunc)
2691 or the end (trunc) if the output is longer than N columns.
2692 Note that truncating only works correctly with N &gt;= 2.
2693</p>
2694</li>
2695<li>
2696<p>
2697<em>%&lt;|(&lt;N&gt;)</em>: make the next placeholder take at least until Nth
2698 columns, padding spaces on the right if necessary
2699</p>
2700</li>
2701<li>
2702<p>
2703<em>%&gt;(&lt;N&gt;)</em>, <em>%&gt;|(&lt;N&gt;)</em>: similar to <em>%&lt;(&lt;N&gt;)</em>, <em>%&lt;|(&lt;N&gt;)</em>
2704 respectively, but padding spaces on the left
2705</p>
2706</li>
2707<li>
2708<p>
2709<em>%&gt;&gt;(&lt;N&gt;)</em>, <em>%&gt;&gt;|(&lt;N&gt;)</em>: similar to <em>%&gt;(&lt;N&gt;)</em>, <em>%&gt;|(&lt;N&gt;)</em>
2710 respectively, except that if the next placeholder takes more spaces
2711 than given and there are spaces on its left, use those spaces
2712</p>
2713</li>
2714<li>
2715<p>
2716<em>%&gt;&lt;(&lt;N&gt;)</em>, <em>%&gt;&lt;|(&lt;N&gt;)</em>: similar to <em>% &lt;(&lt;N&gt;)</em>, <em>%&lt;|(&lt;N&gt;)</em>
2717 respectively, but padding both sides (i.e. the text is centered)
Junio C Hamano222ed822017-06-02 06:24:062718</p>
2719</li>
2720<li>
2721<p>
2722%(trailers): display the trailers of the body as interpreted by
Junio C Hamano52b1cfb2016-12-20 00:18:362723 <a href="git-interpret-trailers.html">git-interpret-trailers(1)</a>
Junio C Hamano04e768d2013-04-23 19:19:262724</p>
2725</li>
Junio C Hamanoba4b9282008-07-06 05:20:312726</ul></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:362727</li>
Junio C Hamanoc21ab052009-10-31 04:03:552728</ul></div>
2729<div class="admonitionblock">
2730<table><tr>
2731<td class="icon">
2732<div class="title">Note</div>
2733</td>
2734<td class="content">Some placeholders may depend on other options given to the
Junio C Hamanoac12f0e2014-09-19 22:32:512735revision traversal engine. For example, the <code>%g*</code> reflog options will
Junio C Hamanoc21ab052009-10-31 04:03:552736insert an empty string unless we are traversing reflog entries (e.g., by
Junio C Hamano00b9f1a2014-09-29 23:11:282737<code>git log -g</code>). The <code>%d</code> and <code>%D</code> placeholders will use the "short"
2738decoration format if <code>--decorate</code> was not already provided on the command
2739line.</td>
Junio C Hamanoc21ab052009-10-31 04:03:552740</tr></table>
2741</div>
Junio C Hamanoac12f0e2014-09-19 22:32:512742<div class="paragraph"><p>If you add a <code>+</code> (plus sign) after <em>%</em> of a placeholder, a line-feed
Junio C Hamano2bd8a742009-12-01 21:16:592743is inserted immediately before the expansion if and only if the
2744placeholder expands to a non-empty string.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512745<div class="paragraph"><p>If you add a <code>-</code> (minus sign) after <em>%</em> of a placeholder, line-feeds that
Junio C Hamano2bd8a742009-12-01 21:16:592746immediately precede the expansion are deleted if and only if the
2747placeholder expands to an empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592748<div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
Junio C Hamano89a57342010-06-22 23:22:552749is inserted immediately before the expansion if and only if the
2750placeholder expands to a non-empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592751<div class="ulist"><ul>
Junio C Hamano6fb124c2008-06-13 10:04:012752<li>
2753<p>
2754<em>tformat:</em>
2755</p>
Junio C Hamano68cf15a2010-11-06 01:01:592756<div class="paragraph"><p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
Junio C Hamano6fb124c2008-06-13 10:04:012757provides "terminator" semantics instead of "separator" semantics. In
2758other words, each commit has the message terminator character (usually a
2759newline) appended, rather than a separator placed between entries.
2760This means that the final entry of a single-line format will be properly
2761terminated with a new line, just as the "oneline" format does.
Junio C Hamanoba4b9282008-07-06 05:20:312762For example:</p></div>
Junio C Hamano6fb124c2008-06-13 10:04:012763<div class="listingblock">
2764<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512765<pre><code>$ git log -2 --pretty=format:%h 4da45bef \
Junio C Hamano6fb124c2008-06-13 10:04:012766 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
27674da45be
27687134973 -- NO NEWLINE
2769
2770$ git log -2 --pretty=tformat:%h 4da45bef \
2771 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
27724da45be
Junio C Hamanoac12f0e2014-09-19 22:32:5127737134973</code></pre>
Junio C Hamano6fb124c2008-06-13 10:04:012774</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512775<div class="paragraph"><p>In addition, any unrecognized string that has a <code>%</code> in it is interpreted
2776as if it has <code>tformat:</code> in front of it. For example, these two are
Junio C Hamano0a235222009-03-06 08:21:092777equivalent:</p></div>
2778<div class="listingblock">
2779<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512780<pre><code>$ git log -2 --pretty=tformat:%h 4da45bef
2781$ git log -2 --pretty=%h 4da45bef</code></pre>
Junio C Hamano0a235222009-03-06 08:21:092782</div></div>
Junio C Hamano6fb124c2008-06-13 10:04:012783</li>
Junio C Hamanoba4b9282008-07-06 05:20:312784</ul></div>
Junio C Hamano1a4e8412005-12-27 08:17:232785</div>
Junio C Hamano9629d4f2012-12-19 00:28:272786</div>
2787<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:592788<h2 id="_common_diff_options">COMMON DIFF OPTIONS</h2>
Junio C Hamanod2c978f2011-03-20 19:42:222789<div class="sectionbody">
2790<div class="dlist"><dl>
2791<dt class="hdlist1">
2792-p
2793</dt>
2794<dt class="hdlist1">
2795-u
2796</dt>
2797<dt class="hdlist1">
2798--patch
2799</dt>
2800<dd>
2801<p>
2802 Generate patch (see section on generating patches).
Junio C Hamanod2c978f2011-03-20 19:42:222803</p>
2804</dd>
2805<dt class="hdlist1">
Junio C Hamano58f587a2013-07-22 19:20:592806-s
2807</dt>
2808<dt class="hdlist1">
2809--no-patch
2810</dt>
2811<dd>
2812<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512813 Suppress diff output. Useful for commands like <code>git show</code> that
2814 show the patch by default, or to cancel the effect of <code>--patch</code>.
Junio C Hamano58f587a2013-07-22 19:20:592815</p>
2816</dd>
2817<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222818-U&lt;n&gt;
2819</dt>
2820<dt class="hdlist1">
2821--unified=&lt;n&gt;
2822</dt>
2823<dd>
2824<p>
2825 Generate diffs with &lt;n&gt; lines of context instead of
2826 the usual three.
Junio C Hamanoac12f0e2014-09-19 22:32:512827 Implies <code>-p</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222828</p>
2829</dd>
2830<dt class="hdlist1">
2831--raw
2832</dt>
2833<dd>
2834<p>
Junio C Hamano85f1fde2015-06-01 20:37:322835 For each commit, show a summary of changes using the raw diff
2836 format. See the "RAW OUTPUT FORMAT" section of
2837 <a href="git-diff.html">git-diff(1)</a>. This is different from showing the log
2838 itself in raw format, which you can achieve with
2839 <code>--format=raw</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222840</p>
2841</dd>
2842<dt class="hdlist1">
2843--patch-with-raw
2844</dt>
2845<dd>
2846<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512847 Synonym for <code>-p --raw</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222848</p>
2849</dd>
2850<dt class="hdlist1">
Junio C Hamanoad70bf02016-09-26 23:44:272851--indent-heuristic
2852</dt>
2853<dt class="hdlist1">
2854--no-indent-heuristic
2855</dt>
Junio C Hamano5f888332016-06-13 19:28:312856<dd>
2857<p>
Junio C Hamanoad70bf02016-09-26 23:44:272858 These are to help debugging and tuning experimental heuristics
2859 (which are off by default) that shift diff hunk boundaries to
2860 make patches easier to read.
Junio C Hamano5f888332016-06-13 19:28:312861</p>
2862</dd>
2863<dt class="hdlist1">
Junio C Hamano5a73f302011-10-14 05:58:342864--minimal
2865</dt>
2866<dd>
2867<p>
2868 Spend extra time to make sure the smallest possible
2869 diff is produced.
2870</p>
2871</dd>
2872<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222873--patience
2874</dt>
2875<dd>
2876<p>
2877 Generate a diff using the "patience diff" algorithm.
2878</p>
2879</dd>
2880<dt class="hdlist1">
Junio C Hamanoaea9e6b2012-03-07 00:17:112881--histogram
2882</dt>
2883<dd>
2884<p>
2885 Generate a diff using the "histogram diff" algorithm.
2886</p>
2887</dd>
2888<dt class="hdlist1">
Junio C Hamano80ad00d2013-02-18 00:19:032889--diff-algorithm={patience|minimal|histogram|myers}
2890</dt>
2891<dd>
2892<p>
2893 Choose a diff algorithm. The variants are as follows:
2894</p>
2895<div class="openblock">
2896<div class="content">
2897<div class="dlist"><dl>
2898<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512899<code>default</code>, <code>myers</code>
Junio C Hamano80ad00d2013-02-18 00:19:032900</dt>
2901<dd>
2902<p>
2903 The basic greedy diff algorithm. Currently, this is the default.
2904</p>
2905</dd>
2906<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512907<code>minimal</code>
Junio C Hamano80ad00d2013-02-18 00:19:032908</dt>
2909<dd>
2910<p>
2911 Spend extra time to make sure the smallest possible diff is
2912 produced.
2913</p>
2914</dd>
2915<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512916<code>patience</code>
Junio C Hamano80ad00d2013-02-18 00:19:032917</dt>
2918<dd>
2919<p>
2920 Use "patience diff" algorithm when generating patches.
2921</p>
2922</dd>
2923<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512924<code>histogram</code>
Junio C Hamano80ad00d2013-02-18 00:19:032925</dt>
2926<dd>
2927<p>
2928 This algorithm extends the patience algorithm to "support
2929 low-occurrence common elements".
2930</p>
2931</dd>
2932</dl></div>
2933</div></div>
2934<div class="paragraph"><p>For instance, if you configured diff.algorithm variable to a
2935non-default value and want to use the default one, then you
Junio C Hamanoac12f0e2014-09-19 22:32:512936have to use <code>--diff-algorithm=default</code> option.</p></div>
Junio C Hamano80ad00d2013-02-18 00:19:032937</dd>
2938<dt class="hdlist1">
Junio C Hamano4c4b0122011-06-30 01:19:322939--stat[=&lt;width&gt;[,&lt;name-width&gt;[,&lt;count&gt;]]]
Junio C Hamanod2c978f2011-03-20 19:42:222940</dt>
2941<dd>
2942<p>
Junio C Hamanoaea9e6b2012-03-07 00:17:112943 Generate a diffstat. By default, as much space as necessary
2944 will be used for the filename part, and the rest for the graph
2945 part. Maximum width defaults to terminal width, or 80 columns
Junio C Hamano7f2b3cb2012-06-22 22:42:392946 if not connected to a terminal, and can be overridden by
Junio C Hamanoac12f0e2014-09-19 22:32:512947 <code>&lt;width&gt;</code>. The width of the filename part can be limited by
2948 giving another width <code>&lt;name-width&gt;</code> after a comma. The width
Junio C Hamanoaea9e6b2012-03-07 00:17:112949 of the graph part can be limited by using
Junio C Hamanoac12f0e2014-09-19 22:32:512950 <code>--stat-graph-width=&lt;width&gt;</code> (affects all commands generating
2951 a stat graph) or by setting <code>diff.statGraphWidth=&lt;width&gt;</code>
2952 (does not affect <code>git format-patch</code>).
2953 By giving a third parameter <code>&lt;count&gt;</code>, you can limit the
2954 output to the first <code>&lt;count&gt;</code> lines, followed by <code>...</code> if
Junio C Hamanoaea9e6b2012-03-07 00:17:112955 there are more.
Junio C Hamanod2c978f2011-03-20 19:42:222956</p>
Junio C Hamanoac12f0e2014-09-19 22:32:512957<div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=&lt;width&gt;</code>,
2958<code>--stat-name-width=&lt;name-width&gt;</code> and <code>--stat-count=&lt;count&gt;</code>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:222959</dd>
2960<dt class="hdlist1">
2961--numstat
2962</dt>
2963<dd>
2964<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512965 Similar to <code>--stat</code>, but shows number of added and
Junio C Hamanod2c978f2011-03-20 19:42:222966 deleted lines in decimal notation and pathname without
2967 abbreviation, to make it more machine friendly. For
Junio C Hamanoac12f0e2014-09-19 22:32:512968 binary files, outputs two <code>-</code> instead of saying
2969 <code>0 0</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222970</p>
2971</dd>
2972<dt class="hdlist1">
2973--shortstat
2974</dt>
2975<dd>
2976<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512977 Output only the last line of the <code>--stat</code> format containing total
Junio C Hamanod2c978f2011-03-20 19:42:222978 number of modified files, as well as number of added and deleted
2979 lines.
2980</p>
2981</dd>
2982<dt class="hdlist1">
Junio C Hamano1c222c52011-05-13 19:55:322983--dirstat[=&lt;param1,param2,&#8230;&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:222984</dt>
2985<dd>
2986<p>
Junio C Hamano1c222c52011-05-13 19:55:322987 Output the distribution of relative amount of changes for each
Junio C Hamanoac12f0e2014-09-19 22:32:512988 sub-directory. The behavior of <code>--dirstat</code> can be customized by
Junio C Hamano1c222c52011-05-13 19:55:322989 passing it a comma separated list of parameters.
Junio C Hamanoac12f0e2014-09-19 22:32:512990 The defaults are controlled by the <code>diff.dirstat</code> configuration
Junio C Hamanoa28a9202012-06-21 07:08:232991 variable (see <a href="git-config.html">git-config(1)</a>).
Junio C Hamano1c222c52011-05-13 19:55:322992 The following parameters are available:
Junio C Hamanod2c978f2011-03-20 19:42:222993</p>
Junio C Hamano9629d4f2012-12-19 00:28:272994<div class="openblock">
2995<div class="content">
Junio C Hamano1c222c52011-05-13 19:55:322996<div class="dlist"><dl>
2997<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512998<code>changes</code>
Junio C Hamano1c222c52011-05-13 19:55:322999</dt>
3000<dd>
3001<p>
3002 Compute the dirstat numbers by counting the lines that have been
3003 removed from the source, or added to the destination. This ignores
3004 the amount of pure code movements within a file. In other words,
3005 rearranging lines in a file is not counted as much as other changes.
3006 This is the default behavior when no parameter is given.
3007</p>
Junio C Hamanod2c978f2011-03-20 19:42:223008</dd>
3009<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513010<code>lines</code>
Junio C Hamanod2c978f2011-03-20 19:42:223011</dt>
3012<dd>
3013<p>
Junio C Hamano1c222c52011-05-13 19:55:323014 Compute the dirstat numbers by doing the regular line-based diff
3015 analysis, and summing the removed/added line counts. (For binary
3016 files, count 64-byte chunks instead, since binary files have no
Junio C Hamanoac12f0e2014-09-19 22:32:513017 natural concept of lines). This is a more expensive <code>--dirstat</code>
3018 behavior than the <code>changes</code> behavior, but it does count rearranged
Junio C Hamano1c222c52011-05-13 19:55:323019 lines within a file as much as other changes. The resulting output
Junio C Hamanoac12f0e2014-09-19 22:32:513020 is consistent with what you get from the other <code>--*stat</code> options.
Junio C Hamanod2c978f2011-03-20 19:42:223021</p>
3022</dd>
3023<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513024<code>files</code>
Junio C Hamano1c222c52011-05-13 19:55:323025</dt>
3026<dd>
3027<p>
3028 Compute the dirstat numbers by counting the number of files changed.
3029 Each changed file counts equally in the dirstat analysis. This is
Junio C Hamanoac12f0e2014-09-19 22:32:513030 the computationally cheapest <code>--dirstat</code> behavior, since it does
Junio C Hamano1c222c52011-05-13 19:55:323031 not have to look at the file contents at all.
3032</p>
3033</dd>
3034<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513035<code>cumulative</code>
Junio C Hamano1c222c52011-05-13 19:55:323036</dt>
3037<dd>
3038<p>
3039 Count changes in a child directory for the parent directory as well.
Junio C Hamanoac12f0e2014-09-19 22:32:513040 Note that when using <code>cumulative</code>, the sum of the percentages
Junio C Hamano1c222c52011-05-13 19:55:323041 reported may exceed 100%. The default (non-cumulative) behavior can
Junio C Hamanoac12f0e2014-09-19 22:32:513042 be specified with the <code>noncumulative</code> parameter.
Junio C Hamano1c222c52011-05-13 19:55:323043</p>
3044</dd>
3045<dt class="hdlist1">
3046&lt;limit&gt;
3047</dt>
3048<dd>
3049<p>
3050 An integer parameter specifies a cut-off percent (3% by default).
3051 Directories contributing less than this percentage of the changes
3052 are not shown in the output.
3053</p>
3054</dd>
3055</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:273056</div></div>
Junio C Hamano1c222c52011-05-13 19:55:323057<div class="paragraph"><p>Example: The following will count changed files, while ignoring
3058directories with less than 10% of the total amount of changed files,
3059and accumulating child directory counts in the parent directories:
Junio C Hamanoac12f0e2014-09-19 22:32:513060<code>--dirstat=files,10,cumulative</code>.</p></div>
Junio C Hamano1c222c52011-05-13 19:55:323061</dd>
3062<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223063--summary
3064</dt>
3065<dd>
3066<p>
3067 Output a condensed summary of extended header information
3068 such as creations, renames and mode changes.
3069</p>
3070</dd>
3071<dt class="hdlist1">
3072--patch-with-stat
3073</dt>
3074<dd>
3075<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513076 Synonym for <code>-p --stat</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223077</p>
3078</dd>
3079<dt class="hdlist1">
3080-z
3081</dt>
3082<dd>
3083<p>
3084 Separate the commits with NULs instead of with new newlines.
3085</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513086<div class="paragraph"><p>Also, when <code>--raw</code> or <code>--numstat</code> has been given, do not munge
Junio C Hamanod2c978f2011-03-20 19:42:223087pathnames and use NULs as output field terminators.</p></div>
Junio C Hamano0f6f3bf2017-03-13 07:01:533088<div class="paragraph"><p>Without this option, pathnames with "unusual" characters are quoted as
3089explained for the configuration variable <code>core.quotePath</code> (see
3090<a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223091</dd>
3092<dt class="hdlist1">
3093--name-only
3094</dt>
3095<dd>
3096<p>
3097 Show only names of changed files.
3098</p>
3099</dd>
3100<dt class="hdlist1">
3101--name-status
3102</dt>
3103<dd>
3104<p>
3105 Show only names and status of changed files. See the description
Junio C Hamanoac12f0e2014-09-19 22:32:513106 of the <code>--diff-filter</code> option on what the status letters mean.
Junio C Hamanod2c978f2011-03-20 19:42:223107</p>
3108</dd>
3109<dt class="hdlist1">
3110--submodule[=&lt;format&gt;]
3111</dt>
3112<dd>
3113<p>
Junio C Hamanocd451662016-09-13 00:54:093114 Specify how differences in submodules are shown. When specifying
3115 <code>--submodule=short</code> the <em>short</em> format is used. This format just
3116 shows the names of the commits at the beginning and end of the range.
3117 When <code>--submodule</code> or <code>--submodule=log</code> is specified, the <em>log</em>
3118 format is used. This format lists the commits in the range like
3119 <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does. When <code>--submodule=diff</code>
3120 is specified, the <em>diff</em> format is used. This format shows an
3121 inline diff of the changes in the submodule contents between the
3122 commit range. Defaults to <code>diff.submodule</code> or the <em>short</em> format
3123 if the config option is unset.
Junio C Hamanod2c978f2011-03-20 19:42:223124</p>
3125</dd>
3126<dt class="hdlist1">
3127--color[=&lt;when&gt;]
3128</dt>
3129<dd>
3130<p>
3131 Show colored diff.
Junio C Hamanoac12f0e2014-09-19 22:32:513132 <code>--color</code> (i.e. without <em>=&lt;when&gt;</em>) is the same as <code>--color=always</code>.
3133 <em>&lt;when&gt;</em> can be one of <code>always</code>, <code>never</code>, or <code>auto</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223134</p>
3135</dd>
3136<dt class="hdlist1">
3137--no-color
3138</dt>
3139<dd>
3140<p>
Junio C Hamano5f2627d2011-05-06 20:23:483141 Turn off colored diff.
Junio C Hamanoac12f0e2014-09-19 22:32:513142 It is the same as <code>--color=never</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223143</p>
3144</dd>
3145<dt class="hdlist1">
3146--word-diff[=&lt;mode&gt;]
3147</dt>
3148<dd>
3149<p>
3150 Show a word diff, using the &lt;mode&gt; to delimit changed words.
3151 By default, words are delimited by whitespace; see
Junio C Hamanoac12f0e2014-09-19 22:32:513152 <code>--word-diff-regex</code> below. The &lt;mode&gt; defaults to <em>plain</em>, and
Junio C Hamanod2c978f2011-03-20 19:42:223153 must be one of:
3154</p>
Junio C Hamano9629d4f2012-12-19 00:28:273155<div class="openblock">
3156<div class="content">
Junio C Hamanod2c978f2011-03-20 19:42:223157<div class="dlist"><dl>
3158<dt class="hdlist1">
3159color
3160</dt>
3161<dd>
3162<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513163 Highlight changed words using only colors. Implies <code>--color</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223164</p>
3165</dd>
3166<dt class="hdlist1">
3167plain
3168</dt>
3169<dd>
3170<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513171 Show words as <code>[-removed-]</code> and <code>{+added+}</code>. Makes no
Junio C Hamanod2c978f2011-03-20 19:42:223172 attempts to escape the delimiters if they appear in the input,
3173 so the output may be ambiguous.
3174</p>
3175</dd>
3176<dt class="hdlist1">
3177porcelain
3178</dt>
3179<dd>
3180<p>
3181 Use a special line-based format intended for script
3182 consumption. Added/removed/unchanged runs are printed in the
Junio C Hamanoac12f0e2014-09-19 22:32:513183 usual unified diff format, starting with a <code>+</code>/<code>-</code>/` `
Junio C Hamanod2c978f2011-03-20 19:42:223184 character at the beginning of the line and extending to the
3185 end of the line. Newlines in the input are represented by a
Junio C Hamanoac12f0e2014-09-19 22:32:513186 tilde <code>~</code> on a line of its own.
Junio C Hamanod2c978f2011-03-20 19:42:223187</p>
3188</dd>
3189<dt class="hdlist1">
3190none
3191</dt>
3192<dd>
3193<p>
3194 Disable word diff again.
3195</p>
3196</dd>
3197</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:273198</div></div>
Junio C Hamanod2c978f2011-03-20 19:42:223199<div class="paragraph"><p>Note that despite the name of the first mode, color is used to
3200highlight the changed parts in all modes if enabled.</p></div>
3201</dd>
3202<dt class="hdlist1">
3203--word-diff-regex=&lt;regex&gt;
3204</dt>
3205<dd>
3206<p>
3207 Use &lt;regex&gt; to decide what a word is, instead of considering
3208 runs of non-whitespace to be a word. Also implies
Junio C Hamanoac12f0e2014-09-19 22:32:513209 <code>--word-diff</code> unless it was already enabled.
Junio C Hamanod2c978f2011-03-20 19:42:223210</p>
3211<div class="paragraph"><p>Every non-overlapping match of the
3212&lt;regex&gt; is considered a word. Anything between these matches is
3213considered whitespace and ignored(!) for the purposes of finding
Junio C Hamanoac12f0e2014-09-19 22:32:513214differences. You may want to append <code>|[^[:space:]]</code> to your regular
Junio C Hamanod2c978f2011-03-20 19:42:223215expression to make sure that it matches all non-whitespace characters.
3216A match that contains a newline is silently truncated(!) at the
3217newline.</p></div>
Junio C Hamano713eded2015-12-03 00:24:023218<div class="paragraph"><p>For example, <code>--word-diff-regex=.</code> will treat each character as a word
3219and, correspondingly, show differences character by character.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223220<div class="paragraph"><p>The regex can also be set via a diff driver or configuration option, see
Junio C Hamano198b1f12016-05-17 22:27:243221<a href="gitattributes.html">gitattributes(5)</a> or <a href="git-config.html">git-config(1)</a>. Giving it explicitly
Junio C Hamanod2c978f2011-03-20 19:42:223222overrides any diff driver or configuration setting. Diff drivers
3223override configuration settings.</p></div>
3224</dd>
3225<dt class="hdlist1">
3226--color-words[=&lt;regex&gt;]
3227</dt>
3228<dd>
3229<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513230 Equivalent to <code>--word-diff=color</code> plus (if a regex was
3231 specified) <code>--word-diff-regex=&lt;regex&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223232</p>
3233</dd>
3234<dt class="hdlist1">
3235--no-renames
3236</dt>
3237<dd>
3238<p>
3239 Turn off rename detection, even when the configuration
3240 file gives the default to do so.
3241</p>
3242</dd>
3243<dt class="hdlist1">
3244--check
3245</dt>
3246<dd>
3247<p>
Junio C Hamano84ea1e42016-04-08 21:53:483248 Warn if changes introduce conflict markers or whitespace errors.
3249 What are considered whitespace errors is controlled by <code>core.whitespace</code>
Junio C Hamano6005bfa2011-06-23 00:51:223250 configuration. By default, trailing whitespaces (including
3251 lines that solely consist of whitespaces) and a space character
3252 that is immediately followed by a tab character inside the
3253 initial indent of the line are considered whitespace errors.
3254 Exits with non-zero status if problems are found. Not compatible
3255 with --exit-code.
Junio C Hamanod2c978f2011-03-20 19:42:223256</p>
3257</dd>
3258<dt class="hdlist1">
Junio C Hamano8c5d5942015-06-11 19:37:483259--ws-error-highlight=&lt;kind&gt;
3260</dt>
3261<dd>
3262<p>
3263 Highlight whitespace errors on lines specified by &lt;kind&gt;
3264 in the color specified by <code>color.diff.whitespace</code>. &lt;kind&gt;
3265 is a comma separated list of <code>old</code>, <code>new</code>, <code>context</code>. When
3266 this option is not given, only whitespace errors in <code>new</code>
3267 lines are highlighted. E.g. <code>--ws-error-highlight=new,old</code>
3268 highlights whitespace errors on both deleted and added lines.
3269 <code>all</code> can be used as a short-hand for <code>old,new,context</code>.
Junio C Hamano4a401d52016-10-26 22:24:373270 The <code>diff.wsErrorHighlight</code> configuration variable can be
3271 used to specify the default behaviour.
Junio C Hamano8c5d5942015-06-11 19:37:483272</p>
3273</dd>
3274<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223275--full-index
3276</dt>
3277<dd>
3278<p>
3279 Instead of the first handful of characters, show the full
3280 pre- and post-image blob object names on the "index"
3281 line when generating patch format output.
3282</p>
3283</dd>
3284<dt class="hdlist1">
3285--binary
3286</dt>
3287<dd>
3288<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513289 In addition to <code>--full-index</code>, output a binary diff that
3290 can be applied with <code>git-apply</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223291</p>
3292</dd>
3293<dt class="hdlist1">
3294--abbrev[=&lt;n&gt;]
3295</dt>
3296<dd>
3297<p>
3298 Instead of showing the full 40-byte hexadecimal object
3299 name in diff-raw format output and diff-tree header
3300 lines, show only a partial prefix. This is
Junio C Hamanoac12f0e2014-09-19 22:32:513301 independent of the <code>--full-index</code> option above, which controls
Junio C Hamanod2c978f2011-03-20 19:42:223302 the diff-patch output format. Non default number of
Junio C Hamanoac12f0e2014-09-19 22:32:513303 digits can be specified with <code>--abbrev=&lt;n&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223304</p>
3305</dd>
3306<dt class="hdlist1">
3307-B[&lt;n&gt;][/&lt;m&gt;]
3308</dt>
3309<dt class="hdlist1">
3310--break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]
3311</dt>
3312<dd>
3313<p>
3314 Break complete rewrite changes into pairs of delete and
3315 create. This serves two purposes:
3316</p>
3317<div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file
3318not as a series of deletion and insertion mixed together with a very
3319few lines that happen to match textually as the context, but as a
3320single deletion of everything old followed by a single insertion of
Junio C Hamanoac12f0e2014-09-19 22:32:513321everything new, and the number <code>m</code> controls this aspect of the -B
3322option (defaults to 60%). <code>-B/70%</code> specifies that less than 30% of the
Junio C Hamano076ffcc2013-02-06 05:13:213323original should remain in the result for Git to consider it a total
Junio C Hamanod2c978f2011-03-20 19:42:223324rewrite (i.e. otherwise the resulting patch will be a series of
3325deletion and insertion mixed together with context lines).</p></div>
3326<div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
3327source of a rename (usually -M only considers a file that disappeared
Junio C Hamanoac12f0e2014-09-19 22:32:513328as the source of a rename), and the number <code>n</code> controls this aspect of
3329the -B option (defaults to 50%). <code>-B20%</code> specifies that a change with
Junio C Hamanod2c978f2011-03-20 19:42:223330addition and deletion compared to 20% or more of the file&#8217;s size are
3331eligible for being picked up as a possible source of a rename to
3332another file.</p></div>
3333</dd>
3334<dt class="hdlist1">
3335-M[&lt;n&gt;]
3336</dt>
3337<dt class="hdlist1">
3338--find-renames[=&lt;n&gt;]
3339</dt>
3340<dd>
3341<p>
3342 If generating diffs, detect and report renames for each commit.
3343 For following files across renames while traversing history, see
Junio C Hamanoac12f0e2014-09-19 22:32:513344 <code>--follow</code>.
3345 If <code>n</code> is specified, it is a threshold on the similarity
Junio C Hamanod2c978f2011-03-20 19:42:223346 index (i.e. amount of addition/deletions compared to the
Junio C Hamanoac12f0e2014-09-19 22:32:513347 file&#8217;s size). For example, <code>-M90%</code> means Git should consider a
Junio C Hamanod2c978f2011-03-20 19:42:223348 delete/add pair to be a rename if more than 90% of the file
Junio C Hamanoac12f0e2014-09-19 22:32:513349 hasn&#8217;t changed. Without a <code>%</code> sign, the number is to be read as
3350 a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes
3351 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is
3352 the same as <code>-M5%</code>. To limit detection to exact renames, use
3353 <code>-M100%</code>. The default similarity index is 50%.
Junio C Hamanod2c978f2011-03-20 19:42:223354</p>
3355</dd>
3356<dt class="hdlist1">
3357-C[&lt;n&gt;]
3358</dt>
3359<dt class="hdlist1">
3360--find-copies[=&lt;n&gt;]
3361</dt>
3362<dd>
3363<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513364 Detect copies as well as renames. See also <code>--find-copies-harder</code>.
3365 If <code>n</code> is specified, it has the same meaning as for <code>-M&lt;n&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223366</p>
3367</dd>
3368<dt class="hdlist1">
3369--find-copies-harder
3370</dt>
3371<dd>
3372<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513373 For performance reasons, by default, <code>-C</code> option finds copies only
Junio C Hamanod2c978f2011-03-20 19:42:223374 if the original file of the copy was modified in the same
3375 changeset. This flag makes the command
3376 inspect unmodified files as candidates for the source of
3377 copy. This is a very expensive operation for large
3378 projects, so use it with caution. Giving more than one
Junio C Hamanoac12f0e2014-09-19 22:32:513379 <code>-C</code> option has the same effect.
Junio C Hamanod2c978f2011-03-20 19:42:223380</p>
3381</dd>
3382<dt class="hdlist1">
Junio C Hamanob02377c2011-04-28 22:26:023383-D
3384</dt>
3385<dt class="hdlist1">
3386--irreversible-delete
3387</dt>
3388<dd>
3389<p>
3390 Omit the preimage for deletes, i.e. print only the header but not
Junio C Hamanoac12f0e2014-09-19 22:32:513391 the diff between the preimage and <code>/dev/null</code>. The resulting patch
3392 is not meant to be applied with <code>patch</code> or <code>git apply</code>; this is
Junio C Hamanob02377c2011-04-28 22:26:023393 solely for people who want to just concentrate on reviewing the
3394 text after the change. In addition, the output obviously lack
3395 enough information to apply such a patch in reverse, even manually,
3396 hence the name of the option.
3397</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513398<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:023399of a delete/create pair.</p></div>
3400</dd>
3401<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223402-l&lt;num&gt;
3403</dt>
3404<dd>
3405<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513406 The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n
Junio C Hamanod2c978f2011-03-20 19:42:223407 is the number of potential rename/copy targets. This
3408 option prevents rename/copy detection from running if
3409 the number of rename/copy targets exceeds the specified
3410 number.
3411</p>
3412</dd>
3413<dt class="hdlist1">
3414--diff-filter=[(A|C|D|M|R|T|U|X|B)&#8230;[*]]
3415</dt>
3416<dd>
3417<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513418 Select only files that are Added (<code>A</code>), Copied (<code>C</code>),
3419 Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their
3420 type (i.e. regular file, symlink, submodule, &#8230;) changed (<code>T</code>),
3421 are Unmerged (<code>U</code>), are
3422 Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>).
Junio C Hamanod2c978f2011-03-20 19:42:223423 Any combination of the filter characters (including none) can be used.
Junio C Hamanoac12f0e2014-09-19 22:32:513424 When <code>*</code> (All-or-none) is added to the combination, all
Junio C Hamanod2c978f2011-03-20 19:42:223425 paths are selected if there is any file that matches
3426 other criteria in the comparison; if there is no file
3427 that matches other criteria, nothing is selected.
3428</p>
Junio C Hamanoeed15af2016-07-25 22:49:423429<div class="paragraph"><p>Also, these upper-case letters can be downcased to exclude. E.g.
3430<code>--diff-filter=ad</code> excludes added and deleted paths.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223431</dd>
3432<dt class="hdlist1">
3433-S&lt;string&gt;
3434</dt>
3435<dd>
3436<p>
Junio C Hamanof1f5a7b2013-06-11 22:23:523437 Look for differences that change the number of occurrences of
3438 the specified string (i.e. addition/deletion) in a file.
3439 Intended for the scripter&#8217;s use.
Junio C Hamanod2c978f2011-03-20 19:42:223440</p>
Junio C Hamanof1f5a7b2013-06-11 22:23:523441<div class="paragraph"><p>It is useful when you&#8217;re looking for an exact block of code (like a
3442struct), and want to know the history of that block since it first
3443came into being: use the feature iteratively to feed the interesting
Junio C Hamanoac12f0e2014-09-19 22:32:513444block in the preimage back into <code>-S</code>, and keep going until you get the
Junio C Hamanof1f5a7b2013-06-11 22:23:523445very first version of the block.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223446</dd>
3447<dt class="hdlist1">
3448-G&lt;regex&gt;
3449</dt>
3450<dd>
3451<p>
Junio C Hamanof1f5a7b2013-06-11 22:23:523452 Look for differences whose patch text contains added/removed
3453 lines that match &lt;regex&gt;.
Junio C Hamanod2c978f2011-03-20 19:42:223454</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513455<div class="paragraph"><p>To illustrate the difference between <code>-S&lt;regex&gt; --pickaxe-regex</code> and
3456<code>-G&lt;regex&gt;</code>, consider a commit with the following diff in the same
Junio C Hamanof1f5a7b2013-06-11 22:23:523457file:</p></div>
3458<div class="listingblock">
3459<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513460<pre><code>+ return !regexec(regexp, two-&gt;ptr, 1, &amp;regmatch, 0);
Junio C Hamanof1f5a7b2013-06-11 22:23:523461...
Junio C Hamanoac12f0e2014-09-19 22:32:513462- hit = !regexec(regexp, mf2.ptr, 1, &amp;regmatch, 0);</code></pre>
Junio C Hamanof1f5a7b2013-06-11 22:23:523463</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513464<div class="paragraph"><p>While <code>git log -G"regexec\(regexp"</code> will show this commit, <code>git log
3465-S"regexec\(regexp" --pickaxe-regex</code> will not (because the number of
Junio C Hamanof1f5a7b2013-06-11 22:23:523466occurrences of that string did not change).</p></div>
3467<div class="paragraph"><p>See the <em>pickaxe</em> entry in <a href="gitdiffcore.html">gitdiffcore(7)</a> for more
3468information.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223469</dd>
3470<dt class="hdlist1">
3471--pickaxe-all
3472</dt>
3473<dd>
3474<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513475 When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that
Junio C Hamanod2c978f2011-03-20 19:42:223476 changeset, not just the files that contain the change
3477 in &lt;string&gt;.
3478</p>
3479</dd>
3480<dt class="hdlist1">
3481--pickaxe-regex
3482</dt>
3483<dd>
3484<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513485 Treat the &lt;string&gt; given to <code>-S</code> as an extended POSIX regular
Junio C Hamanof1f5a7b2013-06-11 22:23:523486 expression to match.
Junio C Hamanod2c978f2011-03-20 19:42:223487</p>
3488</dd>
3489<dt class="hdlist1">
3490-O&lt;orderfile&gt;
3491</dt>
3492<dd>
3493<p>
Junio C Hamanobcd98f42017-01-24 00:12:163494 Control the order in which files appear in the output.
Junio C Hamano322c6242015-03-23 21:32:463495 This overrides the <code>diff.orderFile</code> configuration variable
3496 (see <a href="git-config.html">git-config(1)</a>). To cancel <code>diff.orderFile</code>,
Junio C Hamanoac12f0e2014-09-19 22:32:513497 use <code>-O/dev/null</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223498</p>
Junio C Hamanobcd98f42017-01-24 00:12:163499<div class="paragraph"><p>The output order is determined by the order of glob patterns in
3500&lt;orderfile&gt;.
3501All files with pathnames that match the first pattern are output
3502first, all files with pathnames that match the second pattern (but not
3503the first) are output next, and so on.
3504All files with pathnames that do not match any pattern are output
3505last, as if there was an implicit match-all pattern at the end of the
3506file.
3507If multiple pathnames have the same rank (they match the same pattern
3508but no earlier patterns), their output order relative to each other is
3509the normal order.</p></div>
3510<div class="paragraph"><p>&lt;orderfile&gt; is parsed as follows:</p></div>
3511<div class="openblock">
3512<div class="content">
3513<div class="ulist"><ul>
3514<li>
3515<p>
3516Blank lines are ignored, so they can be used as separators for
3517 readability.
3518</p>
3519</li>
3520<li>
3521<p>
3522Lines starting with a hash ("<code>#</code>") are ignored, so they can be used
3523 for comments. Add a backslash ("<code>\</code>") to the beginning of the
3524 pattern if it starts with a hash.
3525</p>
3526</li>
3527<li>
3528<p>
3529Each other line contains a single pattern.
3530</p>
3531</li>
3532</ul></div>
3533</div></div>
3534<div class="paragraph"><p>Patterns have the same syntax and semantics as patterns used for
3535fnmantch(3) without the FNM_PATHNAME flag, except a pathname also
3536matches a pattern if removing any number of the final pathname
3537components matches the pattern. For example, the pattern "<code>foo*bar</code>"
3538matches "<code>fooasdfbar</code>" and "<code>foo/bar/baz/asdf</code>" but not "<code>foobarx</code>".</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223539</dd>
3540<dt class="hdlist1">
3541-R
3542</dt>
3543<dd>
3544<p>
3545 Swap two inputs; that is, show differences from index or
3546 on-disk file to tree contents.
3547</p>
3548</dd>
3549<dt class="hdlist1">
3550--relative[=&lt;path&gt;]
3551</dt>
3552<dd>
3553<p>
3554 When run from a subdirectory of the project, it can be
3555 told to exclude changes outside the directory and show
3556 pathnames relative to it with this option. When you are
3557 not in a subdirectory (e.g. in a bare repository), you
3558 can name which subdirectory to make the output relative
3559 to by giving a &lt;path&gt; as an argument.
3560</p>
3561</dd>
3562<dt class="hdlist1">
3563-a
3564</dt>
3565<dt class="hdlist1">
3566--text
3567</dt>
3568<dd>
3569<p>
3570 Treat all files as text.
3571</p>
3572</dd>
3573<dt class="hdlist1">
3574--ignore-space-at-eol
3575</dt>
3576<dd>
3577<p>
3578 Ignore changes in whitespace at EOL.
3579</p>
3580</dd>
3581<dt class="hdlist1">
3582-b
3583</dt>
3584<dt class="hdlist1">
3585--ignore-space-change
3586</dt>
3587<dd>
3588<p>
3589 Ignore changes in amount of whitespace. This ignores whitespace
3590 at line end, and considers all other sequences of one or
3591 more whitespace characters to be equivalent.
3592</p>
3593</dd>
3594<dt class="hdlist1">
3595-w
3596</dt>
3597<dt class="hdlist1">
3598--ignore-all-space
3599</dt>
3600<dd>
3601<p>
3602 Ignore whitespace when comparing lines. This ignores
3603 differences even if one line has whitespace where the other
3604 line has none.
3605</p>
3606</dd>
3607<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:183608--ignore-blank-lines
3609</dt>
3610<dd>
3611<p>
3612 Ignore changes whose lines are all blank.
3613</p>
3614</dd>
3615<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223616--inter-hunk-context=&lt;lines&gt;
3617</dt>
3618<dd>
3619<p>
3620 Show the context between diff hunks, up to the specified number
3621 of lines, thereby fusing hunks that are close to each other.
Junio C Hamanobcd98f42017-01-24 00:12:163622 Defaults to <code>diff.interHunkContext</code> or 0 if the config option
3623 is unset.
Junio C Hamanod2c978f2011-03-20 19:42:223624</p>
3625</dd>
3626<dt class="hdlist1">
Junio C Hamano11821ed2011-10-19 18:42:093627-W
3628</dt>
3629<dt class="hdlist1">
3630--function-context
3631</dt>
3632<dd>
3633<p>
3634 Show whole surrounding functions of changes.
3635</p>
3636</dd>
3637<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223638--ext-diff
3639</dt>
3640<dd>
3641<p>
3642 Allow an external diff helper to be executed. If you set an
Junio C Hamanoa28a9202012-06-21 07:08:233643 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
3644 to use this option with <a href="git-log.html">git-log(1)</a> and friends.
Junio C Hamanod2c978f2011-03-20 19:42:223645</p>
3646</dd>
3647<dt class="hdlist1">
3648--no-ext-diff
3649</dt>
3650<dd>
3651<p>
3652 Disallow external diff drivers.
3653</p>
3654</dd>
3655<dt class="hdlist1">
Junio C Hamanoc652aed2011-07-07 01:14:313656--textconv
3657</dt>
3658<dt class="hdlist1">
3659--no-textconv
3660</dt>
3661<dd>
3662<p>
3663 Allow (or disallow) external text conversion filters to be run
Junio C Hamanoa28a9202012-06-21 07:08:233664 when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for
Junio C Hamanoc652aed2011-07-07 01:14:313665 details. Because textconv filters are typically a one-way
3666 conversion, the resulting diff is suitable for human
3667 consumption, but cannot be applied. For this reason, textconv
Junio C Hamanoa28a9202012-06-21 07:08:233668 filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and
3669 <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:313670 diff plumbing commands.
3671</p>
3672</dd>
3673<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223674--ignore-submodules[=&lt;when&gt;]
3675</dt>
3676<dd>
3677<p>
3678 Ignore changes to submodules in the diff generation. &lt;when&gt; can be
Junio C Hamanoc7102962013-05-29 23:57:173679 either "none", "untracked", "dirty" or "all", which is the default.
Junio C Hamanod2c978f2011-03-20 19:42:223680 Using "none" will consider the submodule modified when it either contains
3681 untracked or modified files or its HEAD differs from the commit recorded
3682 in the superproject and can be used to override any settings of the
Junio C Hamanoa28a9202012-06-21 07:08:233683 <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 Hamanod2c978f2011-03-20 19:42:223684 "untracked" is used submodules are not considered dirty when they only
3685 contain untracked content (but they are still scanned for modified
3686 content). Using "dirty" ignores all changes to the work tree of submodules,
3687 only changes to the commits stored in the superproject are shown (this was
3688 the behavior until 1.7.0). Using "all" hides all changes to submodules.
3689</p>
3690</dd>
3691<dt class="hdlist1">
3692--src-prefix=&lt;prefix&gt;
3693</dt>
3694<dd>
3695<p>
3696 Show the given source prefix instead of "a/".
3697</p>
3698</dd>
3699<dt class="hdlist1">
3700--dst-prefix=&lt;prefix&gt;
3701</dt>
3702<dd>
3703<p>
3704 Show the given destination prefix instead of "b/".
3705</p>
3706</dd>
3707<dt class="hdlist1">
3708--no-prefix
3709</dt>
3710<dd>
3711<p>
3712 Do not show any source or destination prefix.
3713</p>
3714</dd>
Junio C Hamanocd451662016-09-13 00:54:093715<dt class="hdlist1">
3716--line-prefix=&lt;prefix&gt;
3717</dt>
3718<dd>
3719<p>
3720 Prepend an additional prefix to every line of output.
3721</p>
3722</dd>
Junio C Hamanof7017f12016-10-27 23:31:343723<dt class="hdlist1">
3724--ita-invisible-in-index
3725</dt>
3726<dd>
3727<p>
3728 By default entries added by "git add -N" appear as an existing
3729 empty file in "git diff" and a new file in "git diff --cached".
3730 This option makes the entry appear as a new file in "git diff"
3731 and non-existent in "git diff --cached". This option could be
3732 reverted with <code>--ita-visible-in-index</code>. Both options are
3733 experimental and could be removed in future.
3734</p>
3735</dd>
Junio C Hamanod2c978f2011-03-20 19:42:223736</dl></div>
3737<div class="paragraph"><p>For more detailed explanation on these common options, see also
Junio C Hamanoa28a9202012-06-21 07:08:233738<a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223739</div>
Junio C Hamano9629d4f2012-12-19 00:28:273740</div>
3741<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:313742<h2 id="_generating_patches_with_p">Generating patches with -p</h2>
Junio C Hamano00b8b632007-12-07 09:50:493743<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:593744<div class="paragraph"><p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
Junio C Hamano92d80372016-07-13 22:00:053745with a <code>-p</code> option, "git diff" without the <code>--raw</code> option, or
Junio C Hamano00b8b632007-12-07 09:50:493746"git log" with the "-p" option, they
3747do not produce the output described above; instead they produce a
3748patch file. You can customize the creation of such patches via the
Junio C Hamano042f2142016-06-27 18:05:053749<code>GIT_EXTERNAL_DIFF</code> and the <code>GIT_DIFF_OPTS</code> environment variables.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593750<div class="paragraph"><p>What the -p option produces is slightly different from the traditional
Junio C Hamano7f9fa862010-10-19 23:51:143751diff format:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593752<div class="olist arabic"><ol class="arabic">
Junio C Hamano00b8b632007-12-07 09:50:493753<li>
3754<p>
Junio C Hamano7f9fa862010-10-19 23:51:143755It is preceded with a "git diff" header that looks like this:
Junio C Hamano00b8b632007-12-07 09:50:493756</p>
3757<div class="literalblock">
3758<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513759<pre><code>diff --git a/file1 b/file2</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493760</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513761<div class="paragraph"><p>The <code>a/</code> and <code>b/</code> filenames are the same unless rename/copy is
Junio C Hamano00b8b632007-12-07 09:50:493762involved. Especially, even for a creation or a deletion,
Junio C Hamanoac12f0e2014-09-19 22:32:513763<code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p></div>
3764<div class="paragraph"><p>When rename/copy is involved, <code>file1</code> and <code>file2</code> show the
Junio C Hamano00b8b632007-12-07 09:50:493765name of the source file of the rename/copy and the name of
Junio C Hamanoba4b9282008-07-06 05:20:313766the file that rename/copy produces, respectively.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493767</li>
3768<li>
3769<p>
3770It is followed by one or more extended header lines:
3771</p>
3772<div class="literalblock">
3773<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513774<pre><code>old mode &lt;mode&gt;
Junio C Hamano00b8b632007-12-07 09:50:493775new mode &lt;mode&gt;
3776deleted file mode &lt;mode&gt;
3777new file mode &lt;mode&gt;
3778copy from &lt;path&gt;
3779copy to &lt;path&gt;
3780rename from &lt;path&gt;
3781rename to &lt;path&gt;
3782similarity index &lt;number&gt;
3783dissimilarity index &lt;number&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:513784index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493785</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:593786<div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type
Junio C Hamano7f9fa862010-10-19 23:51:143787and file permission bits.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513788<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:593789<div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and
Junio C Hamano7f9fa862010-10-19 23:51:143790the dissimilarity index is the percentage of changed lines. It
3791is a rounded down integer, followed by a percent sign. The
3792similarity index value of 100% is thus reserved for two equal
3793files, while 100% dissimilarity means that no line from the old
3794file made it into the new one.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593795<div class="paragraph"><p>The index line includes the SHA-1 checksum before and after the change.
Junio C Hamano7f9fa862010-10-19 23:51:143796The &lt;mode&gt; is included if the file mode does not change; otherwise,
3797separate lines indicate the old and the new mode.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493798</li>
3799<li>
3800<p>
Junio C Hamano0f6f3bf2017-03-13 07:01:533801Pathnames with "unusual" characters are quoted as explained for
3802 the configuration variable <code>core.quotePath</code> (see
3803 <a href="git-config.html">git-config(1)</a>).
Junio C Hamano00b8b632007-12-07 09:50:493804</p>
3805</li>
Junio C Hamano7f9fa862010-10-19 23:51:143806<li>
3807<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513808All the <code>file1</code> files in the output refer to files before the
3809 commit, and all the <code>file2</code> files refer to files after the commit.
Junio C Hamano7f9fa862010-10-19 23:51:143810 It is incorrect to apply each change to each file sequentially. For
3811 example, this patch will swap a and b:
3812</p>
3813<div class="literalblock">
3814<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513815<pre><code>diff --git a/a b/b
Junio C Hamano7f9fa862010-10-19 23:51:143816rename from a
3817rename to b
3818diff --git a/b b/a
3819rename from b
Junio C Hamanoac12f0e2014-09-19 22:32:513820rename to a</code></pre>
Junio C Hamano7f9fa862010-10-19 23:51:143821</div></div>
3822</li>
Junio C Hamanoba4b9282008-07-06 05:20:313823</ol></div>
Junio C Hamano00b8b632007-12-07 09:50:493824</div>
Junio C Hamano9629d4f2012-12-19 00:28:273825</div>
3826<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:313827<h2 id="_combined_diff_format">combined diff format</h2>
Junio C Hamano00b8b632007-12-07 09:50:493828<div class="sectionbody">
Junio C Hamano1dbca522015-05-22 20:48:553829<div class="paragraph"><p>Any diff-generating command can take the <code>-c</code> or <code>--cc</code> option to
Junio C Hamanoc5be4cc2011-03-09 07:20:433830produce a <em>combined diff</em> when showing a merge. This is the default
Junio C Hamanoa28a9202012-06-21 07:08:233831format when showing merges with <a href="git-diff.html">git-diff(1)</a> or
Junio C Hamano1dbca522015-05-22 20:48:553832<a href="git-show.html">git-show(1)</a>. Note also that you can give the <code>-m</code> option to any
Junio C Hamanoc5be4cc2011-03-09 07:20:433833of these commands to force generation of diffs with individual parents
3834of a merge.</p></div>
3835<div class="paragraph"><p>A <em>combined diff</em> format looks like this:</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493836<div class="listingblock">
3837<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513838<pre><code>diff --combined describe.c
Junio C Hamano00b8b632007-12-07 09:50:493839index fabadb8,cc95eb0..4866510
3840--- a/describe.c
3841+++ b/describe.c
3842@@@ -98,20 -98,12 +98,20 @@@
3843 return (a_date &gt; b_date) ? -1 : (a_date == b_date) ? 0 : 1;
3844 }
3845
3846- static void describe(char *arg)
3847 -static void describe(struct commit *cmit, int last_one)
3848++static void describe(char *arg, int last_one)
3849 {
3850 + unsigned char sha1[20];
3851 + struct commit *cmit;
3852 struct commit_list *list;
3853 static int initialized = 0;
3854 struct commit_name *n;
3855
3856 + if (get_sha1(arg, sha1) &lt; 0)
3857 + usage(describe_usage);
3858 + cmit = lookup_commit_reference(sha1);
3859 + if (!cmit)
3860 + usage(describe_usage);
3861 +
3862 if (!initialized) {
3863 initialized = 1;
Junio C Hamanoac12f0e2014-09-19 22:32:513864 for_each_ref(get_name);</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493865</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:593866<div class="olist arabic"><ol class="arabic">
Junio C Hamano00b8b632007-12-07 09:50:493867<li>
3868<p>
3869It is preceded with a "git diff" header, that looks like
Junio C Hamano92d80372016-07-13 22:00:053870 this (when <code>-c</code> option is used):
Junio C Hamano00b8b632007-12-07 09:50:493871</p>
3872<div class="literalblock">
3873<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513874<pre><code>diff --combined file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493875</div></div>
Junio C Hamano92d80372016-07-13 22:00:053876<div class="paragraph"><p>or like this (when <code>--cc</code> option is used):</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493877<div class="literalblock">
3878<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513879<pre><code>diff --cc file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493880</div></div>
3881</li>
3882<li>
3883<p>
3884It is followed by one or more extended header lines
3885 (this example shows a merge with two parents):
3886</p>
3887<div class="literalblock">
3888<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513889<pre><code>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
Junio C Hamano00b8b632007-12-07 09:50:493890mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;
3891new file mode &lt;mode&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:513892deleted file mode &lt;mode&gt;,&lt;mode&gt;</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493893</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513894<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 Hamano00b8b632007-12-07 09:50:493895the &lt;mode&gt; is different from the rest. Extended headers with
3896information about detected contents movement (renames and
3897copying detection) are designed to work with diff of two
Junio C Hamanoba4b9282008-07-06 05:20:313898&lt;tree-ish&gt; and are not used by combined diff format.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493899</li>
3900<li>
3901<p>
3902It is followed by two-line from-file/to-file header
3903</p>
3904<div class="literalblock">
3905<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513906<pre><code>--- a/file
3907+++ b/file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493908</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:593909<div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff
Junio C Hamanoac12f0e2014-09-19 22:32:513910format, <code>/dev/null</code> is used to signal created or deleted
Junio C Hamanoba4b9282008-07-06 05:20:313911files.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493912</li>
3913<li>
3914<p>
3915Chunk header format is modified to prevent people from
Junio C Hamanoac12f0e2014-09-19 22:32:513916 accidentally feeding it to <code>patch -p1</code>. Combined diff format
Junio C Hamano00b8b632007-12-07 09:50:493917 was created for review of merge commit changes, and was not
3918 meant for apply. The change is similar to the change in the
3919 extended <em>index</em> header:
3920</p>
3921<div class="literalblock">
3922<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513923<pre><code>@@@ &lt;from-file-range&gt; &lt;from-file-range&gt; &lt;to-file-range&gt; @@@</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493924</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513925<div class="paragraph"><p>There are (number of parents + 1) <code>@</code> characters in the chunk
Junio C Hamanoba4b9282008-07-06 05:20:313926header for combined diff format.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493927</li>
Junio C Hamanoba4b9282008-07-06 05:20:313928</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:593929<div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two
Junio C Hamanoac12f0e2014-09-19 22:32:513930files 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
3931added to B), or <code>" "</code> (space&#8201;&#8212;&#8201;unchanged) prefix, this format
Junio C Hamano00b8b632007-12-07 09:50:493932compares two or more files file1, file2,&#8230; with one file X, and
3933shows how X differs from each of fileN. One column for each of
Junio C Hamano68cf15a2010-11-06 01:01:593934fileN is prepended to the output line to note how X&#8217;s line is
Junio C Hamanoba4b9282008-07-06 05:20:313935different from it.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513936<div class="paragraph"><p>A <code>-</code> character in the column N means that the line appears in
3937fileN but it does not appear in the result. A <code>+</code> character
Junio C Hamano54bf1e22008-12-20 06:30:113938in the column N means that the line appears in the result,
Junio C Hamano00b8b632007-12-07 09:50:493939and fileN does not have that line (in other words, the line was
Junio C Hamanoba4b9282008-07-06 05:20:313940added, from the point of view of that parent).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593941<div class="paragraph"><p>In the above example output, the function signature was changed
Junio C Hamanoac12f0e2014-09-19 22:32:513942from both files (hence two <code>-</code> removals from both file1 and
3943file2, plus <code>++</code> to mean one line that was added does not appear
Junio C Hamanod75148a2014-04-08 19:48:383944in either file1 or file2). Also eight other lines are the same
Junio C Hamanoac12f0e2014-09-19 22:32:513945from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p></div>
3946<div class="paragraph"><p>When shown by <code>git diff-tree -c</code>, it compares the parents of a
Junio C Hamano00b8b632007-12-07 09:50:493947merge commit with the merge result (i.e. file1..fileN are the
Junio C Hamanoac12f0e2014-09-19 22:32:513948parents). When shown by <code>git diff-files -c</code>, it compares the
Junio C Hamano00b8b632007-12-07 09:50:493949two unresolved merge parents with the working tree file
3950(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
Junio C Hamanoba4b9282008-07-06 05:20:313951"their version").</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493952</div>
Junio C Hamano9629d4f2012-12-19 00:28:273953</div>
3954<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:593955<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:233956<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:593957<div class="dlist"><dl>
3958<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513959<code>git log --no-merges</code>
Junio C Hamano1a4e8412005-12-27 08:17:233960</dt>
3961<dd>
3962<p>
3963 Show the whole commit history, but skip any merges
3964</p>
3965</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593966<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513967<code>git log v2.6.12.. include/scsi drivers/scsi</code>
Junio C Hamano1a4e8412005-12-27 08:17:233968</dt>
3969<dd>
3970<p>
3971 Show all commits since version <em>v2.6.12</em> that changed any file
Junio C Hamanoac12f0e2014-09-19 22:32:513972 in the <code>include/scsi</code> or <code>drivers/scsi</code> subdirectories
Junio C Hamano1a4e8412005-12-27 08:17:233973</p>
3974</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593975<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513976<code>git log --since="2 weeks ago" -- gitk</code>
Junio C Hamano1a4e8412005-12-27 08:17:233977</dt>
3978<dd>
3979<p>
3980 Show the changes during the last two weeks to the file <em>gitk</em>.
Junio C Hamanob73af6c2013-12-03 22:07:113981 The &#8220;--&#8221; is necessary to avoid confusion with the <strong>branch</strong> named
Junio C Hamano1a4e8412005-12-27 08:17:233982 <em>gitk</em>
3983</p>
3984</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593985<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513986<code>git log --name-status release..test</code>
Junio C Hamanoba7c8d82006-04-15 06:17:423987</dt>
3988<dd>
3989<p>
3990 Show the commits that are in the "test" branch but not yet
3991 in the "release" branch, along with the list of paths
3992 each commit modifies.
3993</p>
3994</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593995<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513996<code>git log --follow builtin/rev-list.c</code>
Junio C Hamano235d53f2007-07-13 00:25:153997</dt>
3998<dd>
3999<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514000 Shows the commits that changed <code>builtin/rev-list.c</code>, including
Junio C Hamano235d53f2007-07-13 00:25:154001 those commits that occurred before the file was given its
4002 present name.
4003</p>
4004</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594005<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514006<code>git log --branches --not --remotes=origin</code>
Junio C Hamano57827fb2010-01-23 03:02:504007</dt>
4008<dd>
4009<p>
4010 Shows all commits that are in any of local branches but not in
Junio C Hamano97bcb482010-11-25 03:16:074011 any of remote-tracking branches for <em>origin</em> (what you have that
Junio C Hamano68cf15a2010-11-06 01:01:594012 origin doesn&#8217;t).
Junio C Hamano57827fb2010-01-23 03:02:504013</p>
4014</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594015<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514016<code>git log master --not --remotes=*/master</code>
Junio C Hamano57827fb2010-01-23 03:02:504017</dt>
4018<dd>
4019<p>
4020 Shows all commits that are in local master but not in any remote
4021 repository master branches.
4022</p>
4023</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594024<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514025<code>git log -p -m --first-parent</code>
Junio C Hamano31667362010-03-25 00:38:534026</dt>
4027<dd>
4028<p>
4029 Shows the history including change diffs, but only from the
Junio C Hamanob73af6c2013-12-03 22:07:114030 &#8220;main branch&#8221; perspective, skipping commits that come from merged
Junio C Hamano31667362010-03-25 00:38:534031 branches, and showing full diffs of changes introduced by the merges.
4032 This makes sense only when following a strict policy of merging all
4033 topic branches when staying on a single integration branch.
4034</p>
4035</dd>
Junio C Hamano693e7092012-09-12 22:56:534036<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514037<code>git log -L '/int main/',/^}/:main.c</code>
Junio C Hamano7e590a12013-06-02 23:46:524038</dt>
4039<dd>
4040<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514041 Shows how the function <code>main()</code> in the file <code>main.c</code> evolved
Junio C Hamano7e590a12013-06-02 23:46:524042 over time.
4043</p>
4044</dd>
4045<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514046<code>git log -3</code>
Junio C Hamano693e7092012-09-12 22:56:534047</dt>
4048<dd>
4049<p>
4050 Limits the number of commits to show to 3.
4051</p>
4052</dd>
Junio C Hamanoba4b9282008-07-06 05:20:314053</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:234054</div>
Junio C Hamano9629d4f2012-12-19 00:28:274055</div>
4056<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594057<h2 id="_discussion">DISCUSSION</h2>
Junio C Hamano775a0f42006-12-31 01:19:144058<div class="sectionbody">
Junio C Hamanod7ed4042015-08-03 19:43:004059<div class="paragraph"><p>Git is to some extent character encoding agnostic.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594060<div class="ulist"><ul>
Junio C Hamano775a0f42006-12-31 01:19:144061<li>
4062<p>
Junio C Hamano54bf1e22008-12-20 06:30:114063The contents of the blob objects are uninterpreted sequences
Junio C Hamano775a0f42006-12-31 01:19:144064 of bytes. There is no encoding translation at the core
4065 level.
4066</p>
4067</li>
4068<li>
4069<p>
Junio C Hamanod7ed4042015-08-03 19:43:004070Path names are encoded in UTF-8 normalization form C. This
4071 applies to tree objects, the index file, ref names, as well as
4072 path names in command line arguments, environment variables
4073 and config files (<code>.git/config</code> (see <a href="git-config.html">git-config(1)</a>),
4074 <a href="gitignore.html">gitignore(5)</a>, <a href="gitattributes.html">gitattributes(5)</a> and
4075 <a href="gitmodules.html">gitmodules(5)</a>).
4076</p>
4077<div class="paragraph"><p>Note that Git at the core level treats path names simply as
4078sequences of non-NUL bytes, there are no path name encoding
4079conversions (except on Mac and Windows). Therefore, using
4080non-ASCII path names will mostly work even on platforms and file
4081systems that use legacy extended ASCII encodings. However,
4082repositories created on such systems will not work properly on
4083UTF-8-based systems (e.g. Linux, Mac, Windows) and vice versa.
4084Additionally, many Git-based tools simply assume path names to
4085be UTF-8 and will fail to display other encodings correctly.</p></div>
4086</li>
4087<li>
4088<p>
4089Commit log messages are typically encoded in UTF-8, but other
4090 extended ASCII encodings are also supported. This includes
4091 ISO-8859-x, CP125x and many others, but <em>not</em> UTF-16/32,
4092 EBCDIC and CJK multi-byte encodings (GBK, Shift-JIS, Big5,
4093 EUC-x, CP9xx etc.).
Junio C Hamano775a0f42006-12-31 01:19:144094</p>
4095</li>
Junio C Hamanoba4b9282008-07-06 05:20:314096</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:594097<div class="paragraph"><p>Although we encourage that the commit log messages are encoded
Junio C Hamano076ffcc2013-02-06 05:13:214098in UTF-8, both the core and Git Porcelain are designed not to
Junio C Hamano775a0f42006-12-31 01:19:144099force UTF-8 on projects. If all participants of a particular
Junio C Hamano076ffcc2013-02-06 05:13:214100project find it more convenient to use legacy encodings, Git
Junio C Hamano775a0f42006-12-31 01:19:144101does not forbid it. However, there are a few things to keep in
Junio C Hamanoba4b9282008-07-06 05:20:314102mind.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594103<div class="olist arabic"><ol class="arabic">
Junio C Hamano775a0f42006-12-31 01:19:144104<li>
4105<p>
Junio C Hamano1aa40d22010-01-21 17:46:434106<em>git commit</em> and <em>git commit-tree</em> issues
Junio C Hamano14b76482008-01-05 10:32:264107 a warning if the commit log message given to it does not look
Junio C Hamano775a0f42006-12-31 01:19:144108 like a valid UTF-8 string, unless you explicitly say your
4109 project uses a legacy encoding. The way to say this is to
Junio C Hamanoac12f0e2014-09-19 22:32:514110 have i18n.commitencoding in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:144111</p>
4112<div class="listingblock">
4113<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514114<pre><code>[i18n]
4115 commitencoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:144116</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594117<div class="paragraph"><p>Commit objects created with the above setting record the value
Junio C Hamanoac12f0e2014-09-19 22:32:514118of <code>i18n.commitencoding</code> in its <code>encoding</code> header. This is to
Junio C Hamano775a0f42006-12-31 01:19:144119help other people who look at them later. Lack of this header
Junio C Hamanoba4b9282008-07-06 05:20:314120implies that the commit log message is encoded in UTF-8.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144121</li>
4122<li>
4123<p>
Junio C Hamano1aa40d22010-01-21 17:46:434124<em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
Junio C Hamanoac12f0e2014-09-19 22:32:514125 <code>encoding</code> header of a commit object, and try to re-code the
Junio C Hamanoaa17c7c2008-11-03 04:36:584126 log message into UTF-8 unless otherwise specified. You can
Junio C Hamano775a0f42006-12-31 01:19:144127 specify the desired output encoding with
Junio C Hamanoac12f0e2014-09-19 22:32:514128 <code>i18n.logoutputencoding</code> in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:144129</p>
4130<div class="listingblock">
4131<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514132<pre><code>[i18n]
4133 logoutputencoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:144134</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594135<div class="paragraph"><p>If you do not have this configuration variable, the value of
Junio C Hamanoac12f0e2014-09-19 22:32:514136<code>i18n.commitencoding</code> is used instead.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144137</li>
Junio C Hamanoba4b9282008-07-06 05:20:314138</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:594139<div class="paragraph"><p>Note that we deliberately chose not to re-code the commit log
Junio C Hamano775a0f42006-12-31 01:19:144140message when a commit is made to force UTF-8 at the commit
4141object level, because re-coding to UTF-8 is not necessarily a
Junio C Hamanoba4b9282008-07-06 05:20:314142reversible operation.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144143</div>
Junio C Hamano9629d4f2012-12-19 00:28:274144</div>
4145<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594146<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamanoa574a092010-06-13 19:57:104147<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:234148<div class="paragraph"><p>See <a href="git-config.html">git-config(1)</a> for core variables and <a href="git-diff.html">git-diff(1)</a>
Junio C Hamanoa574a092010-06-13 19:57:104149for settings related to diff generation.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594150<div class="dlist"><dl>
4151<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104152format.pretty
4153</dt>
4154<dd>
4155<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514156 Default for the <code>--format</code> option. (See <em>Pretty Formats</em> above.)
4157 Defaults to <code>medium</code>.
Junio C Hamanoa574a092010-06-13 19:57:104158</p>
4159</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594160<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104161i18n.logOutputEncoding
4162</dt>
4163<dd>
4164<p>
Junio C Hamanob73af6c2013-12-03 22:07:114165 Encoding to use when displaying logs. (See <em>Discussion</em> above.)
Junio C Hamanoac12f0e2014-09-19 22:32:514166 Defaults to the value of <code>i18n.commitEncoding</code> if set, and UTF-8
Junio C Hamanoa574a092010-06-13 19:57:104167 otherwise.
4168</p>
4169</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594170<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104171log.date
4172</dt>
4173<dd>
4174<p>
4175 Default format for human-readable dates. (Compare the
Junio C Hamanoac12f0e2014-09-19 22:32:514176 <code>--date</code> option.) Defaults to "default", which means to write
4177 dates like <code>Sat May 8 19:35:34 2010 -0500</code>.
Junio C Hamanoa574a092010-06-13 19:57:104178</p>
4179</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594180<dt class="hdlist1">
Junio C Hamanod7ed4042015-08-03 19:43:004181log.follow
4182</dt>
4183<dd>
4184<p>
Junio C Hamanob0a1e832015-10-15 23:08:314185 If <code>true</code>, <code>git log</code> will act as if the <code>--follow</code> option was used when
4186 a single &lt;path&gt; is given. This has the same limitations as <code>--follow</code>,
4187 i.e. it cannot be used to follow multiple files and does not work well
4188 on non-linear history.
Junio C Hamanod7ed4042015-08-03 19:43:004189</p>
4190</dd>
4191<dt class="hdlist1">
Junio C Hamano322c6242015-03-23 21:32:464192log.showRoot
Junio C Hamanoa574a092010-06-13 19:57:104193</dt>
4194<dd>
4195<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514196 If <code>false</code>, <code>git log</code> and related commands will not treat the
Junio C Hamanoa574a092010-06-13 19:57:104197 initial commit as a big creation event. Any root commits in
Junio C Hamanoac12f0e2014-09-19 22:32:514198 <code>git log -p</code> output would be shown without a diff attached.
4199 The default is <code>true</code>.
Junio C Hamanoa574a092010-06-13 19:57:104200</p>
4201</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594202<dt class="hdlist1">
Junio C Hamano48931e22016-07-11 20:08:474203log.showSignature
4204</dt>
4205<dd>
4206<p>
4207 If <code>true</code>, <code>git log</code> and related commands will act as if the
4208 <code>--show-signature</code> option was passed to them.
4209</p>
4210</dd>
4211<dt class="hdlist1">
Junio C Hamanoabad6da2013-01-06 09:06:324212mailmap.*
Junio C Hamanoa574a092010-06-13 19:57:104213</dt>
4214<dd>
4215<p>
Junio C Hamanoa28a9202012-06-21 07:08:234216 See <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanoa574a092010-06-13 19:57:104217</p>
4218</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594219<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104220notes.displayRef
4221</dt>
4222<dd>
4223<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514224 Which refs, in addition to the default set by <code>core.notesRef</code>
Junio C Hamano042f2142016-06-27 18:05:054225 or <code>GIT_NOTES_REF</code>, to read notes from when showing commit
Junio C Hamanoac12f0e2014-09-19 22:32:514226 messages with the <code>log</code> family of commands. See
Junio C Hamanoa28a9202012-06-21 07:08:234227 <a href="git-notes.html">git-notes(1)</a>.
Junio C Hamanoa574a092010-06-13 19:57:104228</p>
Junio C Hamano68cf15a2010-11-06 01:01:594229<div class="paragraph"><p>May be an unabbreviated ref name or a glob and may be specified
Junio C Hamanoa574a092010-06-13 19:57:104230multiple times. A warning will be issued for refs that do not exist,
4231but a glob that does not match any refs is silently ignored.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514232<div class="paragraph"><p>This setting can be disabled by the <code>--no-notes</code> option,
Junio C Hamano042f2142016-06-27 18:05:054233overridden by the <code>GIT_NOTES_DISPLAY_REF</code> environment variable,
Junio C Hamanoac12f0e2014-09-19 22:32:514234and overridden by the <code>--notes=&lt;ref&gt;</code> option.</p></div>
Junio C Hamanoa574a092010-06-13 19:57:104235</dd>
4236</dl></div>
4237</div>
Junio C Hamano9629d4f2012-12-19 00:28:274238</div>
4239<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:314240<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:234241<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:234242<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:234243</div>
Junio C Hamano7bd050f2011-09-22 06:32:224244</div>
Junio C Hamano9629d4f2012-12-19 00:28:274245</div>
Junio C Hamano7bd050f2011-09-22 06:32:224246<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:234247<div id="footer">
4248<div id="footer-text">
Junio C Hamanoa275c1f2017-06-19 20:10:124249Last updated 2016-07-11 13:08:30 PDT
Junio C Hamano1a4e8412005-12-27 08:17:234250</div>
4251</div>
4252</body>
4253</html>