blob: ab5089c3669602416242eef0c157ca8a2c456f4b [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 Hamanoa1295452012-11-13 22:32:041081--perl-regexp
1082</dt>
1083<dd>
1084<p>
Junio C Hamanob73af6c2013-12-03 22:07:111085 Consider the limiting patterns to be Perl-compatible regular expressions.
Junio C Hamanoa1295452012-11-13 22:32:041086 Requires libpcre to be compiled in.
1087</p>
1088</dd>
1089<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001090--remove-empty
1091</dt>
1092<dd>
1093<p>
1094 Stop when a given path disappears from the tree.
1095</p>
1096</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591097<dt class="hdlist1">
Junio C Hamano934e1782009-07-16 06:59:151098--merges
1099</dt>
1100<dd>
1101<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511102 Print only merge commits. This is exactly the same as <code>--min-parents=2</code>.
Junio C Hamano934e1782009-07-16 06:59:151103</p>
1104</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591105<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001106--no-merges
1107</dt>
1108<dd>
1109<p>
Junio C Hamanof32ce262011-03-27 07:35:111110 Do not print commits with more than one parent. This is
Junio C Hamanoac12f0e2014-09-19 22:32:511111 exactly the same as <code>--max-parents=1</code>.
Junio C Hamanob0e02952008-01-19 08:02:001112</p>
1113</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591114<dt class="hdlist1">
Junio C Hamanof32ce262011-03-27 07:35:111115--min-parents=&lt;number&gt;
1116</dt>
1117<dt class="hdlist1">
1118--max-parents=&lt;number&gt;
1119</dt>
1120<dt class="hdlist1">
1121--no-min-parents
1122</dt>
1123<dt class="hdlist1">
1124--no-max-parents
1125</dt>
1126<dd>
1127<p>
Junio C Hamanoc5bb3b32013-08-05 22:43:361128 Show only commits which have at least (or at most) that many parent
Junio C Hamanoac12f0e2014-09-19 22:32:511129 commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>,
1130 <code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code>
1131 gives all root commits and <code>--min-parents=3</code> all octopus merges.
Junio C Hamanof32ce262011-03-27 07:35:111132</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511133<div class="paragraph"><p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit)
1134again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more
1135parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p></div>
Junio C Hamanof32ce262011-03-27 07:35:111136</dd>
1137<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001138--first-parent
1139</dt>
1140<dd>
1141<p>
1142 Follow only the first parent commit upon seeing a merge
1143 commit. This option can give a better overview when
1144 viewing the evolution of a particular topic branch,
1145 because merges into a topic branch tend to be only about
1146 adjusting to updated upstream from time to time, and
1147 this option allows you to ignore the individual commits
Junio C Hamanoef57d1e2015-03-25 21:23:001148 brought in to your history by such a merge. Cannot be
1149 combined with --bisect.
Junio C Hamanob0e02952008-01-19 08:02:001150</p>
1151</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591152<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001153--not
1154</dt>
1155<dd>
1156<p>
1157 Reverses the meaning of the <em>&#94;</em> prefix (or lack thereof)
Junio C Hamanoac12f0e2014-09-19 22:32:511158 for all following revision specifiers, up to the next <code>--not</code>.
Junio C Hamanob0e02952008-01-19 08:02:001159</p>
1160</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591161<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001162--all
1163</dt>
1164<dd>
1165<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511166 Pretend as if all the refs in <code>refs/</code> are listed on the
Junio C Hamanob0e02952008-01-19 08:02:001167 command line as <em>&lt;commit&gt;</em>.
1168</p>
1169</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591170<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171171--branches[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561172</dt>
1173<dd>
1174<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511175 Pretend as if all the refs in <code>refs/heads</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171176 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:501177 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
Junio C Hamano81d540a2012-03-02 19:52:471178 <em>&#42;</em>, or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561179</p>
1180</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591181<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171182--tags[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561183</dt>
1184<dd>
1185<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511186 Pretend as if all the refs in <code>refs/tags</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171187 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:471188 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>&#42;</em>,
1189 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561190</p>
1191</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591192<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171193--remotes[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561194</dt>
1195<dd>
1196<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511197 Pretend as if all the refs in <code>refs/remotes</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171198 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:071199 remote-tracking branches to ones matching given shell glob.
Junio C Hamano81d540a2012-03-02 19:52:471200 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:501201</p>
1202</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591203<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171204--glob=&lt;glob-pattern&gt;
Junio C Hamano57827fb2010-01-23 03:02:501205</dt>
1206<dd>
1207<p>
Junio C Hamanod2179ef2010-10-22 04:12:171208 Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
Junio C Hamano57827fb2010-01-23 03:02:501209 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
Junio C Hamano81d540a2012-03-02 19:52:471210 is automatically prepended if missing. If pattern lacks <em>?</em>, <em>&#42;</em>,
1211 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561212</p>
1213</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591214<dt class="hdlist1">
Junio C Hamanof079f702013-12-06 23:43:181215--exclude=&lt;glob-pattern&gt;
1216</dt>
1217<dd>
1218<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511219 Do not include refs matching <em>&lt;glob-pattern&gt;</em> that the next <code>--all</code>,
1220 <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or <code>--glob</code> would otherwise
Junio C Hamanof079f702013-12-06 23:43:181221 consider. Repetitions of this option accumulate exclusion patterns
Junio C Hamanoac12f0e2014-09-19 22:32:511222 up to the next <code>--all</code>, <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or
1223 <code>--glob</code> option (other options or arguments do not clear
Junio C Hamanofb5ffde2014-11-04 22:38:561224 accumulated patterns).
Junio C Hamanof079f702013-12-06 23:43:181225</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511226<div class="paragraph"><p>The patterns given should not begin with <code>refs/heads</code>, <code>refs/tags</code>, or
1227<code>refs/remotes</code> when applied to <code>--branches</code>, <code>--tags</code>, or <code>--remotes</code>,
1228respectively, and they must begin with <code>refs/</code> when applied to <code>--glob</code>
1229or <code>--all</code>. If a trailing <em>/&#42;</em> is intended, it must be given
Junio C Hamanof079f702013-12-06 23:43:181230explicitly.</p></div>
1231</dd>
1232<dt class="hdlist1">
Junio C Hamano2a4bcbc2014-10-29 20:07:391233--reflog
1234</dt>
1235<dd>
1236<p>
1237 Pretend as if all objects mentioned by reflogs are listed on the
1238 command line as <code>&lt;commit&gt;</code>.
1239</p>
1240</dd>
1241<dt class="hdlist1">
Junio C Hamano084228c2011-05-30 08:13:521242--ignore-missing
1243</dt>
1244<dd>
1245<p>
1246 Upon seeing an invalid object name in the input, pretend as if
1247 the bad input was not given.
1248</p>
1249</dd>
1250<dt class="hdlist1">
Junio C Hamano5706e0b2009-11-24 10:54:161251--bisect
1252</dt>
1253<dd>
1254<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511255 Pretend as if the bad bisection ref <code>refs/bisect/bad</code>
1256 was listed and as if it was followed by <code>--not</code> and the good
1257 bisection refs <code>refs/bisect/good-*</code> on the command
Junio C Hamanoef57d1e2015-03-25 21:23:001258 line. Cannot be combined with --first-parent.
Junio C Hamano5706e0b2009-11-24 10:54:161259</p>
1260</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591261<dt class="hdlist1">
Junio C Hamano5706e0b2009-11-24 10:54:161262--stdin
1263</dt>
1264<dd>
1265<p>
1266 In addition to the <em>&lt;commit&gt;</em> listed on the command
Junio C Hamano92d80372016-07-13 22:00:051267 line, read them from the standard input. If a <code>--</code> separator is
Junio C Hamano5706e0b2009-11-24 10:54:161268 seen, stop reading commits and start reading paths to limit the
1269 result.
1270</p>
1271</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591272<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151273--cherry-mark
1274</dt>
1275<dd>
1276<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511277 Like <code>--cherry-pick</code> (see below) but mark equivalent commits
1278 with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151279</p>
1280</dd>
1281<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001282--cherry-pick
1283</dt>
1284<dd>
1285<p>
1286 Omit any commit that introduces the same change as
Junio C Hamanob73af6c2013-12-03 22:07:111287 another commit on the &#8220;other side&#8221; when the set of
Junio C Hamano68cf15a2010-11-06 01:01:591288 commits are limited with symmetric difference.
1289</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511290<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:001291to list all commits on only one side of them is with
Junio C Hamanoac12f0e2014-09-19 22:32:511292<code>--left-right</code> (see the example below in the description of
1293the <code>--left-right</code> option). However, it shows the commits that were
Junio C Hamanob73af6c2013-12-03 22:07:111294cherry-picked from the other branch (for example, &#8220;3rd on b&#8221; may be
1295cherry-picked from branch A). With this option, such pairs of commits are
Junio C Hamano68cf15a2010-11-06 01:01:591296excluded from the output.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001297</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591298<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151299--left-only
1300</dt>
1301<dt class="hdlist1">
1302--right-only
1303</dt>
1304<dd>
1305<p>
Junio C Hamanocd451662016-09-13 00:54:091306 List only commits on the respective side of a symmetric difference,
Junio C Hamanoac12f0e2014-09-19 22:32:511307 i.e. only those which would be marked <code>&lt;</code> resp. <code>&gt;</code> by
1308 <code>--left-right</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151309</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511310<div class="paragraph"><p>For example, <code>--cherry-pick --right-only A...B</code> omits those
1311commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in
1312<code>A</code>. In other words, this lists the <code>+</code> commits from <code>git cherry A B</code>.
1313More precisely, <code>--cherry-pick --right-only --no-merges</code> gives the exact
Junio C Hamano9a2fb2d2011-03-23 05:40:151314list.</p></div>
1315</dd>
1316<dt class="hdlist1">
1317--cherry
1318</dt>
1319<dd>
1320<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511321 A synonym for <code>--right-only --cherry-mark --no-merges</code>; useful to
Junio C Hamano9a2fb2d2011-03-23 05:40:151322 limit the output to the commits on our side and mark those that
1323 have been applied to the other side of a forked history with
Junio C Hamanoac12f0e2014-09-19 22:32:511324 <code>git log --cherry upstream...mybranch</code>, similar to
1325 <code>git cherry upstream mybranch</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151326</p>
1327</dd>
1328<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471329-g
1330</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591331<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471332--walk-reflogs
Junio C Hamanob0e02952008-01-19 08:02:001333</dt>
1334<dd>
1335<p>
1336 Instead of walking the commit ancestry chain, walk
1337 reflog entries from the most recent one to older ones.
1338 When this option is used you cannot specify commits to
1339 exclude (that is, <em>&#94;commit</em>, <em>commit1..commit2</em>,
Junio C Hamanod75148a2014-04-08 19:48:381340 and <em>commit1...commit2</em> notations cannot be used).
Junio C Hamano68cf15a2010-11-06 01:01:591341</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511342<div class="paragraph"><p>With <code>--pretty</code> format other than <code>oneline</code> (for obvious reasons),
Junio C Hamanob0e02952008-01-19 08:02:001343this causes the output to have two extra lines of information
Junio C Hamanoe548d1b2016-08-08 22:26:491344taken from the reflog. The reflog designator in the output may be shown
1345as <code>ref@{Nth}</code> (where <code>Nth</code> is the reverse-chronological index in the
1346reflog) or as <code>ref@{timestamp}</code> (with the timestamp for that entry),
1347depending on a few rules:</p></div>
1348<div class="openblock">
1349<div class="content">
1350<div class="olist arabic"><ol class="arabic">
1351<li>
1352<p>
1353If the starting point is specified as <code>ref@{Nth}</code>, show the index
1354format.
1355</p>
1356</li>
1357<li>
1358<p>
1359If the starting point was specified as <code>ref@{now}</code>, show the
1360timestamp format.
1361</p>
1362</li>
1363<li>
1364<p>
1365If neither was used, but <code>--date</code> was given on the command line, show
1366the timestamp in the format requested by <code>--date</code>.
1367</p>
1368</li>
1369<li>
1370<p>
1371Otherwise, show the index format.
1372</p>
1373</li>
1374</ol></div>
1375</div></div>
1376<div class="paragraph"><p>Under <code>--pretty=oneline</code>, the commit message is
Junio C Hamanob0e02952008-01-19 08:02:001377prefixed with this information on the same line.
Junio C Hamanoac12f0e2014-09-19 22:32:511378This option cannot be combined with <code>--reverse</code>.
Junio C Hamanoa28a9202012-06-21 07:08:231379See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001380</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591381<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001382--merge
1383</dt>
1384<dd>
1385<p>
1386 After a failed merge, show refs that touch files having a
Junio C Hamano68cf15a2010-11-06 01:01:591387 conflict and don&#8217;t exist on all heads to merge.
Junio C Hamanob0e02952008-01-19 08:02:001388</p>
1389</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591390<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001391--boundary
1392</dt>
1393<dd>
1394<p>
Junio C Hamano27159f82013-06-14 17:19:221395 Output excluded boundary commits. Boundary commits are
Junio C Hamanoac12f0e2014-09-19 22:32:511396 prefixed with <code>-</code>.
Junio C Hamanob0e02952008-01-19 08:02:001397</p>
1398</dd>
Junio C Hamanoa76cb0d2008-08-13 20:04:101399</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271400</div></div>
1401</div>
1402<div class="sect2">
1403<h3 id="_history_simplification">History Simplification</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591404<div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the
Junio C Hamano28363492008-11-14 08:26:311405commits modifying a particular &lt;path&gt;. But there are two parts of
1406<em>History Simplification</em>, one part is selecting the commits and the other
1407is how to do it, as there are various strategies to simplify the history.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591408<div class="paragraph"><p>The following options select the commits to be shown:</p></div>
1409<div class="dlist"><dl>
1410<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311411&lt;paths&gt;
1412</dt>
1413<dd>
1414<p>
1415 Commits modifying the given &lt;paths&gt; are selected.
1416</p>
1417</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591418<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311419--simplify-by-decoration
1420</dt>
1421<dd>
1422<p>
1423 Commits that are referred by some branch or tag are selected.
1424</p>
1425</dd>
1426</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591427<div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div>
1428<div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div>
1429<div class="dlist"><dl>
1430<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311431Default mode
1432</dt>
1433<dd>
1434<p>
1435 Simplifies the history to the simplest history explaining the
1436 final state of the tree. Simplest because it prunes some side
1437 branches if the end result is the same (i.e. merging branches
1438 with the same content)
1439</p>
1440</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591441<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311442--full-history
1443</dt>
1444<dd>
1445<p>
Junio C Hamano15567bc2011-07-23 00:51:591446 Same as the default mode, but does not prune some history.
Junio C Hamano28363492008-11-14 08:26:311447</p>
1448</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591449<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311450--dense
1451</dt>
1452<dd>
1453<p>
1454 Only the selected commits are shown, plus some to have a
1455 meaningful history.
1456</p>
1457</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591458<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311459--sparse
1460</dt>
1461<dd>
1462<p>
1463 All commits in the simplified history are shown.
1464</p>
1465</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591466<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311467--simplify-merges
1468</dt>
1469<dd>
1470<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511471 Additional option to <code>--full-history</code> to remove some needless
Junio C Hamano28363492008-11-14 08:26:311472 merges from the resulting history, as there are no selected
1473 commits contributing to this merge.
1474</p>
1475</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591476<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551477--ancestry-path
1478</dt>
1479<dd>
1480<p>
1481 When given a range of commits to display (e.g. <em>commit1..commit2</em>
1482 or <em>commit2 &#94;commit1</em>), only display commits that exist
1483 directly on the ancestry chain between the <em>commit1</em> and
1484 <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>,
1485 and ancestors of <em>commit2</em>.
1486</p>
1487</dd>
Junio C Hamano28363492008-11-14 08:26:311488</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591489<div class="paragraph"><p>A more detailed explanation follows.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511490<div class="paragraph"><p>Suppose you specified <code>foo</code> as the &lt;paths&gt;. We shall call commits
1491that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff
1492filtered for <code>foo</code>, they look different and equal, respectively.)</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591493<div class="paragraph"><p>In the following, we will always refer to the same example history to
Junio C Hamanoa76cb0d2008-08-13 20:04:101494illustrate the differences between simplification settings. We assume
Junio C Hamanoac12f0e2014-09-19 22:32:511495that you are filtering for a file <code>foo</code> in this commit graph:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101496<div class="listingblock">
1497<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511498<pre><code> .-A---M---N---O---P---Q
Junio C Hamano27159f82013-06-14 17:19:221499 / / / / / /
1500 I B C D E Y
1501 \ / / / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511502 `-------------' X</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101503</div></div>
Junio C Hamano27159f82013-06-14 17:19:221504<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:101505each merge. The commits are:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591506<div class="ulist"><ul>
Junio C Hamanoa76cb0d2008-08-13 20:04:101507<li>
1508<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511509<code>I</code> is the initial commit, in which <code>foo</code> exists with contents
1510 &#8220;asdf&#8221;, and a file <code>quux</code> exists with contents &#8220;quux&#8221;. Initial
1511 commits are compared to an empty tree, so <code>I</code> is !TREESAME.
Junio C Hamanoa76cb0d2008-08-13 20:04:101512</p>
1513</li>
1514<li>
1515<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511516In <code>A</code>, <code>foo</code> contains just &#8220;foo&#8221;.
Junio C Hamanoa76cb0d2008-08-13 20:04:101517</p>
1518</li>
1519<li>
1520<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511521<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:101522 hence TREESAME to all parents.
1523</p>
1524</li>
1525<li>
1526<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511527<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:101528 so it is not TREESAME to any parent.
1529</p>
1530</li>
1531<li>
1532<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511533<code>D</code> sets <code>foo</code> to &#8220;baz&#8221;. Its merge <code>O</code> combines the strings from
1534 <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:101535</p>
1536</li>
1537<li>
1538<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511539<code>E</code> changes <code>quux</code> to &#8220;xyzzy&#8221;, and its merge <code>P</code> combines the
1540 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:221541</p>
1542</li>
1543<li>
1544<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511545<code>X</code> is an independent root commit that added a new file <code>side</code>, and <code>Y</code>
1546 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
1547 <code>Q</code> is TREESAME to <code>P</code>, but not to <code>Y</code>.
Junio C Hamanoa76cb0d2008-08-13 20:04:101548</p>
1549</li>
1550</ul></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511551<div class="paragraph"><p><code>rev-list</code> walks backwards through history, including or excluding
1552commits based on whether <code>--full-history</code> and/or parent rewriting
1553(via <code>--parents</code> or <code>--children</code>) are used. The following settings
Junio C Hamanoa76cb0d2008-08-13 20:04:101554are available.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591555<div class="dlist"><dl>
1556<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101557Default mode
1558</dt>
1559<dd>
1560<p>
1561 Commits are included if they are not TREESAME to any parent
Junio C Hamanoac12f0e2014-09-19 22:32:511562 (though this can be changed, see <code>--sparse</code> below). If the
Junio C Hamanoa76cb0d2008-08-13 20:04:101563 commit was a merge, and it was TREESAME to one parent, follow
1564 only that parent. (Even if there are several TREESAME
1565 parents, follow only one of them.) Otherwise, follow all
1566 parents.
1567</p>
Junio C Hamano68cf15a2010-11-06 01:01:591568<div class="paragraph"><p>This results in:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101569<div class="listingblock">
1570<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511571<pre><code> .-A---N---O
Junio C Hamano89a57342010-06-22 23:22:551572 / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511573 I---------D</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101574</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591575<div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is
Junio C Hamanoac12f0e2014-09-19 22:32:511576available, removed <code>B</code> from consideration entirely. <code>C</code> was
1577considered via <code>N</code>, but is TREESAME. Root commits are compared to an
1578empty tree, so <code>I</code> is !TREESAME.</p></div>
1579<div class="paragraph"><p>Parent/child relations are only visible with <code>--parents</code>, but that does
Junio C Hamanoa76cb0d2008-08-13 20:04:101580not affect the commits selected in default mode, so we have shown the
1581parent lines.</p></div>
1582</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591583<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101584--full-history without parent rewriting
1585</dt>
1586<dd>
1587<p>
1588 This mode differs from the default in one point: always follow
1589 all parents of a merge, even if it is TREESAME to one of them.
1590 Even if more than one side of the merge has commits that are
1591 included, this does not imply that the merge itself is! In
1592 the example, we get
1593</p>
1594<div class="listingblock">
1595<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511596<pre><code> I A B N D O P Q</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101597</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511598<div class="paragraph"><p><code>M</code> was excluded because it is TREESAME to both parents. <code>E</code>,
1599<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:101600do not appear.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591601<div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk
Junio C Hamanoa76cb0d2008-08-13 20:04:101602about the parent/child relationships between the commits, so we show
1603them disconnected.</p></div>
1604</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591605<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101606--full-history with parent rewriting
1607</dt>
1608<dd>
1609<p>
1610 Ordinary commits are only included if they are !TREESAME
Junio C Hamanoac12f0e2014-09-19 22:32:511611 (though this can be changed, see <code>--sparse</code> below).
Junio C Hamanoa76cb0d2008-08-13 20:04:101612</p>
Junio C Hamano68cf15a2010-11-06 01:01:591613<div class="paragraph"><p>Merges are always included. However, their parent list is rewritten:
Junio C Hamanoa76cb0d2008-08-13 20:04:101614Along each parent, prune away commits that are not included
1615themselves. This results in</p></div>
1616<div class="listingblock">
1617<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511618<pre><code> .-A---M---N---O---P---Q
Junio C Hamanoa76cb0d2008-08-13 20:04:101619 / / / / /
1620 I B / D /
1621 \ / / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511622 `-------------'</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101623</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511624<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:101625was pruned away because it is TREESAME, but the parent list of P was
Junio C Hamanoac12f0e2014-09-19 22:32:511626rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and
1627<code>N</code>, and <code>X</code>, <code>Y</code> and <code>Q</code>.</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101628</dd>
1629</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591630<div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME
Junio C Hamanoa76cb0d2008-08-13 20:04:101631affects inclusion:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591632<div class="dlist"><dl>
1633<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471634--dense
1635</dt>
Junio C Hamanoa76cb0d2008-08-13 20:04:101636<dd>
1637<p>
1638 Commits that are walked are included if they are not TREESAME
1639 to any parent.
1640</p>
1641</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591642<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471643--sparse
Junio C Hamanob0e02952008-01-19 08:02:001644</dt>
1645<dd>
1646<p>
Junio C Hamanoa76cb0d2008-08-13 20:04:101647 All commits that are walked are included.
Junio C Hamanob0e02952008-01-19 08:02:001648</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511649<div class="paragraph"><p>Note that without <code>--full-history</code>, this still simplifies merges: if
Junio C Hamanoa76cb0d2008-08-13 20:04:101650one of the parents is TREESAME, we follow only that one, so the other
1651sides of the merge are never walked.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001652</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591653<dt class="hdlist1">
Junio C Hamanoa2f46622008-09-03 05:20:311654--simplify-merges
1655</dt>
1656<dd>
1657<p>
1658 First, build a history graph in the same way that
Junio C Hamanoac12f0e2014-09-19 22:32:511659 <code>--full-history</code> with parent rewriting does (see above).
Junio C Hamanoa2f46622008-09-03 05:20:311660</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511661<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:311662history according to the following rules:</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271663<div class="openblock">
1664<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591665<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311666<li>
1667<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511668Set <code>C'</code> to <code>C</code>.
Junio C Hamanoa2f46622008-09-03 05:20:311669</p>
1670</li>
1671<li>
1672<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511673Replace each parent <code>P</code> of <code>C'</code> with its simplification <code>P'</code>. In
Junio C Hamano27159f82013-06-14 17:19:221674 the process, drop parents that are ancestors of other parents or that are
1675 root commits TREESAME to an empty tree, and remove duplicates, but take care
1676 to never drop all parents that we are TREESAME to.
Junio C Hamanoa2f46622008-09-03 05:20:311677</p>
1678</li>
1679<li>
1680<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511681If after this parent rewriting, <code>C'</code> is a root or merge commit (has
Junio C Hamanoa2f46622008-09-03 05:20:311682 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1683 Otherwise, it is replaced with its only parent.
1684</p>
1685</li>
1686</ul></div>
Junio C Hamano9629d4f2012-12-19 00:28:271687</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591688<div class="paragraph"><p>The effect of this is best shown by way of comparing to
Junio C Hamanoac12f0e2014-09-19 22:32:511689<code>--full-history</code> with parent rewriting. The example turns into:</p></div>
Junio C Hamanoa2f46622008-09-03 05:20:311690<div class="listingblock">
1691<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511692<pre><code> .-A---M---N---O
Junio C Hamanoa2f46622008-09-03 05:20:311693 / / /
1694 I B D
1695 \ / /
Junio C Hamanoac12f0e2014-09-19 22:32:511696 `---------'</code></pre>
Junio C Hamanoa2f46622008-09-03 05:20:311697</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511698<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:271699<div class="openblock">
1700<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591701<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311702<li>
1703<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511704<code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the
1705 other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME.
Junio C Hamanoa2f46622008-09-03 05:20:311706</p>
1707</li>
1708<li>
1709<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511710<code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then
Junio C Hamanoa2f46622008-09-03 05:20:311711 removed completely, because it had one parent and is TREESAME.
1712</p>
1713</li>
Junio C Hamano27159f82013-06-14 17:19:221714<li>
1715<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511716<code>Q</code>'s parent list had <code>Y</code> simplified to <code>X</code>. <code>X</code> was then removed, because it
1717 was a TREESAME root. <code>Q</code> was then removed completely, because it had one
Junio C Hamano27159f82013-06-14 17:19:221718 parent and is TREESAME.
1719</p>
1720</li>
Junio C Hamanoa2f46622008-09-03 05:20:311721</ul></div>
Junio C Hamano9629d4f2012-12-19 00:28:271722</div></div>
Junio C Hamanoa2f46622008-09-03 05:20:311723</dd>
1724</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591725<div class="paragraph"><p>Finally, there is a fifth simplification mode available:</p></div>
1726<div class="dlist"><dl>
1727<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551728--ancestry-path
1729</dt>
1730<dd>
1731<p>
1732 Limit the displayed commits to those directly on the ancestry
Junio C Hamanob73af6c2013-12-03 22:07:111733 chain between the &#8220;from&#8221; and &#8220;to&#8221; commits in the given commit
1734 range. I.e. only display commits that are ancestor of the &#8220;to&#8221;
1735 commit and descendants of the &#8220;from&#8221; commit.
Junio C Hamano89a57342010-06-22 23:22:551736</p>
Junio C Hamano68cf15a2010-11-06 01:01:591737<div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
Junio C Hamano89a57342010-06-22 23:22:551738<div class="listingblock">
1739<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511740<pre><code> D---E-------F
Junio C Hamano89a57342010-06-22 23:22:551741 / \ \
1742 B---C---G---H---I---J
1743 / \
Junio C Hamanoac12f0e2014-09-19 22:32:511744 A-------K---------------L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551745</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511746<div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>,
1747but excludes the ones that are ancestors of <code>D</code>. This is useful to see
1748what happened to the history leading to <code>M</code> since <code>D</code>, in the sense
1749that &#8220;what does <code>M</code> have that did not exist in <code>D</code>&#8221;. The result in this
1750example 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:551751of course).</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511752<div class="paragraph"><p>When we want to find out what commits in <code>M</code> are contaminated with the
1753bug introduced by <code>D</code> and need fixing, however, we might want to view
1754only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e.
1755excluding <code>C</code> and <code>K</code>. This is exactly what the <code>--ancestry-path</code>
Junio C Hamano89a57342010-06-22 23:22:551756option does. Applied to the <em>D..M</em> range, it results in:</p></div>
1757<div class="listingblock">
1758<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511759<pre><code> E-------F
Junio C Hamano89a57342010-06-22 23:22:551760 \ \
1761 G---H---I---J
1762 \
Junio C Hamanoac12f0e2014-09-19 22:32:511763 L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551764</div></div>
1765</dd>
1766</dl></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511767<div class="paragraph"><p>The <code>--simplify-by-decoration</code> option allows you to view only the
Junio C Hamano28363492008-11-14 08:26:311768big picture of the topology of the history, by omitting commits
1769that are not referenced by tags. Commits are marked as !TREESAME
1770(in other words, kept after history simplification rules described
1771above) if (1) they are referenced by tags, or (2) they change the
1772contents of the paths given on the command line. All other
1773commits are marked as TREESAME (subject to be simplified away).</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271774</div>
1775<div class="sect2">
1776<h3 id="_commit_ordering">Commit Ordering</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591777<div class="paragraph"><p>By default, the commits are shown in reverse chronological order.</p></div>
1778<div class="dlist"><dl>
1779<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001780--date-order
1781</dt>
1782<dd>
1783<p>
Junio C Hamanod0316112012-08-22 19:55:291784 Show no parents before all of its children are shown, but
1785 otherwise show commits in the commit timestamp order.
Junio C Hamanob0e02952008-01-19 08:02:001786</p>
1787</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591788<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:181789--author-date-order
1790</dt>
1791<dd>
1792<p>
1793 Show no parents before all of its children are shown, but
1794 otherwise show commits in the author timestamp order.
1795</p>
1796</dd>
1797<dt class="hdlist1">
Junio C Hamanod0316112012-08-22 19:55:291798--topo-order
1799</dt>
1800<dd>
1801<p>
1802 Show no parents before all of its children are shown, and
1803 avoid showing commits on multiple lines of history
1804 intermixed.
1805</p>
1806<div class="paragraph"><p>For example, in a commit history like this:</p></div>
1807<div class="listingblock">
1808<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511809<pre><code> ---1----2----4----7
Junio C Hamanod0316112012-08-22 19:55:291810 \ \
Junio C Hamanoac12f0e2014-09-19 22:32:511811 3----5----6----8---</code></pre>
Junio C Hamanod0316112012-08-22 19:55:291812</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511813<div class="paragraph"><p>where the numbers denote the order of commit timestamps, <code>git
1814rev-list</code> and friends with <code>--date-order</code> show the commits in the
Junio C Hamanod0316112012-08-22 19:55:291815timestamp order: 8 7 6 5 4 3 2 1.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511816<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:2918173 1); some older commits are shown before newer ones in order to
1818avoid showing the commits from two parallel development track mixed
1819together.</p></div>
1820</dd>
1821<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001822--reverse
1823</dt>
1824<dd>
1825<p>
Junio C Hamanof3ca7b82016-10-03 22:27:021826 Output the commits chosen to be shown (see Commit Limiting
1827 section above) in reverse order. Cannot be combined with
1828 <code>--walk-reflogs</code>.
Junio C Hamanob0e02952008-01-19 08:02:001829</p>
1830</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311831</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271832</div>
1833<div class="sect2">
1834<h3 id="_object_traversal">Object Traversal</h3>
Junio C Hamano076ffcc2013-02-06 05:13:211835<div class="paragraph"><p>These options are mostly targeted for packing of Git repositories.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591836<div class="dlist"><dl>
1837<dt class="hdlist1">
Junio C Hamanoeccdd4a2012-09-10 23:28:171838--no-walk[=(sorted|unsorted)]
Junio C Hamanob0e02952008-01-19 08:02:001839</dt>
1840<dd>
1841<p>
Junio C Hamanoeccdd4a2012-09-10 23:28:171842 Only show the given commits, but do not traverse their ancestors.
1843 This has no effect if a range is specified. If the argument
Junio C Hamanoac12f0e2014-09-19 22:32:511844 <code>unsorted</code> is given, the commits are shown in the order they were
1845 given on the command line. Otherwise (if <code>sorted</code> or no argument
Junio C Hamanob73af6c2013-12-03 22:07:111846 was given), the commits are shown in reverse chronological order
Junio C Hamanoeccdd4a2012-09-10 23:28:171847 by commit time.
Junio C Hamanoef57d1e2015-03-25 21:23:001848 Cannot be combined with <code>--graph</code>.
Junio C Hamanob0e02952008-01-19 08:02:001849</p>
1850</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591851<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001852--do-walk
1853</dt>
1854<dd>
1855<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511856 Overrides a previous <code>--no-walk</code>.
Junio C Hamanob0e02952008-01-19 08:02:001857</p>
1858</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311859</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271860</div>
1861<div class="sect2">
1862<h3 id="_commit_formatting">Commit Formatting</h3>
Junio C Hamanod2c978f2011-03-20 19:42:221863<div class="dlist"><dl>
1864<dt class="hdlist1">
1865--pretty[=&lt;format&gt;]
1866</dt>
1867<dt class="hdlist1">
1868--format=&lt;format&gt;
1869</dt>
1870<dd>
1871<p>
1872 Pretty-print the contents of the commit logs in a given format,
1873 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:261874 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em>, <em>format:&lt;string&gt;</em>
1875 and <em>tformat:&lt;string&gt;</em>. When <em>&lt;format&gt;</em> is none of the above,
1876 and has <em>%placeholder</em> in it, it acts as if
1877 <em>--pretty=tformat:&lt;format&gt;</em> were given.
Junio C Hamanod2c978f2011-03-20 19:42:221878</p>
Junio C Hamano6bb32e62015-02-17 22:11:261879<div class="paragraph"><p>See the "PRETTY FORMATS" section for some additional details for each
1880format. When <em>=&lt;format&gt;</em> part is omitted, it defaults to <em>medium</em>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221881<div class="paragraph"><p>Note: you can specify the default pretty format in the repository
Junio C Hamanoa28a9202012-06-21 07:08:231882configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221883</dd>
1884<dt class="hdlist1">
1885--abbrev-commit
1886</dt>
1887<dd>
1888<p>
1889 Instead of showing the full 40-byte hexadecimal commit object
1890 name, show only a partial prefix. Non default number of
1891 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
1892 diff output, if it is displayed).
1893</p>
1894<div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
1895people using 80-column terminals.</p></div>
1896</dd>
1897<dt class="hdlist1">
Junio C Hamanof93530e2011-05-25 23:59:591898--no-abbrev-commit
1899</dt>
1900<dd>
1901<p>
1902 Show the full 40-byte hexadecimal commit object name. This negates
Junio C Hamanoac12f0e2014-09-19 22:32:511903 <code>--abbrev-commit</code> and those options which imply it such as
Junio C Hamano042f2142016-06-27 18:05:051904 "--oneline". It also overrides the <code>log.abbrevCommit</code> variable.
Junio C Hamanof93530e2011-05-25 23:59:591905</p>
1906</dd>
1907<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221908--oneline
1909</dt>
1910<dd>
1911<p>
1912 This is a shorthand for "--pretty=oneline --abbrev-commit"
1913 used together.
1914</p>
1915</dd>
1916<dt class="hdlist1">
Junio C Hamanoc5bb3b32013-08-05 22:43:361917--encoding=&lt;encoding&gt;
Junio C Hamanod2c978f2011-03-20 19:42:221918</dt>
1919<dd>
1920<p>
1921 The commit objects record the encoding used for the log message
1922 in their encoding header; this option can be used to tell the
1923 command to re-code the commit log message in the encoding
1924 preferred by the user. For non plumbing commands this
Junio C Hamano823eebb2015-07-10 22:29:341925 defaults to UTF-8. Note that if an object claims to be encoded
1926 in <code>X</code> and we are outputting in <code>X</code>, we will output the object
1927 verbatim; this means that invalid sequences in the original
1928 commit may be copied to the output.
Junio C Hamanod2c978f2011-03-20 19:42:221929</p>
1930</dd>
1931<dt class="hdlist1">
Junio C Hamano5996b672016-04-13 22:01:411932--expand-tabs=&lt;n&gt;
1933</dt>
1934<dt class="hdlist1">
1935--expand-tabs
1936</dt>
1937<dt class="hdlist1">
1938--no-expand-tabs
1939</dt>
1940<dd>
1941<p>
1942 Perform a tab expansion (replace each tab with enough spaces
1943 to fill to the next display column that is multiple of <em>&lt;n&gt;</em>)
1944 in the log message before showing it in the output.
1945 <code>--expand-tabs</code> is a short-hand for <code>--expand-tabs=8</code>, and
1946 <code>--no-expand-tabs</code> is a short-hand for <code>--expand-tabs=0</code>,
1947 which disables tab expansion.
1948</p>
1949<div class="paragraph"><p>By default, tabs are expanded in pretty formats that indent the log
1950message by 4 spaces (i.e. <em>medium</em>, which is the default, <em>full</em>,
1951and <em>fuller</em>).</p></div>
1952</dd>
1953<dt class="hdlist1">
Junio C Hamano4e6ba272016-01-20 23:23:191954--notes[=&lt;treeish&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:221955</dt>
1956<dd>
1957<p>
Junio C Hamanoa28a9202012-06-21 07:08:231958 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
Junio C Hamanod2c978f2011-03-20 19:42:221959 commit, when showing the commit log message. This is the default
Junio C Hamanoac12f0e2014-09-19 22:32:511960 for <code>git log</code>, <code>git show</code> and <code>git whatchanged</code> commands when
1961 there is no <code>--pretty</code>, <code>--format</code>, or <code>--oneline</code> option given
Junio C Hamano60033462011-05-03 00:48:431962 on the command line.
Junio C Hamanod2c978f2011-03-20 19:42:221963</p>
Junio C Hamano60033462011-05-03 00:48:431964<div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the
Junio C Hamano042f2142016-06-27 18:05:051965<code>core.notesRef</code> and <code>notes.displayRef</code> variables (or corresponding
Junio C Hamanoa28a9202012-06-21 07:08:231966environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div>
Junio C Hamano4e6ba272016-01-20 23:23:191967<div class="paragraph"><p>With an optional <em>&lt;treeish&gt;</em> argument, use the treeish to find the notes
1968to display. The treeish can specify the full refname when it begins
Junio C Hamano1f7c4a52015-10-14 22:15:511969with <code>refs/notes/</code>; when it begins with <code>notes/</code>, <code>refs/</code> and otherwise
1970<code>refs/notes/</code> is prefixed to form a full name of the ref.</p></div>
Junio C Hamano60033462011-05-03 00:48:431971<div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
1972being displayed. Examples: "--notes=foo" will show only notes from
1973"refs/notes/foo"; "--notes=foo --notes" will show both notes from
1974"refs/notes/foo" and from the default notes ref(s).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221975</dd>
1976<dt class="hdlist1">
Junio C Hamano60033462011-05-03 00:48:431977--no-notes
1978</dt>
1979<dd>
1980<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511981 Do not show notes. This negates the above <code>--notes</code> option, by
Junio C Hamano60033462011-05-03 00:48:431982 resetting the list of notes refs from which notes are shown.
1983 Options are parsed in the order given on the command line, so e.g.
1984 "--notes --notes=foo --no-notes --notes=bar" will only show notes
1985 from "refs/notes/bar".
1986</p>
1987</dd>
1988<dt class="hdlist1">
Junio C Hamano4e6ba272016-01-20 23:23:191989--show-notes[=&lt;treeish&gt;]
Junio C Hamano60033462011-05-03 00:48:431990</dt>
1991<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221992--[no-]standard-notes
1993</dt>
1994<dd>
1995<p>
Junio C Hamano60033462011-05-03 00:48:431996 These options are deprecated. Use the above --notes/--no-notes
1997 options instead.
Junio C Hamanod2c978f2011-03-20 19:42:221998</p>
1999</dd>
2000<dt class="hdlist1">
Junio C Hamano0acb1ae2012-09-24 21:28:132001--show-signature
2002</dt>
2003<dd>
2004<p>
2005 Check the validity of a signed commit object by passing the signature
Junio C Hamanoac12f0e2014-09-19 22:32:512006 to <code>gpg --verify</code> and show the output.
Junio C Hamano0acb1ae2012-09-24 21:28:132007</p>
2008</dd>
2009<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222010--relative-date
2011</dt>
2012<dd>
2013<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512014 Synonym for <code>--date=relative</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222015</p>
2016</dd>
2017<dt class="hdlist1">
Junio C Hamano1eb56092015-10-05 20:39:532018--date=&lt;format&gt;
Junio C Hamanod2c978f2011-03-20 19:42:222019</dt>
2020<dd>
2021<p>
2022 Only takes effect for dates shown in human-readable format, such
Junio C Hamanoac12f0e2014-09-19 22:32:512023 as when using <code>--pretty</code>. <code>log.date</code> config variable sets a default
Junio C Hamano1eb56092015-10-05 20:39:532024 value for the log command&#8217;s <code>--date</code> option. By default, dates
2025 are shown in the original time zone (either committer&#8217;s or
2026 author&#8217;s). If <code>-local</code> is appended to the format (e.g.,
2027 <code>iso-local</code>), the user&#8217;s local time zone is used instead.
Junio C Hamanod2c978f2011-03-20 19:42:222028</p>
Junio C Hamanoac12f0e2014-09-19 22:32:512029<div class="paragraph"><p><code>--date=relative</code> shows dates relative to the current time,
Junio C Hamanoe548d1b2016-08-08 22:26:492030e.g. &#8220;2 hours ago&#8221;. The <code>-local</code> option has no effect for
2031<code>--date=relative</code>.</p></div>
Junio C Hamano1eb56092015-10-05 20:39:532032<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:512033<div class="paragraph"><p><code>--date=iso</code> (or <code>--date=iso8601</code>) shows timestamps in a ISO 8601-like format.
2034The differences to the strict ISO 8601 format are:</p></div>
2035<div class="ulist"><ul>
2036<li>
2037<p>
2038a space instead of the <code>T</code> date/time delimiter
2039</p>
2040</li>
2041<li>
2042<p>
2043a space between time and time zone
2044</p>
2045</li>
2046<li>
2047<p>
2048no colon between hours and minutes of the time zone
2049</p>
2050</li>
2051</ul></div>
2052<div class="paragraph"><p><code>--date=iso-strict</code> (or <code>--date=iso8601-strict</code>) shows timestamps in strict
2053ISO 8601 format.</p></div>
2054<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:112055format, often found in email messages.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512056<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:492057<div class="paragraph"><p><code>--date=raw</code> shows the date as seconds since the epoch (1970-01-01
205800:00:00 UTC), followed by a space, and then the timezone as an offset
2059from UTC (a <code>+</code> or <code>-</code> with four digits; the first two are hours, and
2060the second two are minutes). I.e., as if the timestamp were formatted
2061with <code>strftime("%s %z")</code>).
2062Note that the <code>-local</code> option does not affect the seconds-since-epoch
2063value (which is always measured in UTC), but does switch the accompanying
2064timezone value.</p></div>
2065<div class="paragraph"><p><code>--date=unix</code> shows the date as a Unix epoch timestamp (seconds since
20661970). As with <code>--raw</code>, this is always in UTC and therefore <code>-local</code>
2067has no effect.</p></div>
Junio C Hamanod7ed4042015-08-03 19:43:002068<div class="paragraph"><p><code>--date=format:...</code> feeds the format <code>...</code> to your system <code>strftime</code>.
2069Use <code>--date=format:%c</code> to show the date in your system locale&#8217;s
2070preferred format. See the <code>strftime</code> manual for a complete list of
Junio C Hamano1eb56092015-10-05 20:39:532071format placeholders. When using <code>-local</code>, the correct syntax is
2072<code>--date=format-local:...</code>.</p></div>
2073<div class="paragraph"><p><code>--date=default</code> is the default format, and is similar to
2074<code>--date=rfc2822</code>, with a few exceptions:</p></div>
2075<div class="ulist"><ul>
2076<li>
2077<p>
2078there is no comma after the day-of-week
2079</p>
2080</li>
2081<li>
2082<p>
2083the time zone is omitted when the local time zone is used
2084</p>
2085</li>
2086</ul></div>
Junio C Hamanod2c978f2011-03-20 19:42:222087</dd>
2088<dt class="hdlist1">
2089--parents
2090</dt>
2091<dd>
2092<p>
2093 Print also the parents of the commit (in the form "commit parent&#8230;").
2094 Also enables parent rewriting, see <em>History Simplification</em> below.
2095</p>
2096</dd>
2097<dt class="hdlist1">
2098--children
2099</dt>
2100<dd>
2101<p>
2102 Print also the children of the commit (in the form "commit child&#8230;").
2103 Also enables parent rewriting, see <em>History Simplification</em> below.
2104</p>
2105</dd>
2106<dt class="hdlist1">
2107--left-right
2108</dt>
2109<dd>
2110<p>
Junio C Hamanocd451662016-09-13 00:54:092111 Mark which side of a symmetric difference a commit is reachable from.
Junio C Hamanoac12f0e2014-09-19 22:32:512112 Commits from the left side are prefixed with <code>&lt;</code> and those from
2113 the right with <code>&gt;</code>. If combined with <code>--boundary</code>, those
2114 commits are prefixed with <code>-</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222115</p>
2116<div class="paragraph"><p>For example, if you have this topology:</p></div>
2117<div class="listingblock">
2118<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512119<pre><code> y---b---b branch B
Junio C Hamanod2c978f2011-03-20 19:42:222120 / \ /
2121 / .
2122 / / \
Junio C Hamanoac12f0e2014-09-19 22:32:512123 o---x---a---a branch A</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222124</div></div>
2125<div class="paragraph"><p>you would get an output like this:</p></div>
2126<div class="listingblock">
2127<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512128<pre><code> $ git rev-list --left-right --boundary --pretty=oneline A...B
Junio C Hamanod2c978f2011-03-20 19:42:222129
2130 &gt;bbbbbbb... 3rd on b
2131 &gt;bbbbbbb... 2nd on b
2132 &lt;aaaaaaa... 3rd on a
2133 &lt;aaaaaaa... 2nd on a
2134 -yyyyyyy... 1st on b
Junio C Hamanoac12f0e2014-09-19 22:32:512135 -xxxxxxx... 1st on a</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222136</div></div>
2137</dd>
2138<dt class="hdlist1">
2139--graph
2140</dt>
2141<dd>
2142<p>
2143 Draw a text-based graphical representation of the commit history
2144 on the left hand side of the output. This may cause extra lines
2145 to be printed in between commits, in order for the graph history
2146 to be drawn properly.
Junio C Hamanoef57d1e2015-03-25 21:23:002147 Cannot be combined with <code>--no-walk</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222148</p>
2149<div class="paragraph"><p>This enables parent rewriting, see <em>History Simplification</em> below.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512150<div class="paragraph"><p>This implies the <code>--topo-order</code> option by default, but the
2151<code>--date-order</code> option may also be specified.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:222152</dd>
Junio C Hamano624dd4c2014-04-03 21:56:302153<dt class="hdlist1">
2154--show-linear-break[=&lt;barrier&gt;]
2155</dt>
2156<dd>
2157<p>
2158 When --graph is not used, all history branches are flattened
2159 which can make it hard to see that the two consecutive commits
2160 do not belong to a linear branch. This option puts a barrier
Junio C Hamanoac12f0e2014-09-19 22:32:512161 in between them in that case. If <code>&lt;barrier&gt;</code> is specified, it
Junio C Hamano624dd4c2014-04-03 21:56:302162 is the string that will be shown instead of the default one.
2163</p>
2164</dd>
Junio C Hamanod2c978f2011-03-20 19:42:222165</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:272166</div>
2167<div class="sect2">
2168<h3 id="_diff_formatting">Diff Formatting</h3>
Junio C Hamanob73af6c2013-12-03 22:07:112169<div class="paragraph"><p>Listed below are options that control the formatting of diff output.
Junio C Hamanoa28a9202012-06-21 07:08:232170Some of them are specific to <a href="git-rev-list.html">git-rev-list(1)</a>, however other diff
2171options 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:222172<div class="dlist"><dl>
2173<dt class="hdlist1">
2174-c
2175</dt>
2176<dd>
2177<p>
2178 With this option, diff output for a merge commit
2179 shows the differences from each of the parents to the merge result
2180 simultaneously instead of showing pairwise diff between a parent
2181 and the result one at a time. Furthermore, it lists only files
2182 which were modified from all parents.
2183</p>
2184</dd>
2185<dt class="hdlist1">
2186--cc
2187</dt>
2188<dd>
2189<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512190 This flag implies the <code>-c</code> option and further compresses the
Junio C Hamanod2c978f2011-03-20 19:42:222191 patch output by omitting uninteresting hunks whose contents in
2192 the parents have only two variants and the merge result picks
2193 one of them without modification.
2194</p>
2195</dd>
2196<dt class="hdlist1">
2197-m
2198</dt>
2199<dd>
2200<p>
2201 This flag makes the merge commits show the full diff like
2202 regular commits; for each merge parent, a separate log entry
2203 and diff is generated. An exception is that only diff against
Junio C Hamanoac12f0e2014-09-19 22:32:512204 the first parent is shown when <code>--first-parent</code> option is given;
Junio C Hamanod2c978f2011-03-20 19:42:222205 in that case, the output represents the changes the merge
2206 brought <em>into</em> the then-current branch.
2207</p>
2208</dd>
2209<dt class="hdlist1">
2210-r
2211</dt>
2212<dd>
2213<p>
2214 Show recursive diffs.
2215</p>
2216</dd>
2217<dt class="hdlist1">
2218-t
2219</dt>
2220<dd>
2221<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512222 Show the tree objects in the diff output. This implies <code>-r</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222223</p>
2224</dd>
Junio C Hamanod2c978f2011-03-20 19:42:222225</dl></div>
Junio C Hamano0430e3a2007-05-15 03:13:172226</div>
Junio C Hamano9629d4f2012-12-19 00:28:272227</div>
2228</div>
2229<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312230<h2 id="_pretty_formats">PRETTY FORMATS</h2>
Junio C Hamano0430e3a2007-05-15 03:13:172231<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592232<div class="paragraph"><p>If the commit is a merge, and if the pretty-format
Junio C Hamano0430e3a2007-05-15 03:13:172233is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
2234inserted before the <em>Author:</em> line. This line begins with
2235"Merge: " and the sha1s of ancestral commits are printed,
2236separated by spaces. Note that the listed commits may not
2237necessarily be the list of the <strong>direct</strong> parent commits if you
2238have limited your view of history: for example, if you are
2239only interested in changes related to a certain directory or
Junio C Hamanoba4b9282008-07-06 05:20:312240file.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592241<div class="paragraph"><p>There are several built-in formats, and you can define
Junio C Hamanoa574a092010-06-13 19:57:102242additional formats by setting a pretty.&lt;name&gt;
2243config option to either another format name, or a
2244<em>format:</em> string, as described below (see
Junio C Hamanoa28a9202012-06-21 07:08:232245<a href="git-config.html">git-config(1)</a>). Here are the details of the
Junio C Hamanoa574a092010-06-13 19:57:102246built-in formats:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592247<div class="ulist"><ul>
Junio C Hamanoa340aaa2006-11-23 02:47:332248<li>
2249<p>
2250<em>oneline</em>
2251</p>
2252<div class="literalblock">
2253<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512254<pre><code>&lt;sha1&gt; &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332255</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592256<div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:332257</li>
2258<li>
2259<p>
2260<em>short</em>
2261</p>
2262<div class="literalblock">
2263<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512264<pre><code>commit &lt;sha1&gt;
2265Author: &lt;author&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332266</div></div>
2267<div class="literalblock">
2268<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512269<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332270</div></div>
2271</li>
2272<li>
2273<p>
2274<em>medium</em>
2275</p>
2276<div class="literalblock">
2277<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512278<pre><code>commit &lt;sha1&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332279Author: &lt;author&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512280Date: &lt;author date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332281</div></div>
2282<div class="literalblock">
2283<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512284<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332285</div></div>
2286<div class="literalblock">
2287<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512288<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332289</div></div>
2290</li>
2291<li>
2292<p>
2293<em>full</em>
2294</p>
2295<div class="literalblock">
2296<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512297<pre><code>commit &lt;sha1&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332298Author: &lt;author&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512299Commit: &lt;committer&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332300</div></div>
2301<div class="literalblock">
2302<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512303<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332304</div></div>
2305<div class="literalblock">
2306<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512307<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332308</div></div>
2309</li>
2310<li>
2311<p>
2312<em>fuller</em>
2313</p>
2314<div class="literalblock">
2315<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512316<pre><code>commit &lt;sha1&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182317Author: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312318AuthorDate: &lt;author date&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182319Commit: &lt;committer&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512320CommitDate: &lt;committer date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332321</div></div>
2322<div class="literalblock">
2323<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512324<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332325</div></div>
2326<div class="literalblock">
2327<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512328<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332329</div></div>
2330</li>
2331<li>
2332<p>
2333<em>email</em>
2334</p>
2335<div class="literalblock">
2336<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512337<pre><code>From &lt;sha1&gt; &lt;date&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332338From: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312339Date: &lt;author date&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512340Subject: [PATCH] &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332341</div></div>
2342<div class="literalblock">
2343<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512344<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332345</div></div>
2346</li>
2347<li>
2348<p>
2349<em>raw</em>
2350</p>
Junio C Hamano68cf15a2010-11-06 01:01:592351<div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
Junio C Hamanoe3f080d2013-04-22 02:27:132352stored in the commit object. Notably, the SHA-1s are
Junio C Hamanoa340aaa2006-11-23 02:47:332353displayed in full, regardless of whether --abbrev or
2354--no-abbrev are used, and <em>parents</em> information show the
Junio C Hamanod75148a2014-04-08 19:48:382355true parent commits, without taking grafts or history
Junio C Hamano85f1fde2015-06-01 20:37:322356simplification into account. Note that this format affects the way
2357commits are displayed, but not the way the diff is shown e.g. with
2358<code>git log --raw</code>. To get full object names in a raw diff format,
2359use <code>--no-abbrev</code>.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:332360</li>
Junio C Hamanoa3fd83c2007-03-02 10:34:362361<li>
2362<p>
Junio C Hamanoe32ec8b2010-06-02 23:32:312363<em>format:&lt;string&gt;</em>
Junio C Hamanoa3fd83c2007-03-02 10:34:362364</p>
Junio C Hamano68cf15a2010-11-06 01:01:592365<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:362366you want to show. It works a little bit like printf format,
2367with the notable exception that you get a newline with <em>%n</em>
Junio C Hamanoba4b9282008-07-06 05:20:312368instead of <em>\n</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592369<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:312370would show something like this:</p></div>
Junio C Hamano0430e3a2007-05-15 03:13:172371<div class="listingblock">
2372<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512373<pre><code>The author of fe6e0ee was Junio C Hamano, 23 hours ago
2374The 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:172375</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592376<div class="paragraph"><p>The placeholders are:</p></div>
2377<div class="ulist"><ul>
Junio C Hamanoa3fd83c2007-03-02 10:34:362378<li>
2379<p>
2380<em>%H</em>: commit hash
2381</p>
2382</li>
2383<li>
2384<p>
2385<em>%h</em>: abbreviated commit hash
2386</p>
2387</li>
2388<li>
2389<p>
2390<em>%T</em>: tree hash
2391</p>
2392</li>
2393<li>
2394<p>
2395<em>%t</em>: abbreviated tree hash
2396</p>
2397</li>
2398<li>
2399<p>
2400<em>%P</em>: parent hashes
2401</p>
2402</li>
2403<li>
2404<p>
2405<em>%p</em>: abbreviated parent hashes
2406</p>
2407</li>
2408<li>
2409<p>
2410<em>%an</em>: author name
2411</p>
2412</li>
2413<li>
2414<p>
Junio C Hamano04e768d2013-04-23 19:19:262415<em>%aN</em>: author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2416 or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamanof5a93622008-07-16 03:23:572417</p>
2418</li>
2419<li>
2420<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362421<em>%ae</em>: author email
2422</p>
2423</li>
2424<li>
2425<p>
Junio C Hamano04e768d2013-04-23 19:19:262426<em>%aE</em>: author email (respecting .mailmap, see
2427 <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:192428</p>
2429</li>
2430<li>
2431<p>
Junio C Hamanoa387df32008-08-29 08:56:582432<em>%ad</em>: author date (format respects --date= option)
Junio C Hamanoa3fd83c2007-03-02 10:34:362433</p>
2434</li>
2435<li>
2436<p>
2437<em>%aD</em>: author date, RFC2822 style
2438</p>
2439</li>
2440<li>
2441<p>
2442<em>%ar</em>: author date, relative
2443</p>
2444</li>
2445<li>
2446<p>
2447<em>%at</em>: author date, UNIX timestamp
2448</p>
2449</li>
2450<li>
2451<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512452<em>%ai</em>: author date, ISO 8601-like format
2453</p>
2454</li>
2455<li>
2456<p>
2457<em>%aI</em>: author date, strict ISO 8601 format
Junio C Hamano02f130b2007-07-14 08:26:562458</p>
2459</li>
2460<li>
2461<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362462<em>%cn</em>: committer name
2463</p>
2464</li>
2465<li>
2466<p>
Junio C Hamano04e768d2013-04-23 19:19:262467<em>%cN</em>: committer name (respecting .mailmap, see
2468 <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:572469</p>
2470</li>
2471<li>
2472<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362473<em>%ce</em>: committer email
2474</p>
2475</li>
2476<li>
2477<p>
Junio C Hamano04e768d2013-04-23 19:19:262478<em>%cE</em>: committer email (respecting .mailmap, see
2479 <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:192480</p>
2481</li>
2482<li>
2483<p>
Junio C Hamano53fe0312014-09-09 21:16:172484<em>%cd</em>: committer date (format respects --date= option)
Junio C Hamanoa3fd83c2007-03-02 10:34:362485</p>
2486</li>
2487<li>
2488<p>
2489<em>%cD</em>: committer date, RFC2822 style
2490</p>
2491</li>
2492<li>
2493<p>
2494<em>%cr</em>: committer date, relative
2495</p>
2496</li>
2497<li>
2498<p>
2499<em>%ct</em>: committer date, UNIX timestamp
2500</p>
2501</li>
2502<li>
2503<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512504<em>%ci</em>: committer date, ISO 8601-like format
2505</p>
2506</li>
2507<li>
2508<p>
2509<em>%cI</em>: committer date, strict ISO 8601 format
Junio C Hamano02f130b2007-07-14 08:26:562510</p>
2511</li>
2512<li>
2513<p>
Junio C Hamanoa28a9202012-06-21 07:08:232514<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:022515</p>
2516</li>
2517<li>
2518<p>
Junio C Hamano00b9f1a2014-09-29 23:11:282519<em>%D</em>: ref names without the " (", ")" wrapping.
2520</p>
2521</li>
2522<li>
2523<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362524<em>%e</em>: encoding
2525</p>
2526</li>
2527<li>
2528<p>
2529<em>%s</em>: subject
2530</p>
2531</li>
2532<li>
2533<p>
Junio C Hamano5f9a6f02009-04-06 08:26:562534<em>%f</em>: sanitized subject line, suitable for a filename
2535</p>
2536</li>
2537<li>
2538<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362539<em>%b</em>: body
2540</p>
2541</li>
2542<li>
2543<p>
Junio C Hamanocb39aea2010-05-09 07:24:482544<em>%B</em>: raw body (unwrapped subject and body)
2545</p>
2546</li>
2547<li>
2548<p>
Junio C Hamano3b70d3c2009-11-21 17:37:372549<em>%N</em>: commit notes
2550</p>
2551</li>
2552<li>
2553<p>
Junio C Hamano0acb1ae2012-09-24 21:28:132554<em>%GG</em>: raw verification message from GPG for a signed commit
2555</p>
2556</li>
2557<li>
2558<p>
Junio C Hamano198b1f12016-05-17 22:27:242559<em>%G?</em>: show "G" for a good (valid) signature, "B" for a bad signature,
2560 "U" for a good signature with unknown validity and "N" for no signature
Junio C Hamano0acb1ae2012-09-24 21:28:132561</p>
2562</li>
2563<li>
2564<p>
2565<em>%GS</em>: show the name of the signer for a signed commit
2566</p>
2567</li>
2568<li>
2569<p>
Junio C Hamano5e7f1312013-03-21 22:49:012570<em>%GK</em>: show the key used to sign a signed commit
2571</p>
2572</li>
2573<li>
2574<p>
Junio C Hamanoe548d1b2016-08-08 22:26:492575<em>%gD</em>: reflog selector, e.g., <code>refs/stash@{1}</code> or
2576 <code>refs/stash@{2 minutes ago</code>}; the format follows the rules described
2577 for the <code>-g</code> option. The portion before the <code>@</code> is the refname as
2578 given on the command line (so <code>git log -g refs/heads/master</code> would
2579 yield <code>refs/heads/master@{0}</code>).
Junio C Hamanoc21ab052009-10-31 04:03:552580</p>
2581</li>
2582<li>
2583<p>
Junio C Hamanoe548d1b2016-08-08 22:26:492584<em>%gd</em>: shortened reflog selector; same as <code>%gD</code>, but the refname
2585 portion is shortened for human readability (so <code>refs/heads/master</code>
2586 becomes just <code>master</code>).
Junio C Hamanoc21ab052009-10-31 04:03:552587</p>
2588</li>
2589<li>
2590<p>
Junio C Hamano962f3a32011-12-22 20:21:442591<em>%gn</em>: reflog identity name
2592</p>
2593</li>
2594<li>
2595<p>
Junio C Hamano04e768d2013-04-23 19:19:262596<em>%gN</em>: reflog identity name (respecting .mailmap, see
2597 <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:442598</p>
2599</li>
2600<li>
2601<p>
2602<em>%ge</em>: reflog identity email
2603</p>
2604</li>
2605<li>
2606<p>
Junio C Hamano04e768d2013-04-23 19:19:262607<em>%gE</em>: reflog identity email (respecting .mailmap, see
2608 <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:442609</p>
2610</li>
2611<li>
2612<p>
Junio C Hamanoc21ab052009-10-31 04:03:552613<em>%gs</em>: reflog subject
2614</p>
2615</li>
2616<li>
2617<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362618<em>%Cred</em>: switch color to red
2619</p>
2620</li>
2621<li>
2622<p>
2623<em>%Cgreen</em>: switch color to green
2624</p>
2625</li>
2626<li>
2627<p>
2628<em>%Cblue</em>: switch color to blue
2629</p>
2630</li>
2631<li>
2632<p>
2633<em>%Creset</em>: reset color
2634</p>
2635</li>
2636<li>
2637<p>
Junio C Hamanoabad6da2013-01-06 09:06:322638<em>%C(&#8230;)</em>: color specification, as described in color.branch.* config option;
Junio C Hamanoac12f0e2014-09-19 22:32:512639 adding <code>auto,</code> at the beginning will emit color only when colors are
2640 enabled for log output (by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and
2641 respecting the <code>auto</code> settings of the former if we are going to a
2642 terminal). <code>auto</code> alone (i.e. <code>%C(auto)</code>) will turn on auto coloring
Junio C Hamano04e768d2013-04-23 19:19:262643 on the next placeholders until the color is switched again.
Junio C Hamanocc0cb312009-01-22 03:38:502644</p>
2645</li>
2646<li>
2647<p>
Junio C Hamanocd451662016-09-13 00:54:092648<em>%m</em>: left (<code>&lt;</code>), right (<code>&gt;</code>) or boundary (<code>-</code>) mark
Junio C Hamanod9e0e5d2007-04-14 16:22:042649</p>
2650</li>
2651<li>
2652<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362653<em>%n</em>: newline
2654</p>
Junio C Hamano0430e3a2007-05-15 03:13:172655</li>
Junio C Hamanob78d2592008-04-09 09:39:082656<li>
2657<p>
Junio C Hamanoa9701f02010-01-21 00:42:162658<em>%%</em>: a raw <em>%</em>
2659</p>
2660</li>
2661<li>
2662<p>
Junio C Hamanob78d2592008-04-09 09:39:082663<em>%x00</em>: print a byte from a hex code
2664</p>
2665</li>
Junio C Hamanobf984de2009-11-23 06:11:192666<li>
2667<p>
2668<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:232669 <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanobf984de2009-11-23 06:11:192670</p>
2671</li>
Junio C Hamano04e768d2013-04-23 19:19:262672<li>
2673<p>
2674<em>%&lt;(&lt;N&gt;[,trunc|ltrunc|mtrunc])</em>: make the next placeholder take at
2675 least N columns, padding spaces on the right if necessary.
2676 Optionally truncate at the beginning (ltrunc), the middle (mtrunc)
2677 or the end (trunc) if the output is longer than N columns.
2678 Note that truncating only works correctly with N &gt;= 2.
2679</p>
2680</li>
2681<li>
2682<p>
2683<em>%&lt;|(&lt;N&gt;)</em>: make the next placeholder take at least until Nth
2684 columns, padding spaces on the right if necessary
2685</p>
2686</li>
2687<li>
2688<p>
2689<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>
2690 respectively, but padding spaces on the left
2691</p>
2692</li>
2693<li>
2694<p>
2695<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>
2696 respectively, except that if the next placeholder takes more spaces
2697 than given and there are spaces on its left, use those spaces
2698</p>
2699</li>
2700<li>
2701<p>
2702<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>
2703 respectively, but padding both sides (i.e. the text is centered)
2704</p>
2705</li>
Junio C Hamanoba4b9282008-07-06 05:20:312706</ul></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:362707</li>
Junio C Hamanoc21ab052009-10-31 04:03:552708</ul></div>
2709<div class="admonitionblock">
2710<table><tr>
2711<td class="icon">
2712<div class="title">Note</div>
2713</td>
2714<td class="content">Some placeholders may depend on other options given to the
Junio C Hamanoac12f0e2014-09-19 22:32:512715revision traversal engine. For example, the <code>%g*</code> reflog options will
Junio C Hamanoc21ab052009-10-31 04:03:552716insert an empty string unless we are traversing reflog entries (e.g., by
Junio C Hamano00b9f1a2014-09-29 23:11:282717<code>git log -g</code>). The <code>%d</code> and <code>%D</code> placeholders will use the "short"
2718decoration format if <code>--decorate</code> was not already provided on the command
2719line.</td>
Junio C Hamanoc21ab052009-10-31 04:03:552720</tr></table>
2721</div>
Junio C Hamanoac12f0e2014-09-19 22:32:512722<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:592723is inserted immediately before the expansion if and only if the
2724placeholder expands to a non-empty string.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512725<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:592726immediately precede the expansion are deleted if and only if the
2727placeholder expands to an empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592728<div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
Junio C Hamano89a57342010-06-22 23:22:552729is inserted immediately before the expansion if and only if the
2730placeholder expands to a non-empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592731<div class="ulist"><ul>
Junio C Hamano6fb124c2008-06-13 10:04:012732<li>
2733<p>
2734<em>tformat:</em>
2735</p>
Junio C Hamano68cf15a2010-11-06 01:01:592736<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:012737provides "terminator" semantics instead of "separator" semantics. In
2738other words, each commit has the message terminator character (usually a
2739newline) appended, rather than a separator placed between entries.
2740This means that the final entry of a single-line format will be properly
2741terminated with a new line, just as the "oneline" format does.
Junio C Hamanoba4b9282008-07-06 05:20:312742For example:</p></div>
Junio C Hamano6fb124c2008-06-13 10:04:012743<div class="listingblock">
2744<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512745<pre><code>$ git log -2 --pretty=format:%h 4da45bef \
Junio C Hamano6fb124c2008-06-13 10:04:012746 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
27474da45be
27487134973 -- NO NEWLINE
2749
2750$ git log -2 --pretty=tformat:%h 4da45bef \
2751 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
27524da45be
Junio C Hamanoac12f0e2014-09-19 22:32:5127537134973</code></pre>
Junio C Hamano6fb124c2008-06-13 10:04:012754</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512755<div class="paragraph"><p>In addition, any unrecognized string that has a <code>%</code> in it is interpreted
2756as if it has <code>tformat:</code> in front of it. For example, these two are
Junio C Hamano0a235222009-03-06 08:21:092757equivalent:</p></div>
2758<div class="listingblock">
2759<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512760<pre><code>$ git log -2 --pretty=tformat:%h 4da45bef
2761$ git log -2 --pretty=%h 4da45bef</code></pre>
Junio C Hamano0a235222009-03-06 08:21:092762</div></div>
Junio C Hamano6fb124c2008-06-13 10:04:012763</li>
Junio C Hamanoba4b9282008-07-06 05:20:312764</ul></div>
Junio C Hamano1a4e8412005-12-27 08:17:232765</div>
Junio C Hamano9629d4f2012-12-19 00:28:272766</div>
2767<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:592768<h2 id="_common_diff_options">COMMON DIFF OPTIONS</h2>
Junio C Hamanod2c978f2011-03-20 19:42:222769<div class="sectionbody">
2770<div class="dlist"><dl>
2771<dt class="hdlist1">
2772-p
2773</dt>
2774<dt class="hdlist1">
2775-u
2776</dt>
2777<dt class="hdlist1">
2778--patch
2779</dt>
2780<dd>
2781<p>
2782 Generate patch (see section on generating patches).
Junio C Hamanod2c978f2011-03-20 19:42:222783</p>
2784</dd>
2785<dt class="hdlist1">
Junio C Hamano58f587a2013-07-22 19:20:592786-s
2787</dt>
2788<dt class="hdlist1">
2789--no-patch
2790</dt>
2791<dd>
2792<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512793 Suppress diff output. Useful for commands like <code>git show</code> that
2794 show the patch by default, or to cancel the effect of <code>--patch</code>.
Junio C Hamano58f587a2013-07-22 19:20:592795</p>
2796</dd>
2797<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222798-U&lt;n&gt;
2799</dt>
2800<dt class="hdlist1">
2801--unified=&lt;n&gt;
2802</dt>
2803<dd>
2804<p>
2805 Generate diffs with &lt;n&gt; lines of context instead of
2806 the usual three.
Junio C Hamanoac12f0e2014-09-19 22:32:512807 Implies <code>-p</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222808</p>
2809</dd>
2810<dt class="hdlist1">
2811--raw
2812</dt>
2813<dd>
2814<p>
Junio C Hamano85f1fde2015-06-01 20:37:322815 For each commit, show a summary of changes using the raw diff
2816 format. See the "RAW OUTPUT FORMAT" section of
2817 <a href="git-diff.html">git-diff(1)</a>. This is different from showing the log
2818 itself in raw format, which you can achieve with
2819 <code>--format=raw</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222820</p>
2821</dd>
2822<dt class="hdlist1">
2823--patch-with-raw
2824</dt>
2825<dd>
2826<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512827 Synonym for <code>-p --raw</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222828</p>
2829</dd>
2830<dt class="hdlist1">
Junio C Hamanoad70bf02016-09-26 23:44:272831--indent-heuristic
2832</dt>
2833<dt class="hdlist1">
2834--no-indent-heuristic
2835</dt>
2836<dt class="hdlist1">
Junio C Hamano5f888332016-06-13 19:28:312837--compaction-heuristic
2838</dt>
2839<dt class="hdlist1">
2840--no-compaction-heuristic
2841</dt>
2842<dd>
2843<p>
Junio C Hamanoad70bf02016-09-26 23:44:272844 These are to help debugging and tuning experimental heuristics
2845 (which are off by default) that shift diff hunk boundaries to
2846 make patches easier to read.
Junio C Hamano5f888332016-06-13 19:28:312847</p>
2848</dd>
2849<dt class="hdlist1">
Junio C Hamano5a73f302011-10-14 05:58:342850--minimal
2851</dt>
2852<dd>
2853<p>
2854 Spend extra time to make sure the smallest possible
2855 diff is produced.
2856</p>
2857</dd>
2858<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222859--patience
2860</dt>
2861<dd>
2862<p>
2863 Generate a diff using the "patience diff" algorithm.
2864</p>
2865</dd>
2866<dt class="hdlist1">
Junio C Hamanoaea9e6b2012-03-07 00:17:112867--histogram
2868</dt>
2869<dd>
2870<p>
2871 Generate a diff using the "histogram diff" algorithm.
2872</p>
2873</dd>
2874<dt class="hdlist1">
Junio C Hamano80ad00d2013-02-18 00:19:032875--diff-algorithm={patience|minimal|histogram|myers}
2876</dt>
2877<dd>
2878<p>
2879 Choose a diff algorithm. The variants are as follows:
2880</p>
2881<div class="openblock">
2882<div class="content">
2883<div class="dlist"><dl>
2884<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512885<code>default</code>, <code>myers</code>
Junio C Hamano80ad00d2013-02-18 00:19:032886</dt>
2887<dd>
2888<p>
2889 The basic greedy diff algorithm. Currently, this is the default.
2890</p>
2891</dd>
2892<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512893<code>minimal</code>
Junio C Hamano80ad00d2013-02-18 00:19:032894</dt>
2895<dd>
2896<p>
2897 Spend extra time to make sure the smallest possible diff is
2898 produced.
2899</p>
2900</dd>
2901<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512902<code>patience</code>
Junio C Hamano80ad00d2013-02-18 00:19:032903</dt>
2904<dd>
2905<p>
2906 Use "patience diff" algorithm when generating patches.
2907</p>
2908</dd>
2909<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512910<code>histogram</code>
Junio C Hamano80ad00d2013-02-18 00:19:032911</dt>
2912<dd>
2913<p>
2914 This algorithm extends the patience algorithm to "support
2915 low-occurrence common elements".
2916</p>
2917</dd>
2918</dl></div>
2919</div></div>
2920<div class="paragraph"><p>For instance, if you configured diff.algorithm variable to a
2921non-default value and want to use the default one, then you
Junio C Hamanoac12f0e2014-09-19 22:32:512922have to use <code>--diff-algorithm=default</code> option.</p></div>
Junio C Hamano80ad00d2013-02-18 00:19:032923</dd>
2924<dt class="hdlist1">
Junio C Hamano4c4b0122011-06-30 01:19:322925--stat[=&lt;width&gt;[,&lt;name-width&gt;[,&lt;count&gt;]]]
Junio C Hamanod2c978f2011-03-20 19:42:222926</dt>
2927<dd>
2928<p>
Junio C Hamanoaea9e6b2012-03-07 00:17:112929 Generate a diffstat. By default, as much space as necessary
2930 will be used for the filename part, and the rest for the graph
2931 part. Maximum width defaults to terminal width, or 80 columns
Junio C Hamano7f2b3cb2012-06-22 22:42:392932 if not connected to a terminal, and can be overridden by
Junio C Hamanoac12f0e2014-09-19 22:32:512933 <code>&lt;width&gt;</code>. The width of the filename part can be limited by
2934 giving another width <code>&lt;name-width&gt;</code> after a comma. The width
Junio C Hamanoaea9e6b2012-03-07 00:17:112935 of the graph part can be limited by using
Junio C Hamanoac12f0e2014-09-19 22:32:512936 <code>--stat-graph-width=&lt;width&gt;</code> (affects all commands generating
2937 a stat graph) or by setting <code>diff.statGraphWidth=&lt;width&gt;</code>
2938 (does not affect <code>git format-patch</code>).
2939 By giving a third parameter <code>&lt;count&gt;</code>, you can limit the
2940 output to the first <code>&lt;count&gt;</code> lines, followed by <code>...</code> if
Junio C Hamanoaea9e6b2012-03-07 00:17:112941 there are more.
Junio C Hamanod2c978f2011-03-20 19:42:222942</p>
Junio C Hamanoac12f0e2014-09-19 22:32:512943<div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=&lt;width&gt;</code>,
2944<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:222945</dd>
2946<dt class="hdlist1">
2947--numstat
2948</dt>
2949<dd>
2950<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512951 Similar to <code>--stat</code>, but shows number of added and
Junio C Hamanod2c978f2011-03-20 19:42:222952 deleted lines in decimal notation and pathname without
2953 abbreviation, to make it more machine friendly. For
Junio C Hamanoac12f0e2014-09-19 22:32:512954 binary files, outputs two <code>-</code> instead of saying
2955 <code>0 0</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222956</p>
2957</dd>
2958<dt class="hdlist1">
2959--shortstat
2960</dt>
2961<dd>
2962<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512963 Output only the last line of the <code>--stat</code> format containing total
Junio C Hamanod2c978f2011-03-20 19:42:222964 number of modified files, as well as number of added and deleted
2965 lines.
2966</p>
2967</dd>
2968<dt class="hdlist1">
Junio C Hamano1c222c52011-05-13 19:55:322969--dirstat[=&lt;param1,param2,&#8230;&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:222970</dt>
2971<dd>
2972<p>
Junio C Hamano1c222c52011-05-13 19:55:322973 Output the distribution of relative amount of changes for each
Junio C Hamanoac12f0e2014-09-19 22:32:512974 sub-directory. The behavior of <code>--dirstat</code> can be customized by
Junio C Hamano1c222c52011-05-13 19:55:322975 passing it a comma separated list of parameters.
Junio C Hamanoac12f0e2014-09-19 22:32:512976 The defaults are controlled by the <code>diff.dirstat</code> configuration
Junio C Hamanoa28a9202012-06-21 07:08:232977 variable (see <a href="git-config.html">git-config(1)</a>).
Junio C Hamano1c222c52011-05-13 19:55:322978 The following parameters are available:
Junio C Hamanod2c978f2011-03-20 19:42:222979</p>
Junio C Hamano9629d4f2012-12-19 00:28:272980<div class="openblock">
2981<div class="content">
Junio C Hamano1c222c52011-05-13 19:55:322982<div class="dlist"><dl>
2983<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512984<code>changes</code>
Junio C Hamano1c222c52011-05-13 19:55:322985</dt>
2986<dd>
2987<p>
2988 Compute the dirstat numbers by counting the lines that have been
2989 removed from the source, or added to the destination. This ignores
2990 the amount of pure code movements within a file. In other words,
2991 rearranging lines in a file is not counted as much as other changes.
2992 This is the default behavior when no parameter is given.
2993</p>
Junio C Hamanod2c978f2011-03-20 19:42:222994</dd>
2995<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512996<code>lines</code>
Junio C Hamanod2c978f2011-03-20 19:42:222997</dt>
2998<dd>
2999<p>
Junio C Hamano1c222c52011-05-13 19:55:323000 Compute the dirstat numbers by doing the regular line-based diff
3001 analysis, and summing the removed/added line counts. (For binary
3002 files, count 64-byte chunks instead, since binary files have no
Junio C Hamanoac12f0e2014-09-19 22:32:513003 natural concept of lines). This is a more expensive <code>--dirstat</code>
3004 behavior than the <code>changes</code> behavior, but it does count rearranged
Junio C Hamano1c222c52011-05-13 19:55:323005 lines within a file as much as other changes. The resulting output
Junio C Hamanoac12f0e2014-09-19 22:32:513006 is consistent with what you get from the other <code>--*stat</code> options.
Junio C Hamanod2c978f2011-03-20 19:42:223007</p>
3008</dd>
3009<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513010<code>files</code>
Junio C Hamano1c222c52011-05-13 19:55:323011</dt>
3012<dd>
3013<p>
3014 Compute the dirstat numbers by counting the number of files changed.
3015 Each changed file counts equally in the dirstat analysis. This is
Junio C Hamanoac12f0e2014-09-19 22:32:513016 the computationally cheapest <code>--dirstat</code> behavior, since it does
Junio C Hamano1c222c52011-05-13 19:55:323017 not have to look at the file contents at all.
3018</p>
3019</dd>
3020<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513021<code>cumulative</code>
Junio C Hamano1c222c52011-05-13 19:55:323022</dt>
3023<dd>
3024<p>
3025 Count changes in a child directory for the parent directory as well.
Junio C Hamanoac12f0e2014-09-19 22:32:513026 Note that when using <code>cumulative</code>, the sum of the percentages
Junio C Hamano1c222c52011-05-13 19:55:323027 reported may exceed 100%. The default (non-cumulative) behavior can
Junio C Hamanoac12f0e2014-09-19 22:32:513028 be specified with the <code>noncumulative</code> parameter.
Junio C Hamano1c222c52011-05-13 19:55:323029</p>
3030</dd>
3031<dt class="hdlist1">
3032&lt;limit&gt;
3033</dt>
3034<dd>
3035<p>
3036 An integer parameter specifies a cut-off percent (3% by default).
3037 Directories contributing less than this percentage of the changes
3038 are not shown in the output.
3039</p>
3040</dd>
3041</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:273042</div></div>
Junio C Hamano1c222c52011-05-13 19:55:323043<div class="paragraph"><p>Example: The following will count changed files, while ignoring
3044directories with less than 10% of the total amount of changed files,
3045and accumulating child directory counts in the parent directories:
Junio C Hamanoac12f0e2014-09-19 22:32:513046<code>--dirstat=files,10,cumulative</code>.</p></div>
Junio C Hamano1c222c52011-05-13 19:55:323047</dd>
3048<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223049--summary
3050</dt>
3051<dd>
3052<p>
3053 Output a condensed summary of extended header information
3054 such as creations, renames and mode changes.
3055</p>
3056</dd>
3057<dt class="hdlist1">
3058--patch-with-stat
3059</dt>
3060<dd>
3061<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513062 Synonym for <code>-p --stat</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223063</p>
3064</dd>
3065<dt class="hdlist1">
3066-z
3067</dt>
3068<dd>
3069<p>
3070 Separate the commits with NULs instead of with new newlines.
3071</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513072<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:223073pathnames and use NULs as output field terminators.</p></div>
3074<div class="paragraph"><p>Without this option, each pathname output will have TAB, LF, double quotes,
Junio C Hamanoac12f0e2014-09-19 22:32:513075and backslash characters replaced with <code>\t</code>, <code>\n</code>, <code>\"</code>, and <code>\\</code>,
Junio C Hamanod2c978f2011-03-20 19:42:223076respectively, and the pathname will be enclosed in double quotes if
3077any of those replacements occurred.</p></div>
3078</dd>
3079<dt class="hdlist1">
3080--name-only
3081</dt>
3082<dd>
3083<p>
3084 Show only names of changed files.
3085</p>
3086</dd>
3087<dt class="hdlist1">
3088--name-status
3089</dt>
3090<dd>
3091<p>
3092 Show only names and status of changed files. See the description
Junio C Hamanoac12f0e2014-09-19 22:32:513093 of the <code>--diff-filter</code> option on what the status letters mean.
Junio C Hamanod2c978f2011-03-20 19:42:223094</p>
3095</dd>
3096<dt class="hdlist1">
3097--submodule[=&lt;format&gt;]
3098</dt>
3099<dd>
3100<p>
Junio C Hamanocd451662016-09-13 00:54:093101 Specify how differences in submodules are shown. When specifying
3102 <code>--submodule=short</code> the <em>short</em> format is used. This format just
3103 shows the names of the commits at the beginning and end of the range.
3104 When <code>--submodule</code> or <code>--submodule=log</code> is specified, the <em>log</em>
3105 format is used. This format lists the commits in the range like
3106 <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does. When <code>--submodule=diff</code>
3107 is specified, the <em>diff</em> format is used. This format shows an
3108 inline diff of the changes in the submodule contents between the
3109 commit range. Defaults to <code>diff.submodule</code> or the <em>short</em> format
3110 if the config option is unset.
Junio C Hamanod2c978f2011-03-20 19:42:223111</p>
3112</dd>
3113<dt class="hdlist1">
3114--color[=&lt;when&gt;]
3115</dt>
3116<dd>
3117<p>
3118 Show colored diff.
Junio C Hamanoac12f0e2014-09-19 22:32:513119 <code>--color</code> (i.e. without <em>=&lt;when&gt;</em>) is the same as <code>--color=always</code>.
3120 <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:223121</p>
3122</dd>
3123<dt class="hdlist1">
3124--no-color
3125</dt>
3126<dd>
3127<p>
Junio C Hamano5f2627d2011-05-06 20:23:483128 Turn off colored diff.
Junio C Hamanoac12f0e2014-09-19 22:32:513129 It is the same as <code>--color=never</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223130</p>
3131</dd>
3132<dt class="hdlist1">
3133--word-diff[=&lt;mode&gt;]
3134</dt>
3135<dd>
3136<p>
3137 Show a word diff, using the &lt;mode&gt; to delimit changed words.
3138 By default, words are delimited by whitespace; see
Junio C Hamanoac12f0e2014-09-19 22:32:513139 <code>--word-diff-regex</code> below. The &lt;mode&gt; defaults to <em>plain</em>, and
Junio C Hamanod2c978f2011-03-20 19:42:223140 must be one of:
3141</p>
Junio C Hamano9629d4f2012-12-19 00:28:273142<div class="openblock">
3143<div class="content">
Junio C Hamanod2c978f2011-03-20 19:42:223144<div class="dlist"><dl>
3145<dt class="hdlist1">
3146color
3147</dt>
3148<dd>
3149<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513150 Highlight changed words using only colors. Implies <code>--color</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223151</p>
3152</dd>
3153<dt class="hdlist1">
3154plain
3155</dt>
3156<dd>
3157<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513158 Show words as <code>[-removed-]</code> and <code>{+added+}</code>. Makes no
Junio C Hamanod2c978f2011-03-20 19:42:223159 attempts to escape the delimiters if they appear in the input,
3160 so the output may be ambiguous.
3161</p>
3162</dd>
3163<dt class="hdlist1">
3164porcelain
3165</dt>
3166<dd>
3167<p>
3168 Use a special line-based format intended for script
3169 consumption. Added/removed/unchanged runs are printed in the
Junio C Hamanoac12f0e2014-09-19 22:32:513170 usual unified diff format, starting with a <code>+</code>/<code>-</code>/` `
Junio C Hamanod2c978f2011-03-20 19:42:223171 character at the beginning of the line and extending to the
3172 end of the line. Newlines in the input are represented by a
Junio C Hamanoac12f0e2014-09-19 22:32:513173 tilde <code>~</code> on a line of its own.
Junio C Hamanod2c978f2011-03-20 19:42:223174</p>
3175</dd>
3176<dt class="hdlist1">
3177none
3178</dt>
3179<dd>
3180<p>
3181 Disable word diff again.
3182</p>
3183</dd>
3184</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:273185</div></div>
Junio C Hamanod2c978f2011-03-20 19:42:223186<div class="paragraph"><p>Note that despite the name of the first mode, color is used to
3187highlight the changed parts in all modes if enabled.</p></div>
3188</dd>
3189<dt class="hdlist1">
3190--word-diff-regex=&lt;regex&gt;
3191</dt>
3192<dd>
3193<p>
3194 Use &lt;regex&gt; to decide what a word is, instead of considering
3195 runs of non-whitespace to be a word. Also implies
Junio C Hamanoac12f0e2014-09-19 22:32:513196 <code>--word-diff</code> unless it was already enabled.
Junio C Hamanod2c978f2011-03-20 19:42:223197</p>
3198<div class="paragraph"><p>Every non-overlapping match of the
3199&lt;regex&gt; is considered a word. Anything between these matches is
3200considered whitespace and ignored(!) for the purposes of finding
Junio C Hamanoac12f0e2014-09-19 22:32:513201differences. You may want to append <code>|[^[:space:]]</code> to your regular
Junio C Hamanod2c978f2011-03-20 19:42:223202expression to make sure that it matches all non-whitespace characters.
3203A match that contains a newline is silently truncated(!) at the
3204newline.</p></div>
Junio C Hamano713eded2015-12-03 00:24:023205<div class="paragraph"><p>For example, <code>--word-diff-regex=.</code> will treat each character as a word
3206and, correspondingly, show differences character by character.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223207<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:243208<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:223209overrides any diff driver or configuration setting. Diff drivers
3210override configuration settings.</p></div>
3211</dd>
3212<dt class="hdlist1">
3213--color-words[=&lt;regex&gt;]
3214</dt>
3215<dd>
3216<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513217 Equivalent to <code>--word-diff=color</code> plus (if a regex was
3218 specified) <code>--word-diff-regex=&lt;regex&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223219</p>
3220</dd>
3221<dt class="hdlist1">
3222--no-renames
3223</dt>
3224<dd>
3225<p>
3226 Turn off rename detection, even when the configuration
3227 file gives the default to do so.
3228</p>
3229</dd>
3230<dt class="hdlist1">
3231--check
3232</dt>
3233<dd>
3234<p>
Junio C Hamano84ea1e42016-04-08 21:53:483235 Warn if changes introduce conflict markers or whitespace errors.
3236 What are considered whitespace errors is controlled by <code>core.whitespace</code>
Junio C Hamano6005bfa2011-06-23 00:51:223237 configuration. By default, trailing whitespaces (including
3238 lines that solely consist of whitespaces) and a space character
3239 that is immediately followed by a tab character inside the
3240 initial indent of the line are considered whitespace errors.
3241 Exits with non-zero status if problems are found. Not compatible
3242 with --exit-code.
Junio C Hamanod2c978f2011-03-20 19:42:223243</p>
3244</dd>
3245<dt class="hdlist1">
Junio C Hamano8c5d5942015-06-11 19:37:483246--ws-error-highlight=&lt;kind&gt;
3247</dt>
3248<dd>
3249<p>
3250 Highlight whitespace errors on lines specified by &lt;kind&gt;
3251 in the color specified by <code>color.diff.whitespace</code>. &lt;kind&gt;
3252 is a comma separated list of <code>old</code>, <code>new</code>, <code>context</code>. When
3253 this option is not given, only whitespace errors in <code>new</code>
3254 lines are highlighted. E.g. <code>--ws-error-highlight=new,old</code>
3255 highlights whitespace errors on both deleted and added lines.
3256 <code>all</code> can be used as a short-hand for <code>old,new,context</code>.
3257</p>
3258</dd>
3259<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223260--full-index
3261</dt>
3262<dd>
3263<p>
3264 Instead of the first handful of characters, show the full
3265 pre- and post-image blob object names on the "index"
3266 line when generating patch format output.
3267</p>
3268</dd>
3269<dt class="hdlist1">
3270--binary
3271</dt>
3272<dd>
3273<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513274 In addition to <code>--full-index</code>, output a binary diff that
3275 can be applied with <code>git-apply</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223276</p>
3277</dd>
3278<dt class="hdlist1">
3279--abbrev[=&lt;n&gt;]
3280</dt>
3281<dd>
3282<p>
3283 Instead of showing the full 40-byte hexadecimal object
3284 name in diff-raw format output and diff-tree header
3285 lines, show only a partial prefix. This is
Junio C Hamanoac12f0e2014-09-19 22:32:513286 independent of the <code>--full-index</code> option above, which controls
Junio C Hamanod2c978f2011-03-20 19:42:223287 the diff-patch output format. Non default number of
Junio C Hamanoac12f0e2014-09-19 22:32:513288 digits can be specified with <code>--abbrev=&lt;n&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223289</p>
3290</dd>
3291<dt class="hdlist1">
3292-B[&lt;n&gt;][/&lt;m&gt;]
3293</dt>
3294<dt class="hdlist1">
3295--break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]
3296</dt>
3297<dd>
3298<p>
3299 Break complete rewrite changes into pairs of delete and
3300 create. This serves two purposes:
3301</p>
3302<div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file
3303not as a series of deletion and insertion mixed together with a very
3304few lines that happen to match textually as the context, but as a
3305single deletion of everything old followed by a single insertion of
Junio C Hamanoac12f0e2014-09-19 22:32:513306everything new, and the number <code>m</code> controls this aspect of the -B
3307option (defaults to 60%). <code>-B/70%</code> specifies that less than 30% of the
Junio C Hamano076ffcc2013-02-06 05:13:213308original should remain in the result for Git to consider it a total
Junio C Hamanod2c978f2011-03-20 19:42:223309rewrite (i.e. otherwise the resulting patch will be a series of
3310deletion and insertion mixed together with context lines).</p></div>
3311<div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
3312source of a rename (usually -M only considers a file that disappeared
Junio C Hamanoac12f0e2014-09-19 22:32:513313as the source of a rename), and the number <code>n</code> controls this aspect of
3314the -B option (defaults to 50%). <code>-B20%</code> specifies that a change with
Junio C Hamanod2c978f2011-03-20 19:42:223315addition and deletion compared to 20% or more of the file&#8217;s size are
3316eligible for being picked up as a possible source of a rename to
3317another file.</p></div>
3318</dd>
3319<dt class="hdlist1">
3320-M[&lt;n&gt;]
3321</dt>
3322<dt class="hdlist1">
3323--find-renames[=&lt;n&gt;]
3324</dt>
3325<dd>
3326<p>
3327 If generating diffs, detect and report renames for each commit.
3328 For following files across renames while traversing history, see
Junio C Hamanoac12f0e2014-09-19 22:32:513329 <code>--follow</code>.
3330 If <code>n</code> is specified, it is a threshold on the similarity
Junio C Hamanod2c978f2011-03-20 19:42:223331 index (i.e. amount of addition/deletions compared to the
Junio C Hamanoac12f0e2014-09-19 22:32:513332 file&#8217;s size). For example, <code>-M90%</code> means Git should consider a
Junio C Hamanod2c978f2011-03-20 19:42:223333 delete/add pair to be a rename if more than 90% of the file
Junio C Hamanoac12f0e2014-09-19 22:32:513334 hasn&#8217;t changed. Without a <code>%</code> sign, the number is to be read as
3335 a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes
3336 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is
3337 the same as <code>-M5%</code>. To limit detection to exact renames, use
3338 <code>-M100%</code>. The default similarity index is 50%.
Junio C Hamanod2c978f2011-03-20 19:42:223339</p>
3340</dd>
3341<dt class="hdlist1">
3342-C[&lt;n&gt;]
3343</dt>
3344<dt class="hdlist1">
3345--find-copies[=&lt;n&gt;]
3346</dt>
3347<dd>
3348<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513349 Detect copies as well as renames. See also <code>--find-copies-harder</code>.
3350 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:223351</p>
3352</dd>
3353<dt class="hdlist1">
3354--find-copies-harder
3355</dt>
3356<dd>
3357<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513358 For performance reasons, by default, <code>-C</code> option finds copies only
Junio C Hamanod2c978f2011-03-20 19:42:223359 if the original file of the copy was modified in the same
3360 changeset. This flag makes the command
3361 inspect unmodified files as candidates for the source of
3362 copy. This is a very expensive operation for large
3363 projects, so use it with caution. Giving more than one
Junio C Hamanoac12f0e2014-09-19 22:32:513364 <code>-C</code> option has the same effect.
Junio C Hamanod2c978f2011-03-20 19:42:223365</p>
3366</dd>
3367<dt class="hdlist1">
Junio C Hamanob02377c2011-04-28 22:26:023368-D
3369</dt>
3370<dt class="hdlist1">
3371--irreversible-delete
3372</dt>
3373<dd>
3374<p>
3375 Omit the preimage for deletes, i.e. print only the header but not
Junio C Hamanoac12f0e2014-09-19 22:32:513376 the diff between the preimage and <code>/dev/null</code>. The resulting patch
3377 is not meant to be applied with <code>patch</code> or <code>git apply</code>; this is
Junio C Hamanob02377c2011-04-28 22:26:023378 solely for people who want to just concentrate on reviewing the
3379 text after the change. In addition, the output obviously lack
3380 enough information to apply such a patch in reverse, even manually,
3381 hence the name of the option.
3382</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513383<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:023384of a delete/create pair.</p></div>
3385</dd>
3386<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223387-l&lt;num&gt;
3388</dt>
3389<dd>
3390<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513391 The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n
Junio C Hamanod2c978f2011-03-20 19:42:223392 is the number of potential rename/copy targets. This
3393 option prevents rename/copy detection from running if
3394 the number of rename/copy targets exceeds the specified
3395 number.
3396</p>
3397</dd>
3398<dt class="hdlist1">
3399--diff-filter=[(A|C|D|M|R|T|U|X|B)&#8230;[*]]
3400</dt>
3401<dd>
3402<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513403 Select only files that are Added (<code>A</code>), Copied (<code>C</code>),
3404 Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their
3405 type (i.e. regular file, symlink, submodule, &#8230;) changed (<code>T</code>),
3406 are Unmerged (<code>U</code>), are
3407 Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>).
Junio C Hamanod2c978f2011-03-20 19:42:223408 Any combination of the filter characters (including none) can be used.
Junio C Hamanoac12f0e2014-09-19 22:32:513409 When <code>*</code> (All-or-none) is added to the combination, all
Junio C Hamanod2c978f2011-03-20 19:42:223410 paths are selected if there is any file that matches
3411 other criteria in the comparison; if there is no file
3412 that matches other criteria, nothing is selected.
3413</p>
Junio C Hamanoeed15af2016-07-25 22:49:423414<div class="paragraph"><p>Also, these upper-case letters can be downcased to exclude. E.g.
3415<code>--diff-filter=ad</code> excludes added and deleted paths.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223416</dd>
3417<dt class="hdlist1">
3418-S&lt;string&gt;
3419</dt>
3420<dd>
3421<p>
Junio C Hamanof1f5a7b2013-06-11 22:23:523422 Look for differences that change the number of occurrences of
3423 the specified string (i.e. addition/deletion) in a file.
3424 Intended for the scripter&#8217;s use.
Junio C Hamanod2c978f2011-03-20 19:42:223425</p>
Junio C Hamanof1f5a7b2013-06-11 22:23:523426<div class="paragraph"><p>It is useful when you&#8217;re looking for an exact block of code (like a
3427struct), and want to know the history of that block since it first
3428came into being: use the feature iteratively to feed the interesting
Junio C Hamanoac12f0e2014-09-19 22:32:513429block in the preimage back into <code>-S</code>, and keep going until you get the
Junio C Hamanof1f5a7b2013-06-11 22:23:523430very first version of the block.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223431</dd>
3432<dt class="hdlist1">
3433-G&lt;regex&gt;
3434</dt>
3435<dd>
3436<p>
Junio C Hamanof1f5a7b2013-06-11 22:23:523437 Look for differences whose patch text contains added/removed
3438 lines that match &lt;regex&gt;.
Junio C Hamanod2c978f2011-03-20 19:42:223439</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513440<div class="paragraph"><p>To illustrate the difference between <code>-S&lt;regex&gt; --pickaxe-regex</code> and
3441<code>-G&lt;regex&gt;</code>, consider a commit with the following diff in the same
Junio C Hamanof1f5a7b2013-06-11 22:23:523442file:</p></div>
3443<div class="listingblock">
3444<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513445<pre><code>+ return !regexec(regexp, two-&gt;ptr, 1, &amp;regmatch, 0);
Junio C Hamanof1f5a7b2013-06-11 22:23:523446...
Junio C Hamanoac12f0e2014-09-19 22:32:513447- hit = !regexec(regexp, mf2.ptr, 1, &amp;regmatch, 0);</code></pre>
Junio C Hamanof1f5a7b2013-06-11 22:23:523448</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513449<div class="paragraph"><p>While <code>git log -G"regexec\(regexp"</code> will show this commit, <code>git log
3450-S"regexec\(regexp" --pickaxe-regex</code> will not (because the number of
Junio C Hamanof1f5a7b2013-06-11 22:23:523451occurrences of that string did not change).</p></div>
3452<div class="paragraph"><p>See the <em>pickaxe</em> entry in <a href="gitdiffcore.html">gitdiffcore(7)</a> for more
3453information.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223454</dd>
3455<dt class="hdlist1">
3456--pickaxe-all
3457</dt>
3458<dd>
3459<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513460 When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that
Junio C Hamanod2c978f2011-03-20 19:42:223461 changeset, not just the files that contain the change
3462 in &lt;string&gt;.
3463</p>
3464</dd>
3465<dt class="hdlist1">
3466--pickaxe-regex
3467</dt>
3468<dd>
3469<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513470 Treat the &lt;string&gt; given to <code>-S</code> as an extended POSIX regular
Junio C Hamanof1f5a7b2013-06-11 22:23:523471 expression to match.
Junio C Hamanod2c978f2011-03-20 19:42:223472</p>
3473</dd>
3474<dt class="hdlist1">
3475-O&lt;orderfile&gt;
3476</dt>
3477<dd>
3478<p>
3479 Output the patch in the order specified in the
3480 &lt;orderfile&gt;, which has one shell glob pattern per line.
Junio C Hamano322c6242015-03-23 21:32:463481 This overrides the <code>diff.orderFile</code> configuration variable
3482 (see <a href="git-config.html">git-config(1)</a>). To cancel <code>diff.orderFile</code>,
Junio C Hamanoac12f0e2014-09-19 22:32:513483 use <code>-O/dev/null</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223484</p>
3485</dd>
3486<dt class="hdlist1">
3487-R
3488</dt>
3489<dd>
3490<p>
3491 Swap two inputs; that is, show differences from index or
3492 on-disk file to tree contents.
3493</p>
3494</dd>
3495<dt class="hdlist1">
3496--relative[=&lt;path&gt;]
3497</dt>
3498<dd>
3499<p>
3500 When run from a subdirectory of the project, it can be
3501 told to exclude changes outside the directory and show
3502 pathnames relative to it with this option. When you are
3503 not in a subdirectory (e.g. in a bare repository), you
3504 can name which subdirectory to make the output relative
3505 to by giving a &lt;path&gt; as an argument.
3506</p>
3507</dd>
3508<dt class="hdlist1">
3509-a
3510</dt>
3511<dt class="hdlist1">
3512--text
3513</dt>
3514<dd>
3515<p>
3516 Treat all files as text.
3517</p>
3518</dd>
3519<dt class="hdlist1">
3520--ignore-space-at-eol
3521</dt>
3522<dd>
3523<p>
3524 Ignore changes in whitespace at EOL.
3525</p>
3526</dd>
3527<dt class="hdlist1">
3528-b
3529</dt>
3530<dt class="hdlist1">
3531--ignore-space-change
3532</dt>
3533<dd>
3534<p>
3535 Ignore changes in amount of whitespace. This ignores whitespace
3536 at line end, and considers all other sequences of one or
3537 more whitespace characters to be equivalent.
3538</p>
3539</dd>
3540<dt class="hdlist1">
3541-w
3542</dt>
3543<dt class="hdlist1">
3544--ignore-all-space
3545</dt>
3546<dd>
3547<p>
3548 Ignore whitespace when comparing lines. This ignores
3549 differences even if one line has whitespace where the other
3550 line has none.
3551</p>
3552</dd>
3553<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:183554--ignore-blank-lines
3555</dt>
3556<dd>
3557<p>
3558 Ignore changes whose lines are all blank.
3559</p>
3560</dd>
3561<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223562--inter-hunk-context=&lt;lines&gt;
3563</dt>
3564<dd>
3565<p>
3566 Show the context between diff hunks, up to the specified number
3567 of lines, thereby fusing hunks that are close to each other.
3568</p>
3569</dd>
3570<dt class="hdlist1">
Junio C Hamano11821ed2011-10-19 18:42:093571-W
3572</dt>
3573<dt class="hdlist1">
3574--function-context
3575</dt>
3576<dd>
3577<p>
3578 Show whole surrounding functions of changes.
3579</p>
3580</dd>
3581<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223582--ext-diff
3583</dt>
3584<dd>
3585<p>
3586 Allow an external diff helper to be executed. If you set an
Junio C Hamanoa28a9202012-06-21 07:08:233587 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
3588 to use this option with <a href="git-log.html">git-log(1)</a> and friends.
Junio C Hamanod2c978f2011-03-20 19:42:223589</p>
3590</dd>
3591<dt class="hdlist1">
3592--no-ext-diff
3593</dt>
3594<dd>
3595<p>
3596 Disallow external diff drivers.
3597</p>
3598</dd>
3599<dt class="hdlist1">
Junio C Hamanoc652aed2011-07-07 01:14:313600--textconv
3601</dt>
3602<dt class="hdlist1">
3603--no-textconv
3604</dt>
3605<dd>
3606<p>
3607 Allow (or disallow) external text conversion filters to be run
Junio C Hamanoa28a9202012-06-21 07:08:233608 when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for
Junio C Hamanoc652aed2011-07-07 01:14:313609 details. Because textconv filters are typically a one-way
3610 conversion, the resulting diff is suitable for human
3611 consumption, but cannot be applied. For this reason, textconv
Junio C Hamanoa28a9202012-06-21 07:08:233612 filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and
3613 <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:313614 diff plumbing commands.
3615</p>
3616</dd>
3617<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223618--ignore-submodules[=&lt;when&gt;]
3619</dt>
3620<dd>
3621<p>
3622 Ignore changes to submodules in the diff generation. &lt;when&gt; can be
Junio C Hamanoc7102962013-05-29 23:57:173623 either "none", "untracked", "dirty" or "all", which is the default.
Junio C Hamanod2c978f2011-03-20 19:42:223624 Using "none" will consider the submodule modified when it either contains
3625 untracked or modified files or its HEAD differs from the commit recorded
3626 in the superproject and can be used to override any settings of the
Junio C Hamanoa28a9202012-06-21 07:08:233627 <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:223628 "untracked" is used submodules are not considered dirty when they only
3629 contain untracked content (but they are still scanned for modified
3630 content). Using "dirty" ignores all changes to the work tree of submodules,
3631 only changes to the commits stored in the superproject are shown (this was
3632 the behavior until 1.7.0). Using "all" hides all changes to submodules.
3633</p>
3634</dd>
3635<dt class="hdlist1">
3636--src-prefix=&lt;prefix&gt;
3637</dt>
3638<dd>
3639<p>
3640 Show the given source prefix instead of "a/".
3641</p>
3642</dd>
3643<dt class="hdlist1">
3644--dst-prefix=&lt;prefix&gt;
3645</dt>
3646<dd>
3647<p>
3648 Show the given destination prefix instead of "b/".
3649</p>
3650</dd>
3651<dt class="hdlist1">
3652--no-prefix
3653</dt>
3654<dd>
3655<p>
3656 Do not show any source or destination prefix.
3657</p>
3658</dd>
Junio C Hamanocd451662016-09-13 00:54:093659<dt class="hdlist1">
3660--line-prefix=&lt;prefix&gt;
3661</dt>
3662<dd>
3663<p>
3664 Prepend an additional prefix to every line of output.
3665</p>
3666</dd>
Junio C Hamanod2c978f2011-03-20 19:42:223667</dl></div>
3668<div class="paragraph"><p>For more detailed explanation on these common options, see also
Junio C Hamanoa28a9202012-06-21 07:08:233669<a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223670</div>
Junio C Hamano9629d4f2012-12-19 00:28:273671</div>
3672<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:313673<h2 id="_generating_patches_with_p">Generating patches with -p</h2>
Junio C Hamano00b8b632007-12-07 09:50:493674<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:593675<div class="paragraph"><p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
Junio C Hamano92d80372016-07-13 22:00:053676with a <code>-p</code> option, "git diff" without the <code>--raw</code> option, or
Junio C Hamano00b8b632007-12-07 09:50:493677"git log" with the "-p" option, they
3678do not produce the output described above; instead they produce a
3679patch file. You can customize the creation of such patches via the
Junio C Hamano042f2142016-06-27 18:05:053680<code>GIT_EXTERNAL_DIFF</code> and the <code>GIT_DIFF_OPTS</code> environment variables.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593681<div class="paragraph"><p>What the -p option produces is slightly different from the traditional
Junio C Hamano7f9fa862010-10-19 23:51:143682diff format:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593683<div class="olist arabic"><ol class="arabic">
Junio C Hamano00b8b632007-12-07 09:50:493684<li>
3685<p>
Junio C Hamano7f9fa862010-10-19 23:51:143686It is preceded with a "git diff" header that looks like this:
Junio C Hamano00b8b632007-12-07 09:50:493687</p>
3688<div class="literalblock">
3689<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513690<pre><code>diff --git a/file1 b/file2</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493691</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513692<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:493693involved. Especially, even for a creation or a deletion,
Junio C Hamanoac12f0e2014-09-19 22:32:513694<code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p></div>
3695<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:493696name of the source file of the rename/copy and the name of
Junio C Hamanoba4b9282008-07-06 05:20:313697the file that rename/copy produces, respectively.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493698</li>
3699<li>
3700<p>
3701It is followed by one or more extended header lines:
3702</p>
3703<div class="literalblock">
3704<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513705<pre><code>old mode &lt;mode&gt;
Junio C Hamano00b8b632007-12-07 09:50:493706new mode &lt;mode&gt;
3707deleted file mode &lt;mode&gt;
3708new file mode &lt;mode&gt;
3709copy from &lt;path&gt;
3710copy to &lt;path&gt;
3711rename from &lt;path&gt;
3712rename to &lt;path&gt;
3713similarity index &lt;number&gt;
3714dissimilarity index &lt;number&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:513715index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493716</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:593717<div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type
Junio C Hamano7f9fa862010-10-19 23:51:143718and file permission bits.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513719<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:593720<div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and
Junio C Hamano7f9fa862010-10-19 23:51:143721the dissimilarity index is the percentage of changed lines. It
3722is a rounded down integer, followed by a percent sign. The
3723similarity index value of 100% is thus reserved for two equal
3724files, while 100% dissimilarity means that no line from the old
3725file made it into the new one.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593726<div class="paragraph"><p>The index line includes the SHA-1 checksum before and after the change.
Junio C Hamano7f9fa862010-10-19 23:51:143727The &lt;mode&gt; is included if the file mode does not change; otherwise,
3728separate lines indicate the old and the new mode.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493729</li>
3730<li>
3731<p>
3732TAB, LF, double quote and backslash characters in pathnames
Junio C Hamanoac12f0e2014-09-19 22:32:513733 are represented as <code>\t</code>, <code>\n</code>, <code>\"</code> and <code>\\</code>, respectively.
Junio C Hamano00b8b632007-12-07 09:50:493734 If there is need for such substitution then the whole
3735 pathname is put in double quotes.
3736</p>
3737</li>
Junio C Hamano7f9fa862010-10-19 23:51:143738<li>
3739<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513740All the <code>file1</code> files in the output refer to files before the
3741 commit, and all the <code>file2</code> files refer to files after the commit.
Junio C Hamano7f9fa862010-10-19 23:51:143742 It is incorrect to apply each change to each file sequentially. For
3743 example, this patch will swap a and b:
3744</p>
3745<div class="literalblock">
3746<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513747<pre><code>diff --git a/a b/b
Junio C Hamano7f9fa862010-10-19 23:51:143748rename from a
3749rename to b
3750diff --git a/b b/a
3751rename from b
Junio C Hamanoac12f0e2014-09-19 22:32:513752rename to a</code></pre>
Junio C Hamano7f9fa862010-10-19 23:51:143753</div></div>
3754</li>
Junio C Hamanoba4b9282008-07-06 05:20:313755</ol></div>
Junio C Hamano00b8b632007-12-07 09:50:493756</div>
Junio C Hamano9629d4f2012-12-19 00:28:273757</div>
3758<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:313759<h2 id="_combined_diff_format">combined diff format</h2>
Junio C Hamano00b8b632007-12-07 09:50:493760<div class="sectionbody">
Junio C Hamano1dbca522015-05-22 20:48:553761<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:433762produce a <em>combined diff</em> when showing a merge. This is the default
Junio C Hamanoa28a9202012-06-21 07:08:233763format when showing merges with <a href="git-diff.html">git-diff(1)</a> or
Junio C Hamano1dbca522015-05-22 20:48:553764<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:433765of these commands to force generation of diffs with individual parents
3766of a merge.</p></div>
3767<div class="paragraph"><p>A <em>combined diff</em> format looks like this:</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493768<div class="listingblock">
3769<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513770<pre><code>diff --combined describe.c
Junio C Hamano00b8b632007-12-07 09:50:493771index fabadb8,cc95eb0..4866510
3772--- a/describe.c
3773+++ b/describe.c
3774@@@ -98,20 -98,12 +98,20 @@@
3775 return (a_date &gt; b_date) ? -1 : (a_date == b_date) ? 0 : 1;
3776 }
3777
3778- static void describe(char *arg)
3779 -static void describe(struct commit *cmit, int last_one)
3780++static void describe(char *arg, int last_one)
3781 {
3782 + unsigned char sha1[20];
3783 + struct commit *cmit;
3784 struct commit_list *list;
3785 static int initialized = 0;
3786 struct commit_name *n;
3787
3788 + if (get_sha1(arg, sha1) &lt; 0)
3789 + usage(describe_usage);
3790 + cmit = lookup_commit_reference(sha1);
3791 + if (!cmit)
3792 + usage(describe_usage);
3793 +
3794 if (!initialized) {
3795 initialized = 1;
Junio C Hamanoac12f0e2014-09-19 22:32:513796 for_each_ref(get_name);</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493797</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:593798<div class="olist arabic"><ol class="arabic">
Junio C Hamano00b8b632007-12-07 09:50:493799<li>
3800<p>
3801It is preceded with a "git diff" header, that looks like
Junio C Hamano92d80372016-07-13 22:00:053802 this (when <code>-c</code> option is used):
Junio C Hamano00b8b632007-12-07 09:50:493803</p>
3804<div class="literalblock">
3805<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513806<pre><code>diff --combined file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493807</div></div>
Junio C Hamano92d80372016-07-13 22:00:053808<div class="paragraph"><p>or like this (when <code>--cc</code> option is used):</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493809<div class="literalblock">
3810<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513811<pre><code>diff --cc file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493812</div></div>
3813</li>
3814<li>
3815<p>
3816It is followed by one or more extended header lines
3817 (this example shows a merge with two parents):
3818</p>
3819<div class="literalblock">
3820<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513821<pre><code>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
Junio C Hamano00b8b632007-12-07 09:50:493822mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;
3823new file mode &lt;mode&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:513824deleted file mode &lt;mode&gt;,&lt;mode&gt;</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493825</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513826<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:493827the &lt;mode&gt; is different from the rest. Extended headers with
3828information about detected contents movement (renames and
3829copying detection) are designed to work with diff of two
Junio C Hamanoba4b9282008-07-06 05:20:313830&lt;tree-ish&gt; and are not used by combined diff format.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493831</li>
3832<li>
3833<p>
3834It is followed by two-line from-file/to-file header
3835</p>
3836<div class="literalblock">
3837<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513838<pre><code>--- a/file
3839+++ b/file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493840</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:593841<div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff
Junio C Hamanoac12f0e2014-09-19 22:32:513842format, <code>/dev/null</code> is used to signal created or deleted
Junio C Hamanoba4b9282008-07-06 05:20:313843files.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493844</li>
3845<li>
3846<p>
3847Chunk header format is modified to prevent people from
Junio C Hamanoac12f0e2014-09-19 22:32:513848 accidentally feeding it to <code>patch -p1</code>. Combined diff format
Junio C Hamano00b8b632007-12-07 09:50:493849 was created for review of merge commit changes, and was not
3850 meant for apply. The change is similar to the change in the
3851 extended <em>index</em> header:
3852</p>
3853<div class="literalblock">
3854<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513855<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:493856</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513857<div class="paragraph"><p>There are (number of parents + 1) <code>@</code> characters in the chunk
Junio C Hamanoba4b9282008-07-06 05:20:313858header for combined diff format.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493859</li>
Junio C Hamanoba4b9282008-07-06 05:20:313860</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:593861<div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two
Junio C Hamanoac12f0e2014-09-19 22:32:513862files 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
3863added to B), or <code>" "</code> (space&#8201;&#8212;&#8201;unchanged) prefix, this format
Junio C Hamano00b8b632007-12-07 09:50:493864compares two or more files file1, file2,&#8230; with one file X, and
3865shows how X differs from each of fileN. One column for each of
Junio C Hamano68cf15a2010-11-06 01:01:593866fileN is prepended to the output line to note how X&#8217;s line is
Junio C Hamanoba4b9282008-07-06 05:20:313867different from it.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513868<div class="paragraph"><p>A <code>-</code> character in the column N means that the line appears in
3869fileN but it does not appear in the result. A <code>+</code> character
Junio C Hamano54bf1e22008-12-20 06:30:113870in the column N means that the line appears in the result,
Junio C Hamano00b8b632007-12-07 09:50:493871and fileN does not have that line (in other words, the line was
Junio C Hamanoba4b9282008-07-06 05:20:313872added, from the point of view of that parent).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593873<div class="paragraph"><p>In the above example output, the function signature was changed
Junio C Hamanoac12f0e2014-09-19 22:32:513874from both files (hence two <code>-</code> removals from both file1 and
3875file2, plus <code>++</code> to mean one line that was added does not appear
Junio C Hamanod75148a2014-04-08 19:48:383876in either file1 or file2). Also eight other lines are the same
Junio C Hamanoac12f0e2014-09-19 22:32:513877from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p></div>
3878<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:493879merge commit with the merge result (i.e. file1..fileN are the
Junio C Hamanoac12f0e2014-09-19 22:32:513880parents). When shown by <code>git diff-files -c</code>, it compares the
Junio C Hamano00b8b632007-12-07 09:50:493881two unresolved merge parents with the working tree file
3882(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
Junio C Hamanoba4b9282008-07-06 05:20:313883"their version").</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493884</div>
Junio C Hamano9629d4f2012-12-19 00:28:273885</div>
3886<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:593887<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:233888<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:593889<div class="dlist"><dl>
3890<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513891<code>git log --no-merges</code>
Junio C Hamano1a4e8412005-12-27 08:17:233892</dt>
3893<dd>
3894<p>
3895 Show the whole commit history, but skip any merges
3896</p>
3897</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593898<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513899<code>git log v2.6.12.. include/scsi drivers/scsi</code>
Junio C Hamano1a4e8412005-12-27 08:17:233900</dt>
3901<dd>
3902<p>
3903 Show all commits since version <em>v2.6.12</em> that changed any file
Junio C Hamanoac12f0e2014-09-19 22:32:513904 in the <code>include/scsi</code> or <code>drivers/scsi</code> subdirectories
Junio C Hamano1a4e8412005-12-27 08:17:233905</p>
3906</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593907<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513908<code>git log --since="2 weeks ago" -- gitk</code>
Junio C Hamano1a4e8412005-12-27 08:17:233909</dt>
3910<dd>
3911<p>
3912 Show the changes during the last two weeks to the file <em>gitk</em>.
Junio C Hamanob73af6c2013-12-03 22:07:113913 The &#8220;--&#8221; is necessary to avoid confusion with the <strong>branch</strong> named
Junio C Hamano1a4e8412005-12-27 08:17:233914 <em>gitk</em>
3915</p>
3916</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593917<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513918<code>git log --name-status release..test</code>
Junio C Hamanoba7c8d82006-04-15 06:17:423919</dt>
3920<dd>
3921<p>
3922 Show the commits that are in the "test" branch but not yet
3923 in the "release" branch, along with the list of paths
3924 each commit modifies.
3925</p>
3926</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593927<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513928<code>git log --follow builtin/rev-list.c</code>
Junio C Hamano235d53f2007-07-13 00:25:153929</dt>
3930<dd>
3931<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513932 Shows the commits that changed <code>builtin/rev-list.c</code>, including
Junio C Hamano235d53f2007-07-13 00:25:153933 those commits that occurred before the file was given its
3934 present name.
3935</p>
3936</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593937<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513938<code>git log --branches --not --remotes=origin</code>
Junio C Hamano57827fb2010-01-23 03:02:503939</dt>
3940<dd>
3941<p>
3942 Shows all commits that are in any of local branches but not in
Junio C Hamano97bcb482010-11-25 03:16:073943 any of remote-tracking branches for <em>origin</em> (what you have that
Junio C Hamano68cf15a2010-11-06 01:01:593944 origin doesn&#8217;t).
Junio C Hamano57827fb2010-01-23 03:02:503945</p>
3946</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593947<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513948<code>git log master --not --remotes=*/master</code>
Junio C Hamano57827fb2010-01-23 03:02:503949</dt>
3950<dd>
3951<p>
3952 Shows all commits that are in local master but not in any remote
3953 repository master branches.
3954</p>
3955</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593956<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513957<code>git log -p -m --first-parent</code>
Junio C Hamano31667362010-03-25 00:38:533958</dt>
3959<dd>
3960<p>
3961 Shows the history including change diffs, but only from the
Junio C Hamanob73af6c2013-12-03 22:07:113962 &#8220;main branch&#8221; perspective, skipping commits that come from merged
Junio C Hamano31667362010-03-25 00:38:533963 branches, and showing full diffs of changes introduced by the merges.
3964 This makes sense only when following a strict policy of merging all
3965 topic branches when staying on a single integration branch.
3966</p>
3967</dd>
Junio C Hamano693e7092012-09-12 22:56:533968<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513969<code>git log -L '/int main/',/^}/:main.c</code>
Junio C Hamano7e590a12013-06-02 23:46:523970</dt>
3971<dd>
3972<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513973 Shows how the function <code>main()</code> in the file <code>main.c</code> evolved
Junio C Hamano7e590a12013-06-02 23:46:523974 over time.
3975</p>
3976</dd>
3977<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513978<code>git log -3</code>
Junio C Hamano693e7092012-09-12 22:56:533979</dt>
3980<dd>
3981<p>
3982 Limits the number of commits to show to 3.
3983</p>
3984</dd>
Junio C Hamanoba4b9282008-07-06 05:20:313985</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:233986</div>
Junio C Hamano9629d4f2012-12-19 00:28:273987</div>
3988<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:593989<h2 id="_discussion">DISCUSSION</h2>
Junio C Hamano775a0f42006-12-31 01:19:143990<div class="sectionbody">
Junio C Hamanod7ed4042015-08-03 19:43:003991<div class="paragraph"><p>Git is to some extent character encoding agnostic.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593992<div class="ulist"><ul>
Junio C Hamano775a0f42006-12-31 01:19:143993<li>
3994<p>
Junio C Hamano54bf1e22008-12-20 06:30:113995The contents of the blob objects are uninterpreted sequences
Junio C Hamano775a0f42006-12-31 01:19:143996 of bytes. There is no encoding translation at the core
3997 level.
3998</p>
3999</li>
4000<li>
4001<p>
Junio C Hamanod7ed4042015-08-03 19:43:004002Path names are encoded in UTF-8 normalization form C. This
4003 applies to tree objects, the index file, ref names, as well as
4004 path names in command line arguments, environment variables
4005 and config files (<code>.git/config</code> (see <a href="git-config.html">git-config(1)</a>),
4006 <a href="gitignore.html">gitignore(5)</a>, <a href="gitattributes.html">gitattributes(5)</a> and
4007 <a href="gitmodules.html">gitmodules(5)</a>).
4008</p>
4009<div class="paragraph"><p>Note that Git at the core level treats path names simply as
4010sequences of non-NUL bytes, there are no path name encoding
4011conversions (except on Mac and Windows). Therefore, using
4012non-ASCII path names will mostly work even on platforms and file
4013systems that use legacy extended ASCII encodings. However,
4014repositories created on such systems will not work properly on
4015UTF-8-based systems (e.g. Linux, Mac, Windows) and vice versa.
4016Additionally, many Git-based tools simply assume path names to
4017be UTF-8 and will fail to display other encodings correctly.</p></div>
4018</li>
4019<li>
4020<p>
4021Commit log messages are typically encoded in UTF-8, but other
4022 extended ASCII encodings are also supported. This includes
4023 ISO-8859-x, CP125x and many others, but <em>not</em> UTF-16/32,
4024 EBCDIC and CJK multi-byte encodings (GBK, Shift-JIS, Big5,
4025 EUC-x, CP9xx etc.).
Junio C Hamano775a0f42006-12-31 01:19:144026</p>
4027</li>
Junio C Hamanoba4b9282008-07-06 05:20:314028</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:594029<div class="paragraph"><p>Although we encourage that the commit log messages are encoded
Junio C Hamano076ffcc2013-02-06 05:13:214030in UTF-8, both the core and Git Porcelain are designed not to
Junio C Hamano775a0f42006-12-31 01:19:144031force UTF-8 on projects. If all participants of a particular
Junio C Hamano076ffcc2013-02-06 05:13:214032project find it more convenient to use legacy encodings, Git
Junio C Hamano775a0f42006-12-31 01:19:144033does not forbid it. However, there are a few things to keep in
Junio C Hamanoba4b9282008-07-06 05:20:314034mind.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594035<div class="olist arabic"><ol class="arabic">
Junio C Hamano775a0f42006-12-31 01:19:144036<li>
4037<p>
Junio C Hamano1aa40d22010-01-21 17:46:434038<em>git commit</em> and <em>git commit-tree</em> issues
Junio C Hamano14b76482008-01-05 10:32:264039 a warning if the commit log message given to it does not look
Junio C Hamano775a0f42006-12-31 01:19:144040 like a valid UTF-8 string, unless you explicitly say your
4041 project uses a legacy encoding. The way to say this is to
Junio C Hamanoac12f0e2014-09-19 22:32:514042 have i18n.commitencoding in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:144043</p>
4044<div class="listingblock">
4045<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514046<pre><code>[i18n]
4047 commitencoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:144048</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594049<div class="paragraph"><p>Commit objects created with the above setting record the value
Junio C Hamanoac12f0e2014-09-19 22:32:514050of <code>i18n.commitencoding</code> in its <code>encoding</code> header. This is to
Junio C Hamano775a0f42006-12-31 01:19:144051help other people who look at them later. Lack of this header
Junio C Hamanoba4b9282008-07-06 05:20:314052implies that the commit log message is encoded in UTF-8.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144053</li>
4054<li>
4055<p>
Junio C Hamano1aa40d22010-01-21 17:46:434056<em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
Junio C Hamanoac12f0e2014-09-19 22:32:514057 <code>encoding</code> header of a commit object, and try to re-code the
Junio C Hamanoaa17c7c2008-11-03 04:36:584058 log message into UTF-8 unless otherwise specified. You can
Junio C Hamano775a0f42006-12-31 01:19:144059 specify the desired output encoding with
Junio C Hamanoac12f0e2014-09-19 22:32:514060 <code>i18n.logoutputencoding</code> in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:144061</p>
4062<div class="listingblock">
4063<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514064<pre><code>[i18n]
4065 logoutputencoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:144066</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594067<div class="paragraph"><p>If you do not have this configuration variable, the value of
Junio C Hamanoac12f0e2014-09-19 22:32:514068<code>i18n.commitencoding</code> is used instead.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144069</li>
Junio C Hamanoba4b9282008-07-06 05:20:314070</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:594071<div class="paragraph"><p>Note that we deliberately chose not to re-code the commit log
Junio C Hamano775a0f42006-12-31 01:19:144072message when a commit is made to force UTF-8 at the commit
4073object level, because re-coding to UTF-8 is not necessarily a
Junio C Hamanoba4b9282008-07-06 05:20:314074reversible operation.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144075</div>
Junio C Hamano9629d4f2012-12-19 00:28:274076</div>
4077<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594078<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamanoa574a092010-06-13 19:57:104079<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:234080<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:104081for settings related to diff generation.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594082<div class="dlist"><dl>
4083<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104084format.pretty
4085</dt>
4086<dd>
4087<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514088 Default for the <code>--format</code> option. (See <em>Pretty Formats</em> above.)
4089 Defaults to <code>medium</code>.
Junio C Hamanoa574a092010-06-13 19:57:104090</p>
4091</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594092<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104093i18n.logOutputEncoding
4094</dt>
4095<dd>
4096<p>
Junio C Hamanob73af6c2013-12-03 22:07:114097 Encoding to use when displaying logs. (See <em>Discussion</em> above.)
Junio C Hamanoac12f0e2014-09-19 22:32:514098 Defaults to the value of <code>i18n.commitEncoding</code> if set, and UTF-8
Junio C Hamanoa574a092010-06-13 19:57:104099 otherwise.
4100</p>
4101</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594102<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104103log.date
4104</dt>
4105<dd>
4106<p>
4107 Default format for human-readable dates. (Compare the
Junio C Hamanoac12f0e2014-09-19 22:32:514108 <code>--date</code> option.) Defaults to "default", which means to write
4109 dates like <code>Sat May 8 19:35:34 2010 -0500</code>.
Junio C Hamanoa574a092010-06-13 19:57:104110</p>
4111</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594112<dt class="hdlist1">
Junio C Hamanod7ed4042015-08-03 19:43:004113log.follow
4114</dt>
4115<dd>
4116<p>
Junio C Hamanob0a1e832015-10-15 23:08:314117 If <code>true</code>, <code>git log</code> will act as if the <code>--follow</code> option was used when
4118 a single &lt;path&gt; is given. This has the same limitations as <code>--follow</code>,
4119 i.e. it cannot be used to follow multiple files and does not work well
4120 on non-linear history.
Junio C Hamanod7ed4042015-08-03 19:43:004121</p>
4122</dd>
4123<dt class="hdlist1">
Junio C Hamano322c6242015-03-23 21:32:464124log.showRoot
Junio C Hamanoa574a092010-06-13 19:57:104125</dt>
4126<dd>
4127<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514128 If <code>false</code>, <code>git log</code> and related commands will not treat the
Junio C Hamanoa574a092010-06-13 19:57:104129 initial commit as a big creation event. Any root commits in
Junio C Hamanoac12f0e2014-09-19 22:32:514130 <code>git log -p</code> output would be shown without a diff attached.
4131 The default is <code>true</code>.
Junio C Hamanoa574a092010-06-13 19:57:104132</p>
4133</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594134<dt class="hdlist1">
Junio C Hamano48931e22016-07-11 20:08:474135log.showSignature
4136</dt>
4137<dd>
4138<p>
4139 If <code>true</code>, <code>git log</code> and related commands will act as if the
4140 <code>--show-signature</code> option was passed to them.
4141</p>
4142</dd>
4143<dt class="hdlist1">
Junio C Hamanoabad6da2013-01-06 09:06:324144mailmap.*
Junio C Hamanoa574a092010-06-13 19:57:104145</dt>
4146<dd>
4147<p>
Junio C Hamanoa28a9202012-06-21 07:08:234148 See <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanoa574a092010-06-13 19:57:104149</p>
4150</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594151<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104152notes.displayRef
4153</dt>
4154<dd>
4155<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514156 Which refs, in addition to the default set by <code>core.notesRef</code>
Junio C Hamano042f2142016-06-27 18:05:054157 or <code>GIT_NOTES_REF</code>, to read notes from when showing commit
Junio C Hamanoac12f0e2014-09-19 22:32:514158 messages with the <code>log</code> family of commands. See
Junio C Hamanoa28a9202012-06-21 07:08:234159 <a href="git-notes.html">git-notes(1)</a>.
Junio C Hamanoa574a092010-06-13 19:57:104160</p>
Junio C Hamano68cf15a2010-11-06 01:01:594161<div class="paragraph"><p>May be an unabbreviated ref name or a glob and may be specified
Junio C Hamanoa574a092010-06-13 19:57:104162multiple times. A warning will be issued for refs that do not exist,
4163but a glob that does not match any refs is silently ignored.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514164<div class="paragraph"><p>This setting can be disabled by the <code>--no-notes</code> option,
Junio C Hamano042f2142016-06-27 18:05:054165overridden by the <code>GIT_NOTES_DISPLAY_REF</code> environment variable,
Junio C Hamanoac12f0e2014-09-19 22:32:514166and overridden by the <code>--notes=&lt;ref&gt;</code> option.</p></div>
Junio C Hamanoa574a092010-06-13 19:57:104167</dd>
4168</dl></div>
4169</div>
Junio C Hamano9629d4f2012-12-19 00:28:274170</div>
4171<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:314172<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:234173<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:234174<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:234175</div>
Junio C Hamano7bd050f2011-09-22 06:32:224176</div>
Junio C Hamano9629d4f2012-12-19 00:28:274177</div>
Junio C Hamano7bd050f2011-09-22 06:32:224178<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:234179<div id="footer">
4180<div id="footer-text">
Junio C Hamano48931e22016-07-11 20:08:474181Last updated 2016-07-11 13:08:30 PDT
Junio C Hamano1a4e8412005-12-27 08:17:234182</div>
4183</div>
4184</body>
4185</html>