blob: cfcc28f9d3b3cdc2025a37c7bf56ab74556a4f3a [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 Hamano222ed822017-06-02 06:24:061085 Consider the limiting patterns to be Perl-compatible regular
1086 expressions.
Junio C Hamanoa1295452012-11-13 22:32:041087</p>
Junio C Hamano222ed822017-06-02 06:24:061088<div class="paragraph"><p>Support for these types of regular expressions is an optional
1089compile-time dependency. If Git wasn&#8217;t compiled with support for them
1090providing this option will cause it to die.</p></div>
Junio C Hamanoa1295452012-11-13 22:32:041091</dd>
1092<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001093--remove-empty
1094</dt>
1095<dd>
1096<p>
1097 Stop when a given path disappears from the tree.
1098</p>
1099</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591100<dt class="hdlist1">
Junio C Hamano934e1782009-07-16 06:59:151101--merges
1102</dt>
1103<dd>
1104<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511105 Print only merge commits. This is exactly the same as <code>--min-parents=2</code>.
Junio C Hamano934e1782009-07-16 06:59:151106</p>
1107</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591108<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001109--no-merges
1110</dt>
1111<dd>
1112<p>
Junio C Hamanof32ce262011-03-27 07:35:111113 Do not print commits with more than one parent. This is
Junio C Hamanoac12f0e2014-09-19 22:32:511114 exactly the same as <code>--max-parents=1</code>.
Junio C Hamanob0e02952008-01-19 08:02:001115</p>
1116</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591117<dt class="hdlist1">
Junio C Hamanof32ce262011-03-27 07:35:111118--min-parents=&lt;number&gt;
1119</dt>
1120<dt class="hdlist1">
1121--max-parents=&lt;number&gt;
1122</dt>
1123<dt class="hdlist1">
1124--no-min-parents
1125</dt>
1126<dt class="hdlist1">
1127--no-max-parents
1128</dt>
1129<dd>
1130<p>
Junio C Hamanoc5bb3b32013-08-05 22:43:361131 Show only commits which have at least (or at most) that many parent
Junio C Hamanoac12f0e2014-09-19 22:32:511132 commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>,
1133 <code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code>
1134 gives all root commits and <code>--min-parents=3</code> all octopus merges.
Junio C Hamanof32ce262011-03-27 07:35:111135</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511136<div class="paragraph"><p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit)
1137again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more
1138parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p></div>
Junio C Hamanof32ce262011-03-27 07:35:111139</dd>
1140<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001141--first-parent
1142</dt>
1143<dd>
1144<p>
1145 Follow only the first parent commit upon seeing a merge
1146 commit. This option can give a better overview when
1147 viewing the evolution of a particular topic branch,
1148 because merges into a topic branch tend to be only about
1149 adjusting to updated upstream from time to time, and
1150 this option allows you to ignore the individual commits
Junio C Hamanoef57d1e2015-03-25 21:23:001151 brought in to your history by such a merge. Cannot be
1152 combined with --bisect.
Junio C Hamanob0e02952008-01-19 08:02:001153</p>
1154</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591155<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001156--not
1157</dt>
1158<dd>
1159<p>
1160 Reverses the meaning of the <em>&#94;</em> prefix (or lack thereof)
Junio C Hamanoac12f0e2014-09-19 22:32:511161 for all following revision specifiers, up to the next <code>--not</code>.
Junio C Hamanob0e02952008-01-19 08:02:001162</p>
1163</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591164<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001165--all
1166</dt>
1167<dd>
1168<p>
Junio C Hamanoe89102f2017-02-15 23:18:151169 Pretend as if all the refs in <code>refs/</code>, along with <code>HEAD</code>, are
1170 listed on the command line as <em>&lt;commit&gt;</em>.
Junio C Hamanob0e02952008-01-19 08:02:001171</p>
1172</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591173<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171174--branches[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561175</dt>
1176<dd>
1177<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511178 Pretend as if all the refs in <code>refs/heads</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171179 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:501180 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
Junio C Hamano81d540a2012-03-02 19:52:471181 <em>&#42;</em>, or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561182</p>
1183</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591184<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171185--tags[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561186</dt>
1187<dd>
1188<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511189 Pretend as if all the refs in <code>refs/tags</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171190 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:471191 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>&#42;</em>,
1192 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561193</p>
1194</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591195<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171196--remotes[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561197</dt>
1198<dd>
1199<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511200 Pretend as if all the refs in <code>refs/remotes</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171201 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:071202 remote-tracking branches to ones matching given shell glob.
Junio C Hamano81d540a2012-03-02 19:52:471203 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:501204</p>
1205</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591206<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171207--glob=&lt;glob-pattern&gt;
Junio C Hamano57827fb2010-01-23 03:02:501208</dt>
1209<dd>
1210<p>
Junio C Hamanod2179ef2010-10-22 04:12:171211 Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
Junio C Hamano57827fb2010-01-23 03:02:501212 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
Junio C Hamano81d540a2012-03-02 19:52:471213 is automatically prepended if missing. If pattern lacks <em>?</em>, <em>&#42;</em>,
1214 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561215</p>
1216</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591217<dt class="hdlist1">
Junio C Hamanof079f702013-12-06 23:43:181218--exclude=&lt;glob-pattern&gt;
1219</dt>
1220<dd>
1221<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511222 Do not include refs matching <em>&lt;glob-pattern&gt;</em> that the next <code>--all</code>,
1223 <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or <code>--glob</code> would otherwise
Junio C Hamanof079f702013-12-06 23:43:181224 consider. Repetitions of this option accumulate exclusion patterns
Junio C Hamanoac12f0e2014-09-19 22:32:511225 up to the next <code>--all</code>, <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or
1226 <code>--glob</code> option (other options or arguments do not clear
Junio C Hamanofb5ffde2014-11-04 22:38:561227 accumulated patterns).
Junio C Hamanof079f702013-12-06 23:43:181228</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511229<div class="paragraph"><p>The patterns given should not begin with <code>refs/heads</code>, <code>refs/tags</code>, or
1230<code>refs/remotes</code> when applied to <code>--branches</code>, <code>--tags</code>, or <code>--remotes</code>,
1231respectively, and they must begin with <code>refs/</code> when applied to <code>--glob</code>
1232or <code>--all</code>. If a trailing <em>/&#42;</em> is intended, it must be given
Junio C Hamanof079f702013-12-06 23:43:181233explicitly.</p></div>
1234</dd>
1235<dt class="hdlist1">
Junio C Hamano2a4bcbc2014-10-29 20:07:391236--reflog
1237</dt>
1238<dd>
1239<p>
1240 Pretend as if all objects mentioned by reflogs are listed on the
1241 command line as <code>&lt;commit&gt;</code>.
1242</p>
1243</dd>
1244<dt class="hdlist1">
Junio C Hamano084228c2011-05-30 08:13:521245--ignore-missing
1246</dt>
1247<dd>
1248<p>
1249 Upon seeing an invalid object name in the input, pretend as if
1250 the bad input was not given.
1251</p>
1252</dd>
1253<dt class="hdlist1">
Junio C Hamano5706e0b2009-11-24 10:54:161254--bisect
1255</dt>
1256<dd>
1257<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511258 Pretend as if the bad bisection ref <code>refs/bisect/bad</code>
1259 was listed and as if it was followed by <code>--not</code> and the good
1260 bisection refs <code>refs/bisect/good-*</code> on the command
Junio C Hamanoef57d1e2015-03-25 21:23:001261 line. Cannot be combined with --first-parent.
Junio C Hamano5706e0b2009-11-24 10:54:161262</p>
1263</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591264<dt class="hdlist1">
Junio C Hamano5706e0b2009-11-24 10:54:161265--stdin
1266</dt>
1267<dd>
1268<p>
1269 In addition to the <em>&lt;commit&gt;</em> listed on the command
Junio C Hamano92d80372016-07-13 22:00:051270 line, read them from the standard input. If a <code>--</code> separator is
Junio C Hamano5706e0b2009-11-24 10:54:161271 seen, stop reading commits and start reading paths to limit the
1272 result.
1273</p>
1274</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591275<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151276--cherry-mark
1277</dt>
1278<dd>
1279<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511280 Like <code>--cherry-pick</code> (see below) but mark equivalent commits
1281 with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151282</p>
1283</dd>
1284<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001285--cherry-pick
1286</dt>
1287<dd>
1288<p>
1289 Omit any commit that introduces the same change as
Junio C Hamanob73af6c2013-12-03 22:07:111290 another commit on the &#8220;other side&#8221; when the set of
Junio C Hamano68cf15a2010-11-06 01:01:591291 commits are limited with symmetric difference.
1292</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511293<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:001294to list all commits on only one side of them is with
Junio C Hamanoac12f0e2014-09-19 22:32:511295<code>--left-right</code> (see the example below in the description of
1296the <code>--left-right</code> option). However, it shows the commits that were
Junio C Hamanob73af6c2013-12-03 22:07:111297cherry-picked from the other branch (for example, &#8220;3rd on b&#8221; may be
1298cherry-picked from branch A). With this option, such pairs of commits are
Junio C Hamano68cf15a2010-11-06 01:01:591299excluded from the output.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001300</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591301<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151302--left-only
1303</dt>
1304<dt class="hdlist1">
1305--right-only
1306</dt>
1307<dd>
1308<p>
Junio C Hamanocd451662016-09-13 00:54:091309 List only commits on the respective side of a symmetric difference,
Junio C Hamanoac12f0e2014-09-19 22:32:511310 i.e. only those which would be marked <code>&lt;</code> resp. <code>&gt;</code> by
1311 <code>--left-right</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151312</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511313<div class="paragraph"><p>For example, <code>--cherry-pick --right-only A...B</code> omits those
1314commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in
1315<code>A</code>. In other words, this lists the <code>+</code> commits from <code>git cherry A B</code>.
1316More precisely, <code>--cherry-pick --right-only --no-merges</code> gives the exact
Junio C Hamano9a2fb2d2011-03-23 05:40:151317list.</p></div>
1318</dd>
1319<dt class="hdlist1">
1320--cherry
1321</dt>
1322<dd>
1323<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511324 A synonym for <code>--right-only --cherry-mark --no-merges</code>; useful to
Junio C Hamano9a2fb2d2011-03-23 05:40:151325 limit the output to the commits on our side and mark those that
1326 have been applied to the other side of a forked history with
Junio C Hamanoac12f0e2014-09-19 22:32:511327 <code>git log --cherry upstream...mybranch</code>, similar to
1328 <code>git cherry upstream mybranch</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151329</p>
1330</dd>
1331<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471332-g
1333</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591334<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471335--walk-reflogs
Junio C Hamanob0e02952008-01-19 08:02:001336</dt>
1337<dd>
1338<p>
1339 Instead of walking the commit ancestry chain, walk
1340 reflog entries from the most recent one to older ones.
1341 When this option is used you cannot specify commits to
1342 exclude (that is, <em>&#94;commit</em>, <em>commit1..commit2</em>,
Junio C Hamanod75148a2014-04-08 19:48:381343 and <em>commit1...commit2</em> notations cannot be used).
Junio C Hamano68cf15a2010-11-06 01:01:591344</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511345<div class="paragraph"><p>With <code>--pretty</code> format other than <code>oneline</code> (for obvious reasons),
Junio C Hamanob0e02952008-01-19 08:02:001346this causes the output to have two extra lines of information
Junio C Hamanoe548d1b2016-08-08 22:26:491347taken from the reflog. The reflog designator in the output may be shown
1348as <code>ref@{Nth}</code> (where <code>Nth</code> is the reverse-chronological index in the
1349reflog) or as <code>ref@{timestamp}</code> (with the timestamp for that entry),
1350depending on a few rules:</p></div>
1351<div class="openblock">
1352<div class="content">
1353<div class="olist arabic"><ol class="arabic">
1354<li>
1355<p>
1356If the starting point is specified as <code>ref@{Nth}</code>, show the index
1357format.
1358</p>
1359</li>
1360<li>
1361<p>
1362If the starting point was specified as <code>ref@{now}</code>, show the
1363timestamp format.
1364</p>
1365</li>
1366<li>
1367<p>
1368If neither was used, but <code>--date</code> was given on the command line, show
1369the timestamp in the format requested by <code>--date</code>.
1370</p>
1371</li>
1372<li>
1373<p>
1374Otherwise, show the index format.
1375</p>
1376</li>
1377</ol></div>
1378</div></div>
1379<div class="paragraph"><p>Under <code>--pretty=oneline</code>, the commit message is
Junio C Hamanob0e02952008-01-19 08:02:001380prefixed with this information on the same line.
Junio C Hamanoac12f0e2014-09-19 22:32:511381This option cannot be combined with <code>--reverse</code>.
Junio C Hamanoa28a9202012-06-21 07:08:231382See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001383</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591384<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001385--merge
1386</dt>
1387<dd>
1388<p>
1389 After a failed merge, show refs that touch files having a
Junio C Hamano68cf15a2010-11-06 01:01:591390 conflict and don&#8217;t exist on all heads to merge.
Junio C Hamanob0e02952008-01-19 08:02:001391</p>
1392</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591393<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001394--boundary
1395</dt>
1396<dd>
1397<p>
Junio C Hamano27159f82013-06-14 17:19:221398 Output excluded boundary commits. Boundary commits are
Junio C Hamanoac12f0e2014-09-19 22:32:511399 prefixed with <code>-</code>.
Junio C Hamanob0e02952008-01-19 08:02:001400</p>
1401</dd>
Junio C Hamanoa76cb0d2008-08-13 20:04:101402</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271403</div></div>
1404</div>
1405<div class="sect2">
1406<h3 id="_history_simplification">History Simplification</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591407<div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the
Junio C Hamano28363492008-11-14 08:26:311408commits modifying a particular &lt;path&gt;. But there are two parts of
1409<em>History Simplification</em>, one part is selecting the commits and the other
1410is how to do it, as there are various strategies to simplify the history.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591411<div class="paragraph"><p>The following options select the commits to be shown:</p></div>
1412<div class="dlist"><dl>
1413<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311414&lt;paths&gt;
1415</dt>
1416<dd>
1417<p>
1418 Commits modifying the given &lt;paths&gt; are selected.
1419</p>
1420</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591421<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311422--simplify-by-decoration
1423</dt>
1424<dd>
1425<p>
1426 Commits that are referred by some branch or tag are selected.
1427</p>
1428</dd>
1429</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591430<div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div>
1431<div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div>
1432<div class="dlist"><dl>
1433<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311434Default mode
1435</dt>
1436<dd>
1437<p>
1438 Simplifies the history to the simplest history explaining the
1439 final state of the tree. Simplest because it prunes some side
1440 branches if the end result is the same (i.e. merging branches
1441 with the same content)
1442</p>
1443</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591444<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311445--full-history
1446</dt>
1447<dd>
1448<p>
Junio C Hamano15567bc2011-07-23 00:51:591449 Same as the default mode, but does not prune some history.
Junio C Hamano28363492008-11-14 08:26:311450</p>
1451</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591452<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311453--dense
1454</dt>
1455<dd>
1456<p>
1457 Only the selected commits are shown, plus some to have a
1458 meaningful history.
1459</p>
1460</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591461<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311462--sparse
1463</dt>
1464<dd>
1465<p>
1466 All commits in the simplified history are shown.
1467</p>
1468</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591469<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311470--simplify-merges
1471</dt>
1472<dd>
1473<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511474 Additional option to <code>--full-history</code> to remove some needless
Junio C Hamano28363492008-11-14 08:26:311475 merges from the resulting history, as there are no selected
1476 commits contributing to this merge.
1477</p>
1478</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591479<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551480--ancestry-path
1481</dt>
1482<dd>
1483<p>
1484 When given a range of commits to display (e.g. <em>commit1..commit2</em>
1485 or <em>commit2 &#94;commit1</em>), only display commits that exist
1486 directly on the ancestry chain between the <em>commit1</em> and
1487 <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>,
1488 and ancestors of <em>commit2</em>.
1489</p>
1490</dd>
Junio C Hamano28363492008-11-14 08:26:311491</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591492<div class="paragraph"><p>A more detailed explanation follows.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511493<div class="paragraph"><p>Suppose you specified <code>foo</code> as the &lt;paths&gt;. We shall call commits
1494that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff
1495filtered for <code>foo</code>, they look different and equal, respectively.)</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591496<div class="paragraph"><p>In the following, we will always refer to the same example history to
Junio C Hamanoa76cb0d2008-08-13 20:04:101497illustrate the differences between simplification settings. We assume
Junio C Hamanoac12f0e2014-09-19 22:32:511498that you are filtering for a file <code>foo</code> in this commit graph:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101499<div class="listingblock">
1500<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511501<pre><code> .-A---M---N---O---P---Q
Junio C Hamano27159f82013-06-14 17:19:221502 / / / / / /
1503 I B C D E Y
1504 \ / / / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511505 `-------------' X</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101506</div></div>
Junio C Hamano27159f82013-06-14 17:19:221507<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:101508each merge. The commits are:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591509<div class="ulist"><ul>
Junio C Hamanoa76cb0d2008-08-13 20:04:101510<li>
1511<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511512<code>I</code> is the initial commit, in which <code>foo</code> exists with contents
1513 &#8220;asdf&#8221;, and a file <code>quux</code> exists with contents &#8220;quux&#8221;. Initial
1514 commits are compared to an empty tree, so <code>I</code> is !TREESAME.
Junio C Hamanoa76cb0d2008-08-13 20:04:101515</p>
1516</li>
1517<li>
1518<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511519In <code>A</code>, <code>foo</code> contains just &#8220;foo&#8221;.
Junio C Hamanoa76cb0d2008-08-13 20:04:101520</p>
1521</li>
1522<li>
1523<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511524<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:101525 hence TREESAME to all parents.
1526</p>
1527</li>
1528<li>
1529<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511530<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:101531 so it is not TREESAME to any parent.
1532</p>
1533</li>
1534<li>
1535<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511536<code>D</code> sets <code>foo</code> to &#8220;baz&#8221;. Its merge <code>O</code> combines the strings from
1537 <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:101538</p>
1539</li>
1540<li>
1541<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511542<code>E</code> changes <code>quux</code> to &#8220;xyzzy&#8221;, and its merge <code>P</code> combines the
1543 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:221544</p>
1545</li>
1546<li>
1547<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511548<code>X</code> is an independent root commit that added a new file <code>side</code>, and <code>Y</code>
1549 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
1550 <code>Q</code> is TREESAME to <code>P</code>, but not to <code>Y</code>.
Junio C Hamanoa76cb0d2008-08-13 20:04:101551</p>
1552</li>
1553</ul></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511554<div class="paragraph"><p><code>rev-list</code> walks backwards through history, including or excluding
1555commits based on whether <code>--full-history</code> and/or parent rewriting
1556(via <code>--parents</code> or <code>--children</code>) are used. The following settings
Junio C Hamanoa76cb0d2008-08-13 20:04:101557are available.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591558<div class="dlist"><dl>
1559<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101560Default mode
1561</dt>
1562<dd>
1563<p>
1564 Commits are included if they are not TREESAME to any parent
Junio C Hamanoac12f0e2014-09-19 22:32:511565 (though this can be changed, see <code>--sparse</code> below). If the
Junio C Hamanoa76cb0d2008-08-13 20:04:101566 commit was a merge, and it was TREESAME to one parent, follow
1567 only that parent. (Even if there are several TREESAME
1568 parents, follow only one of them.) Otherwise, follow all
1569 parents.
1570</p>
Junio C Hamano68cf15a2010-11-06 01:01:591571<div class="paragraph"><p>This results in:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101572<div class="listingblock">
1573<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511574<pre><code> .-A---N---O
Junio C Hamano89a57342010-06-22 23:22:551575 / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511576 I---------D</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101577</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591578<div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is
Junio C Hamanoac12f0e2014-09-19 22:32:511579available, removed <code>B</code> from consideration entirely. <code>C</code> was
1580considered via <code>N</code>, but is TREESAME. Root commits are compared to an
1581empty tree, so <code>I</code> is !TREESAME.</p></div>
1582<div class="paragraph"><p>Parent/child relations are only visible with <code>--parents</code>, but that does
Junio C Hamanoa76cb0d2008-08-13 20:04:101583not affect the commits selected in default mode, so we have shown the
1584parent lines.</p></div>
1585</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591586<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101587--full-history without parent rewriting
1588</dt>
1589<dd>
1590<p>
1591 This mode differs from the default in one point: always follow
1592 all parents of a merge, even if it is TREESAME to one of them.
1593 Even if more than one side of the merge has commits that are
1594 included, this does not imply that the merge itself is! In
1595 the example, we get
1596</p>
1597<div class="listingblock">
1598<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511599<pre><code> I A B N D O P Q</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101600</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511601<div class="paragraph"><p><code>M</code> was excluded because it is TREESAME to both parents. <code>E</code>,
1602<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:101603do not appear.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591604<div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk
Junio C Hamanoa76cb0d2008-08-13 20:04:101605about the parent/child relationships between the commits, so we show
1606them disconnected.</p></div>
1607</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591608<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101609--full-history with parent rewriting
1610</dt>
1611<dd>
1612<p>
1613 Ordinary commits are only included if they are !TREESAME
Junio C Hamanoac12f0e2014-09-19 22:32:511614 (though this can be changed, see <code>--sparse</code> below).
Junio C Hamanoa76cb0d2008-08-13 20:04:101615</p>
Junio C Hamano68cf15a2010-11-06 01:01:591616<div class="paragraph"><p>Merges are always included. However, their parent list is rewritten:
Junio C Hamanoa76cb0d2008-08-13 20:04:101617Along each parent, prune away commits that are not included
1618themselves. This results in</p></div>
1619<div class="listingblock">
1620<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511621<pre><code> .-A---M---N---O---P---Q
Junio C Hamanoa76cb0d2008-08-13 20:04:101622 / / / / /
1623 I B / D /
1624 \ / / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511625 `-------------'</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101626</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511627<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:101628was pruned away because it is TREESAME, but the parent list of P was
Junio C Hamanoac12f0e2014-09-19 22:32:511629rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and
1630<code>N</code>, and <code>X</code>, <code>Y</code> and <code>Q</code>.</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101631</dd>
1632</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591633<div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME
Junio C Hamanoa76cb0d2008-08-13 20:04:101634affects inclusion:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591635<div class="dlist"><dl>
1636<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471637--dense
1638</dt>
Junio C Hamanoa76cb0d2008-08-13 20:04:101639<dd>
1640<p>
1641 Commits that are walked are included if they are not TREESAME
1642 to any parent.
1643</p>
1644</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591645<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471646--sparse
Junio C Hamanob0e02952008-01-19 08:02:001647</dt>
1648<dd>
1649<p>
Junio C Hamanoa76cb0d2008-08-13 20:04:101650 All commits that are walked are included.
Junio C Hamanob0e02952008-01-19 08:02:001651</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511652<div class="paragraph"><p>Note that without <code>--full-history</code>, this still simplifies merges: if
Junio C Hamanoa76cb0d2008-08-13 20:04:101653one of the parents is TREESAME, we follow only that one, so the other
1654sides of the merge are never walked.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001655</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591656<dt class="hdlist1">
Junio C Hamanoa2f46622008-09-03 05:20:311657--simplify-merges
1658</dt>
1659<dd>
1660<p>
1661 First, build a history graph in the same way that
Junio C Hamanoac12f0e2014-09-19 22:32:511662 <code>--full-history</code> with parent rewriting does (see above).
Junio C Hamanoa2f46622008-09-03 05:20:311663</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511664<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:311665history according to the following rules:</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271666<div class="openblock">
1667<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591668<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311669<li>
1670<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511671Set <code>C'</code> to <code>C</code>.
Junio C Hamanoa2f46622008-09-03 05:20:311672</p>
1673</li>
1674<li>
1675<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511676Replace each parent <code>P</code> of <code>C'</code> with its simplification <code>P'</code>. In
Junio C Hamano27159f82013-06-14 17:19:221677 the process, drop parents that are ancestors of other parents or that are
1678 root commits TREESAME to an empty tree, and remove duplicates, but take care
1679 to never drop all parents that we are TREESAME to.
Junio C Hamanoa2f46622008-09-03 05:20:311680</p>
1681</li>
1682<li>
1683<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511684If after this parent rewriting, <code>C'</code> is a root or merge commit (has
Junio C Hamanoa2f46622008-09-03 05:20:311685 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1686 Otherwise, it is replaced with its only parent.
1687</p>
1688</li>
1689</ul></div>
Junio C Hamano9629d4f2012-12-19 00:28:271690</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591691<div class="paragraph"><p>The effect of this is best shown by way of comparing to
Junio C Hamanoac12f0e2014-09-19 22:32:511692<code>--full-history</code> with parent rewriting. The example turns into:</p></div>
Junio C Hamanoa2f46622008-09-03 05:20:311693<div class="listingblock">
1694<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511695<pre><code> .-A---M---N---O
Junio C Hamanoa2f46622008-09-03 05:20:311696 / / /
1697 I B D
1698 \ / /
Junio C Hamanoac12f0e2014-09-19 22:32:511699 `---------'</code></pre>
Junio C Hamanoa2f46622008-09-03 05:20:311700</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511701<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:271702<div class="openblock">
1703<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591704<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311705<li>
1706<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511707<code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the
1708 other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME.
Junio C Hamanoa2f46622008-09-03 05:20:311709</p>
1710</li>
1711<li>
1712<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511713<code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then
Junio C Hamanoa2f46622008-09-03 05:20:311714 removed completely, because it had one parent and is TREESAME.
1715</p>
1716</li>
Junio C Hamano27159f82013-06-14 17:19:221717<li>
1718<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511719<code>Q</code>'s parent list had <code>Y</code> simplified to <code>X</code>. <code>X</code> was then removed, because it
1720 was a TREESAME root. <code>Q</code> was then removed completely, because it had one
Junio C Hamano27159f82013-06-14 17:19:221721 parent and is TREESAME.
1722</p>
1723</li>
Junio C Hamanoa2f46622008-09-03 05:20:311724</ul></div>
Junio C Hamano9629d4f2012-12-19 00:28:271725</div></div>
Junio C Hamanoa2f46622008-09-03 05:20:311726</dd>
1727</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591728<div class="paragraph"><p>Finally, there is a fifth simplification mode available:</p></div>
1729<div class="dlist"><dl>
1730<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551731--ancestry-path
1732</dt>
1733<dd>
1734<p>
1735 Limit the displayed commits to those directly on the ancestry
Junio C Hamanob73af6c2013-12-03 22:07:111736 chain between the &#8220;from&#8221; and &#8220;to&#8221; commits in the given commit
1737 range. I.e. only display commits that are ancestor of the &#8220;to&#8221;
1738 commit and descendants of the &#8220;from&#8221; commit.
Junio C Hamano89a57342010-06-22 23:22:551739</p>
Junio C Hamano68cf15a2010-11-06 01:01:591740<div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
Junio C Hamano89a57342010-06-22 23:22:551741<div class="listingblock">
1742<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511743<pre><code> D---E-------F
Junio C Hamano89a57342010-06-22 23:22:551744 / \ \
1745 B---C---G---H---I---J
1746 / \
Junio C Hamanoac12f0e2014-09-19 22:32:511747 A-------K---------------L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551748</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511749<div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>,
1750but excludes the ones that are ancestors of <code>D</code>. This is useful to see
1751what happened to the history leading to <code>M</code> since <code>D</code>, in the sense
1752that &#8220;what does <code>M</code> have that did not exist in <code>D</code>&#8221;. The result in this
1753example 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:551754of course).</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511755<div class="paragraph"><p>When we want to find out what commits in <code>M</code> are contaminated with the
1756bug introduced by <code>D</code> and need fixing, however, we might want to view
1757only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e.
1758excluding <code>C</code> and <code>K</code>. This is exactly what the <code>--ancestry-path</code>
Junio C Hamano89a57342010-06-22 23:22:551759option does. Applied to the <em>D..M</em> range, it results in:</p></div>
1760<div class="listingblock">
1761<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511762<pre><code> E-------F
Junio C Hamano89a57342010-06-22 23:22:551763 \ \
1764 G---H---I---J
1765 \
Junio C Hamanoac12f0e2014-09-19 22:32:511766 L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551767</div></div>
1768</dd>
1769</dl></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511770<div class="paragraph"><p>The <code>--simplify-by-decoration</code> option allows you to view only the
Junio C Hamano28363492008-11-14 08:26:311771big picture of the topology of the history, by omitting commits
1772that are not referenced by tags. Commits are marked as !TREESAME
1773(in other words, kept after history simplification rules described
1774above) if (1) they are referenced by tags, or (2) they change the
1775contents of the paths given on the command line. All other
1776commits are marked as TREESAME (subject to be simplified away).</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271777</div>
1778<div class="sect2">
1779<h3 id="_commit_ordering">Commit Ordering</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591780<div class="paragraph"><p>By default, the commits are shown in reverse chronological order.</p></div>
1781<div class="dlist"><dl>
1782<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001783--date-order
1784</dt>
1785<dd>
1786<p>
Junio C Hamanod0316112012-08-22 19:55:291787 Show no parents before all of its children are shown, but
1788 otherwise show commits in the commit timestamp order.
Junio C Hamanob0e02952008-01-19 08:02:001789</p>
1790</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591791<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:181792--author-date-order
1793</dt>
1794<dd>
1795<p>
1796 Show no parents before all of its children are shown, but
1797 otherwise show commits in the author timestamp order.
1798</p>
1799</dd>
1800<dt class="hdlist1">
Junio C Hamanod0316112012-08-22 19:55:291801--topo-order
1802</dt>
1803<dd>
1804<p>
1805 Show no parents before all of its children are shown, and
1806 avoid showing commits on multiple lines of history
1807 intermixed.
1808</p>
1809<div class="paragraph"><p>For example, in a commit history like this:</p></div>
1810<div class="listingblock">
1811<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511812<pre><code> ---1----2----4----7
Junio C Hamanod0316112012-08-22 19:55:291813 \ \
Junio C Hamanoac12f0e2014-09-19 22:32:511814 3----5----6----8---</code></pre>
Junio C Hamanod0316112012-08-22 19:55:291815</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511816<div class="paragraph"><p>where the numbers denote the order of commit timestamps, <code>git
1817rev-list</code> and friends with <code>--date-order</code> show the commits in the
Junio C Hamanod0316112012-08-22 19:55:291818timestamp order: 8 7 6 5 4 3 2 1.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511819<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:2918203 1); some older commits are shown before newer ones in order to
1821avoid showing the commits from two parallel development track mixed
1822together.</p></div>
1823</dd>
1824<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001825--reverse
1826</dt>
1827<dd>
1828<p>
Junio C Hamanof3ca7b82016-10-03 22:27:021829 Output the commits chosen to be shown (see Commit Limiting
1830 section above) in reverse order. Cannot be combined with
1831 <code>--walk-reflogs</code>.
Junio C Hamanob0e02952008-01-19 08:02:001832</p>
1833</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311834</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271835</div>
1836<div class="sect2">
1837<h3 id="_object_traversal">Object Traversal</h3>
Junio C Hamano076ffcc2013-02-06 05:13:211838<div class="paragraph"><p>These options are mostly targeted for packing of Git repositories.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591839<div class="dlist"><dl>
1840<dt class="hdlist1">
Junio C Hamanoeccdd4a2012-09-10 23:28:171841--no-walk[=(sorted|unsorted)]
Junio C Hamanob0e02952008-01-19 08:02:001842</dt>
1843<dd>
1844<p>
Junio C Hamanoeccdd4a2012-09-10 23:28:171845 Only show the given commits, but do not traverse their ancestors.
1846 This has no effect if a range is specified. If the argument
Junio C Hamanoac12f0e2014-09-19 22:32:511847 <code>unsorted</code> is given, the commits are shown in the order they were
1848 given on the command line. Otherwise (if <code>sorted</code> or no argument
Junio C Hamanob73af6c2013-12-03 22:07:111849 was given), the commits are shown in reverse chronological order
Junio C Hamanoeccdd4a2012-09-10 23:28:171850 by commit time.
Junio C Hamanoef57d1e2015-03-25 21:23:001851 Cannot be combined with <code>--graph</code>.
Junio C Hamanob0e02952008-01-19 08:02:001852</p>
1853</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591854<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001855--do-walk
1856</dt>
1857<dd>
1858<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511859 Overrides a previous <code>--no-walk</code>.
Junio C Hamanob0e02952008-01-19 08:02:001860</p>
1861</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311862</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271863</div>
1864<div class="sect2">
1865<h3 id="_commit_formatting">Commit Formatting</h3>
Junio C Hamanod2c978f2011-03-20 19:42:221866<div class="dlist"><dl>
1867<dt class="hdlist1">
1868--pretty[=&lt;format&gt;]
1869</dt>
1870<dt class="hdlist1">
1871--format=&lt;format&gt;
1872</dt>
1873<dd>
1874<p>
1875 Pretty-print the contents of the commit logs in a given format,
1876 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:261877 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em>, <em>format:&lt;string&gt;</em>
1878 and <em>tformat:&lt;string&gt;</em>. When <em>&lt;format&gt;</em> is none of the above,
1879 and has <em>%placeholder</em> in it, it acts as if
1880 <em>--pretty=tformat:&lt;format&gt;</em> were given.
Junio C Hamanod2c978f2011-03-20 19:42:221881</p>
Junio C Hamano6bb32e62015-02-17 22:11:261882<div class="paragraph"><p>See the "PRETTY FORMATS" section for some additional details for each
1883format. When <em>=&lt;format&gt;</em> part is omitted, it defaults to <em>medium</em>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221884<div class="paragraph"><p>Note: you can specify the default pretty format in the repository
Junio C Hamanoa28a9202012-06-21 07:08:231885configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221886</dd>
1887<dt class="hdlist1">
1888--abbrev-commit
1889</dt>
1890<dd>
1891<p>
1892 Instead of showing the full 40-byte hexadecimal commit object
1893 name, show only a partial prefix. Non default number of
1894 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
1895 diff output, if it is displayed).
1896</p>
1897<div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
1898people using 80-column terminals.</p></div>
1899</dd>
1900<dt class="hdlist1">
Junio C Hamanof93530e2011-05-25 23:59:591901--no-abbrev-commit
1902</dt>
1903<dd>
1904<p>
1905 Show the full 40-byte hexadecimal commit object name. This negates
Junio C Hamanoac12f0e2014-09-19 22:32:511906 <code>--abbrev-commit</code> and those options which imply it such as
Junio C Hamano042f2142016-06-27 18:05:051907 "--oneline". It also overrides the <code>log.abbrevCommit</code> variable.
Junio C Hamanof93530e2011-05-25 23:59:591908</p>
1909</dd>
1910<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221911--oneline
1912</dt>
1913<dd>
1914<p>
1915 This is a shorthand for "--pretty=oneline --abbrev-commit"
1916 used together.
1917</p>
1918</dd>
1919<dt class="hdlist1">
Junio C Hamanoc5bb3b32013-08-05 22:43:361920--encoding=&lt;encoding&gt;
Junio C Hamanod2c978f2011-03-20 19:42:221921</dt>
1922<dd>
1923<p>
1924 The commit objects record the encoding used for the log message
1925 in their encoding header; this option can be used to tell the
1926 command to re-code the commit log message in the encoding
1927 preferred by the user. For non plumbing commands this
Junio C Hamano823eebb2015-07-10 22:29:341928 defaults to UTF-8. Note that if an object claims to be encoded
1929 in <code>X</code> and we are outputting in <code>X</code>, we will output the object
1930 verbatim; this means that invalid sequences in the original
1931 commit may be copied to the output.
Junio C Hamanod2c978f2011-03-20 19:42:221932</p>
1933</dd>
1934<dt class="hdlist1">
Junio C Hamano5996b672016-04-13 22:01:411935--expand-tabs=&lt;n&gt;
1936</dt>
1937<dt class="hdlist1">
1938--expand-tabs
1939</dt>
1940<dt class="hdlist1">
1941--no-expand-tabs
1942</dt>
1943<dd>
1944<p>
1945 Perform a tab expansion (replace each tab with enough spaces
1946 to fill to the next display column that is multiple of <em>&lt;n&gt;</em>)
1947 in the log message before showing it in the output.
1948 <code>--expand-tabs</code> is a short-hand for <code>--expand-tabs=8</code>, and
1949 <code>--no-expand-tabs</code> is a short-hand for <code>--expand-tabs=0</code>,
1950 which disables tab expansion.
1951</p>
1952<div class="paragraph"><p>By default, tabs are expanded in pretty formats that indent the log
1953message by 4 spaces (i.e. <em>medium</em>, which is the default, <em>full</em>,
1954and <em>fuller</em>).</p></div>
1955</dd>
1956<dt class="hdlist1">
Junio C Hamano4e6ba272016-01-20 23:23:191957--notes[=&lt;treeish&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:221958</dt>
1959<dd>
1960<p>
Junio C Hamanoa28a9202012-06-21 07:08:231961 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
Junio C Hamanod2c978f2011-03-20 19:42:221962 commit, when showing the commit log message. This is the default
Junio C Hamanoac12f0e2014-09-19 22:32:511963 for <code>git log</code>, <code>git show</code> and <code>git whatchanged</code> commands when
1964 there is no <code>--pretty</code>, <code>--format</code>, or <code>--oneline</code> option given
Junio C Hamano60033462011-05-03 00:48:431965 on the command line.
Junio C Hamanod2c978f2011-03-20 19:42:221966</p>
Junio C Hamano60033462011-05-03 00:48:431967<div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the
Junio C Hamano042f2142016-06-27 18:05:051968<code>core.notesRef</code> and <code>notes.displayRef</code> variables (or corresponding
Junio C Hamanoa28a9202012-06-21 07:08:231969environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div>
Junio C Hamano4e6ba272016-01-20 23:23:191970<div class="paragraph"><p>With an optional <em>&lt;treeish&gt;</em> argument, use the treeish to find the notes
1971to display. The treeish can specify the full refname when it begins
Junio C Hamano1f7c4a52015-10-14 22:15:511972with <code>refs/notes/</code>; when it begins with <code>notes/</code>, <code>refs/</code> and otherwise
1973<code>refs/notes/</code> is prefixed to form a full name of the ref.</p></div>
Junio C Hamano60033462011-05-03 00:48:431974<div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
1975being displayed. Examples: "--notes=foo" will show only notes from
1976"refs/notes/foo"; "--notes=foo --notes" will show both notes from
1977"refs/notes/foo" and from the default notes ref(s).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221978</dd>
1979<dt class="hdlist1">
Junio C Hamano60033462011-05-03 00:48:431980--no-notes
1981</dt>
1982<dd>
1983<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511984 Do not show notes. This negates the above <code>--notes</code> option, by
Junio C Hamano60033462011-05-03 00:48:431985 resetting the list of notes refs from which notes are shown.
1986 Options are parsed in the order given on the command line, so e.g.
1987 "--notes --notes=foo --no-notes --notes=bar" will only show notes
1988 from "refs/notes/bar".
1989</p>
1990</dd>
1991<dt class="hdlist1">
Junio C Hamano4e6ba272016-01-20 23:23:191992--show-notes[=&lt;treeish&gt;]
Junio C Hamano60033462011-05-03 00:48:431993</dt>
1994<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221995--[no-]standard-notes
1996</dt>
1997<dd>
1998<p>
Junio C Hamano60033462011-05-03 00:48:431999 These options are deprecated. Use the above --notes/--no-notes
2000 options instead.
Junio C Hamanod2c978f2011-03-20 19:42:222001</p>
2002</dd>
2003<dt class="hdlist1">
Junio C Hamano0acb1ae2012-09-24 21:28:132004--show-signature
2005</dt>
2006<dd>
2007<p>
2008 Check the validity of a signed commit object by passing the signature
Junio C Hamanoac12f0e2014-09-19 22:32:512009 to <code>gpg --verify</code> and show the output.
Junio C Hamano0acb1ae2012-09-24 21:28:132010</p>
2011</dd>
2012<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222013--relative-date
2014</dt>
2015<dd>
2016<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512017 Synonym for <code>--date=relative</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222018</p>
2019</dd>
2020<dt class="hdlist1">
Junio C Hamano1eb56092015-10-05 20:39:532021--date=&lt;format&gt;
Junio C Hamanod2c978f2011-03-20 19:42:222022</dt>
2023<dd>
2024<p>
2025 Only takes effect for dates shown in human-readable format, such
Junio C Hamanoac12f0e2014-09-19 22:32:512026 as when using <code>--pretty</code>. <code>log.date</code> config variable sets a default
Junio C Hamano1eb56092015-10-05 20:39:532027 value for the log command&#8217;s <code>--date</code> option. By default, dates
2028 are shown in the original time zone (either committer&#8217;s or
2029 author&#8217;s). If <code>-local</code> is appended to the format (e.g.,
2030 <code>iso-local</code>), the user&#8217;s local time zone is used instead.
Junio C Hamanod2c978f2011-03-20 19:42:222031</p>
Junio C Hamanoac12f0e2014-09-19 22:32:512032<div class="paragraph"><p><code>--date=relative</code> shows dates relative to the current time,
Junio C Hamanoe548d1b2016-08-08 22:26:492033e.g. &#8220;2 hours ago&#8221;. The <code>-local</code> option has no effect for
2034<code>--date=relative</code>.</p></div>
Junio C Hamano1eb56092015-10-05 20:39:532035<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:512036<div class="paragraph"><p><code>--date=iso</code> (or <code>--date=iso8601</code>) shows timestamps in a ISO 8601-like format.
2037The differences to the strict ISO 8601 format are:</p></div>
2038<div class="ulist"><ul>
2039<li>
2040<p>
2041a space instead of the <code>T</code> date/time delimiter
2042</p>
2043</li>
2044<li>
2045<p>
2046a space between time and time zone
2047</p>
2048</li>
2049<li>
2050<p>
2051no colon between hours and minutes of the time zone
2052</p>
2053</li>
2054</ul></div>
2055<div class="paragraph"><p><code>--date=iso-strict</code> (or <code>--date=iso8601-strict</code>) shows timestamps in strict
2056ISO 8601 format.</p></div>
2057<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:112058format, often found in email messages.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512059<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:492060<div class="paragraph"><p><code>--date=raw</code> shows the date as seconds since the epoch (1970-01-01
206100:00:00 UTC), followed by a space, and then the timezone as an offset
2062from UTC (a <code>+</code> or <code>-</code> with four digits; the first two are hours, and
2063the second two are minutes). I.e., as if the timestamp were formatted
2064with <code>strftime("%s %z")</code>).
2065Note that the <code>-local</code> option does not affect the seconds-since-epoch
2066value (which is always measured in UTC), but does switch the accompanying
2067timezone value.</p></div>
2068<div class="paragraph"><p><code>--date=unix</code> shows the date as a Unix epoch timestamp (seconds since
20691970). As with <code>--raw</code>, this is always in UTC and therefore <code>-local</code>
2070has no effect.</p></div>
Junio C Hamanod7ed4042015-08-03 19:43:002071<div class="paragraph"><p><code>--date=format:...</code> feeds the format <code>...</code> to your system <code>strftime</code>.
2072Use <code>--date=format:%c</code> to show the date in your system locale&#8217;s
2073preferred format. See the <code>strftime</code> manual for a complete list of
Junio C Hamano1eb56092015-10-05 20:39:532074format placeholders. When using <code>-local</code>, the correct syntax is
2075<code>--date=format-local:...</code>.</p></div>
2076<div class="paragraph"><p><code>--date=default</code> is the default format, and is similar to
2077<code>--date=rfc2822</code>, with a few exceptions:</p></div>
2078<div class="ulist"><ul>
2079<li>
2080<p>
2081there is no comma after the day-of-week
2082</p>
2083</li>
2084<li>
2085<p>
2086the time zone is omitted when the local time zone is used
2087</p>
2088</li>
2089</ul></div>
Junio C Hamanod2c978f2011-03-20 19:42:222090</dd>
2091<dt class="hdlist1">
2092--parents
2093</dt>
2094<dd>
2095<p>
2096 Print also the parents of the commit (in the form "commit parent&#8230;").
2097 Also enables parent rewriting, see <em>History Simplification</em> below.
2098</p>
2099</dd>
2100<dt class="hdlist1">
2101--children
2102</dt>
2103<dd>
2104<p>
2105 Print also the children of the commit (in the form "commit child&#8230;").
2106 Also enables parent rewriting, see <em>History Simplification</em> below.
2107</p>
2108</dd>
2109<dt class="hdlist1">
2110--left-right
2111</dt>
2112<dd>
2113<p>
Junio C Hamanocd451662016-09-13 00:54:092114 Mark which side of a symmetric difference a commit is reachable from.
Junio C Hamanoac12f0e2014-09-19 22:32:512115 Commits from the left side are prefixed with <code>&lt;</code> and those from
2116 the right with <code>&gt;</code>. If combined with <code>--boundary</code>, those
2117 commits are prefixed with <code>-</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222118</p>
2119<div class="paragraph"><p>For example, if you have this topology:</p></div>
2120<div class="listingblock">
2121<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512122<pre><code> y---b---b branch B
Junio C Hamanod2c978f2011-03-20 19:42:222123 / \ /
2124 / .
2125 / / \
Junio C Hamanoac12f0e2014-09-19 22:32:512126 o---x---a---a branch A</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222127</div></div>
2128<div class="paragraph"><p>you would get an output like this:</p></div>
2129<div class="listingblock">
2130<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512131<pre><code> $ git rev-list --left-right --boundary --pretty=oneline A...B
Junio C Hamanod2c978f2011-03-20 19:42:222132
2133 &gt;bbbbbbb... 3rd on b
2134 &gt;bbbbbbb... 2nd on b
2135 &lt;aaaaaaa... 3rd on a
2136 &lt;aaaaaaa... 2nd on a
2137 -yyyyyyy... 1st on b
Junio C Hamanoac12f0e2014-09-19 22:32:512138 -xxxxxxx... 1st on a</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222139</div></div>
2140</dd>
2141<dt class="hdlist1">
2142--graph
2143</dt>
2144<dd>
2145<p>
2146 Draw a text-based graphical representation of the commit history
2147 on the left hand side of the output. This may cause extra lines
2148 to be printed in between commits, in order for the graph history
2149 to be drawn properly.
Junio C Hamanoef57d1e2015-03-25 21:23:002150 Cannot be combined with <code>--no-walk</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222151</p>
2152<div class="paragraph"><p>This enables parent rewriting, see <em>History Simplification</em> below.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512153<div class="paragraph"><p>This implies the <code>--topo-order</code> option by default, but the
2154<code>--date-order</code> option may also be specified.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:222155</dd>
Junio C Hamano624dd4c2014-04-03 21:56:302156<dt class="hdlist1">
2157--show-linear-break[=&lt;barrier&gt;]
2158</dt>
2159<dd>
2160<p>
2161 When --graph is not used, all history branches are flattened
2162 which can make it hard to see that the two consecutive commits
2163 do not belong to a linear branch. This option puts a barrier
Junio C Hamanoac12f0e2014-09-19 22:32:512164 in between them in that case. If <code>&lt;barrier&gt;</code> is specified, it
Junio C Hamano624dd4c2014-04-03 21:56:302165 is the string that will be shown instead of the default one.
2166</p>
2167</dd>
Junio C Hamanod2c978f2011-03-20 19:42:222168</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:272169</div>
2170<div class="sect2">
2171<h3 id="_diff_formatting">Diff Formatting</h3>
Junio C Hamanob73af6c2013-12-03 22:07:112172<div class="paragraph"><p>Listed below are options that control the formatting of diff output.
Junio C Hamanoa28a9202012-06-21 07:08:232173Some of them are specific to <a href="git-rev-list.html">git-rev-list(1)</a>, however other diff
2174options 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:222175<div class="dlist"><dl>
2176<dt class="hdlist1">
2177-c
2178</dt>
2179<dd>
2180<p>
2181 With this option, diff output for a merge commit
2182 shows the differences from each of the parents to the merge result
2183 simultaneously instead of showing pairwise diff between a parent
2184 and the result one at a time. Furthermore, it lists only files
2185 which were modified from all parents.
2186</p>
2187</dd>
2188<dt class="hdlist1">
2189--cc
2190</dt>
2191<dd>
2192<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512193 This flag implies the <code>-c</code> option and further compresses the
Junio C Hamanod2c978f2011-03-20 19:42:222194 patch output by omitting uninteresting hunks whose contents in
2195 the parents have only two variants and the merge result picks
2196 one of them without modification.
2197</p>
2198</dd>
2199<dt class="hdlist1">
2200-m
2201</dt>
2202<dd>
2203<p>
2204 This flag makes the merge commits show the full diff like
2205 regular commits; for each merge parent, a separate log entry
2206 and diff is generated. An exception is that only diff against
Junio C Hamanoac12f0e2014-09-19 22:32:512207 the first parent is shown when <code>--first-parent</code> option is given;
Junio C Hamanod2c978f2011-03-20 19:42:222208 in that case, the output represents the changes the merge
2209 brought <em>into</em> the then-current branch.
2210</p>
2211</dd>
2212<dt class="hdlist1">
2213-r
2214</dt>
2215<dd>
2216<p>
2217 Show recursive diffs.
2218</p>
2219</dd>
2220<dt class="hdlist1">
2221-t
2222</dt>
2223<dd>
2224<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512225 Show the tree objects in the diff output. This implies <code>-r</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222226</p>
2227</dd>
Junio C Hamanod2c978f2011-03-20 19:42:222228</dl></div>
Junio C Hamano0430e3a2007-05-15 03:13:172229</div>
Junio C Hamano9629d4f2012-12-19 00:28:272230</div>
2231</div>
2232<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312233<h2 id="_pretty_formats">PRETTY FORMATS</h2>
Junio C Hamano0430e3a2007-05-15 03:13:172234<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592235<div class="paragraph"><p>If the commit is a merge, and if the pretty-format
Junio C Hamano0430e3a2007-05-15 03:13:172236is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
2237inserted before the <em>Author:</em> line. This line begins with
2238"Merge: " and the sha1s of ancestral commits are printed,
2239separated by spaces. Note that the listed commits may not
2240necessarily be the list of the <strong>direct</strong> parent commits if you
2241have limited your view of history: for example, if you are
2242only interested in changes related to a certain directory or
Junio C Hamanoba4b9282008-07-06 05:20:312243file.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592244<div class="paragraph"><p>There are several built-in formats, and you can define
Junio C Hamanoa574a092010-06-13 19:57:102245additional formats by setting a pretty.&lt;name&gt;
2246config option to either another format name, or a
2247<em>format:</em> string, as described below (see
Junio C Hamanoa28a9202012-06-21 07:08:232248<a href="git-config.html">git-config(1)</a>). Here are the details of the
Junio C Hamanoa574a092010-06-13 19:57:102249built-in formats:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592250<div class="ulist"><ul>
Junio C Hamanoa340aaa2006-11-23 02:47:332251<li>
2252<p>
2253<em>oneline</em>
2254</p>
2255<div class="literalblock">
2256<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512257<pre><code>&lt;sha1&gt; &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332258</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592259<div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:332260</li>
2261<li>
2262<p>
2263<em>short</em>
2264</p>
2265<div class="literalblock">
2266<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512267<pre><code>commit &lt;sha1&gt;
2268Author: &lt;author&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332269</div></div>
2270<div class="literalblock">
2271<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512272<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332273</div></div>
2274</li>
2275<li>
2276<p>
2277<em>medium</em>
2278</p>
2279<div class="literalblock">
2280<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512281<pre><code>commit &lt;sha1&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332282Author: &lt;author&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512283Date: &lt;author date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332284</div></div>
2285<div class="literalblock">
2286<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512287<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332288</div></div>
2289<div class="literalblock">
2290<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512291<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332292</div></div>
2293</li>
2294<li>
2295<p>
2296<em>full</em>
2297</p>
2298<div class="literalblock">
2299<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512300<pre><code>commit &lt;sha1&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332301Author: &lt;author&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512302Commit: &lt;committer&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332303</div></div>
2304<div class="literalblock">
2305<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512306<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332307</div></div>
2308<div class="literalblock">
2309<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512310<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332311</div></div>
2312</li>
2313<li>
2314<p>
2315<em>fuller</em>
2316</p>
2317<div class="literalblock">
2318<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512319<pre><code>commit &lt;sha1&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182320Author: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312321AuthorDate: &lt;author date&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182322Commit: &lt;committer&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512323CommitDate: &lt;committer date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332324</div></div>
2325<div class="literalblock">
2326<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512327<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332328</div></div>
2329<div class="literalblock">
2330<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512331<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332332</div></div>
2333</li>
2334<li>
2335<p>
2336<em>email</em>
2337</p>
2338<div class="literalblock">
2339<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512340<pre><code>From &lt;sha1&gt; &lt;date&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332341From: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312342Date: &lt;author date&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512343Subject: [PATCH] &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332344</div></div>
2345<div class="literalblock">
2346<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512347<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332348</div></div>
2349</li>
2350<li>
2351<p>
2352<em>raw</em>
2353</p>
Junio C Hamano68cf15a2010-11-06 01:01:592354<div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
Junio C Hamanoe3f080d2013-04-22 02:27:132355stored in the commit object. Notably, the SHA-1s are
Junio C Hamanoa340aaa2006-11-23 02:47:332356displayed in full, regardless of whether --abbrev or
2357--no-abbrev are used, and <em>parents</em> information show the
Junio C Hamanod75148a2014-04-08 19:48:382358true parent commits, without taking grafts or history
Junio C Hamano85f1fde2015-06-01 20:37:322359simplification into account. Note that this format affects the way
2360commits are displayed, but not the way the diff is shown e.g. with
2361<code>git log --raw</code>. To get full object names in a raw diff format,
2362use <code>--no-abbrev</code>.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:332363</li>
Junio C Hamanoa3fd83c2007-03-02 10:34:362364<li>
2365<p>
Junio C Hamanoe32ec8b2010-06-02 23:32:312366<em>format:&lt;string&gt;</em>
Junio C Hamanoa3fd83c2007-03-02 10:34:362367</p>
Junio C Hamano68cf15a2010-11-06 01:01:592368<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:362369you want to show. It works a little bit like printf format,
2370with the notable exception that you get a newline with <em>%n</em>
Junio C Hamanoba4b9282008-07-06 05:20:312371instead of <em>\n</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592372<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:312373would show something like this:</p></div>
Junio C Hamano0430e3a2007-05-15 03:13:172374<div class="listingblock">
2375<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512376<pre><code>The author of fe6e0ee was Junio C Hamano, 23 hours ago
2377The 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:172378</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592379<div class="paragraph"><p>The placeholders are:</p></div>
2380<div class="ulist"><ul>
Junio C Hamanoa3fd83c2007-03-02 10:34:362381<li>
2382<p>
2383<em>%H</em>: commit hash
2384</p>
2385</li>
2386<li>
2387<p>
2388<em>%h</em>: abbreviated commit hash
2389</p>
2390</li>
2391<li>
2392<p>
2393<em>%T</em>: tree hash
2394</p>
2395</li>
2396<li>
2397<p>
2398<em>%t</em>: abbreviated tree hash
2399</p>
2400</li>
2401<li>
2402<p>
2403<em>%P</em>: parent hashes
2404</p>
2405</li>
2406<li>
2407<p>
2408<em>%p</em>: abbreviated parent hashes
2409</p>
2410</li>
2411<li>
2412<p>
2413<em>%an</em>: author name
2414</p>
2415</li>
2416<li>
2417<p>
Junio C Hamano04e768d2013-04-23 19:19:262418<em>%aN</em>: author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2419 or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamanof5a93622008-07-16 03:23:572420</p>
2421</li>
2422<li>
2423<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362424<em>%ae</em>: author email
2425</p>
2426</li>
2427<li>
2428<p>
Junio C Hamano04e768d2013-04-23 19:19:262429<em>%aE</em>: author email (respecting .mailmap, see
2430 <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:192431</p>
2432</li>
2433<li>
2434<p>
Junio C Hamanoa387df32008-08-29 08:56:582435<em>%ad</em>: author date (format respects --date= option)
Junio C Hamanoa3fd83c2007-03-02 10:34:362436</p>
2437</li>
2438<li>
2439<p>
2440<em>%aD</em>: author date, RFC2822 style
2441</p>
2442</li>
2443<li>
2444<p>
2445<em>%ar</em>: author date, relative
2446</p>
2447</li>
2448<li>
2449<p>
2450<em>%at</em>: author date, UNIX timestamp
2451</p>
2452</li>
2453<li>
2454<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512455<em>%ai</em>: author date, ISO 8601-like format
2456</p>
2457</li>
2458<li>
2459<p>
2460<em>%aI</em>: author date, strict ISO 8601 format
Junio C Hamano02f130b2007-07-14 08:26:562461</p>
2462</li>
2463<li>
2464<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362465<em>%cn</em>: committer name
2466</p>
2467</li>
2468<li>
2469<p>
Junio C Hamano04e768d2013-04-23 19:19:262470<em>%cN</em>: committer name (respecting .mailmap, see
2471 <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:572472</p>
2473</li>
2474<li>
2475<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362476<em>%ce</em>: committer email
2477</p>
2478</li>
2479<li>
2480<p>
Junio C Hamano04e768d2013-04-23 19:19:262481<em>%cE</em>: committer email (respecting .mailmap, see
2482 <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:192483</p>
2484</li>
2485<li>
2486<p>
Junio C Hamano53fe0312014-09-09 21:16:172487<em>%cd</em>: committer date (format respects --date= option)
Junio C Hamanoa3fd83c2007-03-02 10:34:362488</p>
2489</li>
2490<li>
2491<p>
2492<em>%cD</em>: committer date, RFC2822 style
2493</p>
2494</li>
2495<li>
2496<p>
2497<em>%cr</em>: committer date, relative
2498</p>
2499</li>
2500<li>
2501<p>
2502<em>%ct</em>: committer date, UNIX timestamp
2503</p>
2504</li>
2505<li>
2506<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512507<em>%ci</em>: committer date, ISO 8601-like format
2508</p>
2509</li>
2510<li>
2511<p>
2512<em>%cI</em>: committer date, strict ISO 8601 format
Junio C Hamano02f130b2007-07-14 08:26:562513</p>
2514</li>
2515<li>
2516<p>
Junio C Hamanoa28a9202012-06-21 07:08:232517<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:022518</p>
2519</li>
2520<li>
2521<p>
Junio C Hamano00b9f1a2014-09-29 23:11:282522<em>%D</em>: ref names without the " (", ")" wrapping.
2523</p>
2524</li>
2525<li>
2526<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362527<em>%e</em>: encoding
2528</p>
2529</li>
2530<li>
2531<p>
2532<em>%s</em>: subject
2533</p>
2534</li>
2535<li>
2536<p>
Junio C Hamano5f9a6f02009-04-06 08:26:562537<em>%f</em>: sanitized subject line, suitable for a filename
2538</p>
2539</li>
2540<li>
2541<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362542<em>%b</em>: body
2543</p>
2544</li>
2545<li>
2546<p>
Junio C Hamanocb39aea2010-05-09 07:24:482547<em>%B</em>: raw body (unwrapped subject and body)
2548</p>
2549</li>
2550<li>
2551<p>
Junio C Hamano3b70d3c2009-11-21 17:37:372552<em>%N</em>: commit notes
2553</p>
2554</li>
2555<li>
2556<p>
Junio C Hamano0acb1ae2012-09-24 21:28:132557<em>%GG</em>: raw verification message from GPG for a signed commit
2558</p>
2559</li>
2560<li>
2561<p>
Junio C Hamano4a401d52016-10-26 22:24:372562<em>%G?</em>: show "G" for a good (valid) signature,
2563 "B" for a bad signature,
2564 "U" for a good signature with unknown validity,
2565 "X" for a good signature that has expired,
2566 "Y" for a good signature made by an expired key,
2567 "R" for a good signature made by a revoked key,
2568 "E" if the signature cannot be checked (e.g. missing key)
2569 and "N" for no signature
Junio C Hamano0acb1ae2012-09-24 21:28:132570</p>
2571</li>
2572<li>
2573<p>
2574<em>%GS</em>: show the name of the signer for a signed commit
2575</p>
2576</li>
2577<li>
2578<p>
Junio C Hamano5e7f1312013-03-21 22:49:012579<em>%GK</em>: show the key used to sign a signed commit
2580</p>
2581</li>
2582<li>
2583<p>
Junio C Hamanoe548d1b2016-08-08 22:26:492584<em>%gD</em>: reflog selector, e.g., <code>refs/stash@{1}</code> or
2585 <code>refs/stash@{2 minutes ago</code>}; the format follows the rules described
2586 for the <code>-g</code> option. The portion before the <code>@</code> is the refname as
2587 given on the command line (so <code>git log -g refs/heads/master</code> would
2588 yield <code>refs/heads/master@{0}</code>).
Junio C Hamanoc21ab052009-10-31 04:03:552589</p>
2590</li>
2591<li>
2592<p>
Junio C Hamanoe548d1b2016-08-08 22:26:492593<em>%gd</em>: shortened reflog selector; same as <code>%gD</code>, but the refname
2594 portion is shortened for human readability (so <code>refs/heads/master</code>
2595 becomes just <code>master</code>).
Junio C Hamanoc21ab052009-10-31 04:03:552596</p>
2597</li>
2598<li>
2599<p>
Junio C Hamano962f3a32011-12-22 20:21:442600<em>%gn</em>: reflog identity name
2601</p>
2602</li>
2603<li>
2604<p>
Junio C Hamano04e768d2013-04-23 19:19:262605<em>%gN</em>: reflog identity name (respecting .mailmap, see
2606 <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:442607</p>
2608</li>
2609<li>
2610<p>
2611<em>%ge</em>: reflog identity email
2612</p>
2613</li>
2614<li>
2615<p>
Junio C Hamano04e768d2013-04-23 19:19:262616<em>%gE</em>: reflog identity email (respecting .mailmap, see
2617 <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:442618</p>
2619</li>
2620<li>
2621<p>
Junio C Hamanoc21ab052009-10-31 04:03:552622<em>%gs</em>: reflog subject
2623</p>
2624</li>
2625<li>
2626<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362627<em>%Cred</em>: switch color to red
2628</p>
2629</li>
2630<li>
2631<p>
2632<em>%Cgreen</em>: switch color to green
2633</p>
2634</li>
2635<li>
2636<p>
2637<em>%Cblue</em>: switch color to blue
2638</p>
2639</li>
2640<li>
2641<p>
2642<em>%Creset</em>: reset color
2643</p>
2644</li>
2645<li>
2646<p>
Junio C Hamanoc0859f72016-10-17 22:22:572647<em>%C(&#8230;)</em>: color specification, as described under Values in the
2648 "CONFIGURATION FILE" section of <a href="git-config.html">git-config(1)</a>;
Junio C Hamanoac12f0e2014-09-19 22:32:512649 adding <code>auto,</code> at the beginning will emit color only when colors are
2650 enabled for log output (by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and
2651 respecting the <code>auto</code> settings of the former if we are going to a
2652 terminal). <code>auto</code> alone (i.e. <code>%C(auto)</code>) will turn on auto coloring
Junio C Hamano04e768d2013-04-23 19:19:262653 on the next placeholders until the color is switched again.
Junio C Hamanocc0cb312009-01-22 03:38:502654</p>
2655</li>
2656<li>
2657<p>
Junio C Hamanocd451662016-09-13 00:54:092658<em>%m</em>: left (<code>&lt;</code>), right (<code>&gt;</code>) or boundary (<code>-</code>) mark
Junio C Hamanod9e0e5d2007-04-14 16:22:042659</p>
2660</li>
2661<li>
2662<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:362663<em>%n</em>: newline
2664</p>
Junio C Hamano0430e3a2007-05-15 03:13:172665</li>
Junio C Hamanob78d2592008-04-09 09:39:082666<li>
2667<p>
Junio C Hamanoa9701f02010-01-21 00:42:162668<em>%%</em>: a raw <em>%</em>
2669</p>
2670</li>
2671<li>
2672<p>
Junio C Hamanob78d2592008-04-09 09:39:082673<em>%x00</em>: print a byte from a hex code
2674</p>
2675</li>
Junio C Hamanobf984de2009-11-23 06:11:192676<li>
2677<p>
2678<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:232679 <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanobf984de2009-11-23 06:11:192680</p>
2681</li>
Junio C Hamano04e768d2013-04-23 19:19:262682<li>
2683<p>
2684<em>%&lt;(&lt;N&gt;[,trunc|ltrunc|mtrunc])</em>: make the next placeholder take at
2685 least N columns, padding spaces on the right if necessary.
2686 Optionally truncate at the beginning (ltrunc), the middle (mtrunc)
2687 or the end (trunc) if the output is longer than N columns.
2688 Note that truncating only works correctly with N &gt;= 2.
2689</p>
2690</li>
2691<li>
2692<p>
2693<em>%&lt;|(&lt;N&gt;)</em>: make the next placeholder take at least until Nth
2694 columns, padding spaces on the right if necessary
2695</p>
2696</li>
2697<li>
2698<p>
2699<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>
2700 respectively, but padding spaces on the left
2701</p>
2702</li>
2703<li>
2704<p>
2705<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>
2706 respectively, except that if the next placeholder takes more spaces
2707 than given and there are spaces on its left, use those spaces
2708</p>
2709</li>
2710<li>
2711<p>
2712<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>
2713 respectively, but padding both sides (i.e. the text is centered)
Junio C Hamano222ed822017-06-02 06:24:062714</p>
2715</li>
2716<li>
2717<p>
2718%(trailers): display the trailers of the body as interpreted by
Junio C Hamano52b1cfb2016-12-20 00:18:362719 <a href="git-interpret-trailers.html">git-interpret-trailers(1)</a>
Junio C Hamano04e768d2013-04-23 19:19:262720</p>
2721</li>
Junio C Hamanoba4b9282008-07-06 05:20:312722</ul></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:362723</li>
Junio C Hamanoc21ab052009-10-31 04:03:552724</ul></div>
2725<div class="admonitionblock">
2726<table><tr>
2727<td class="icon">
2728<div class="title">Note</div>
2729</td>
2730<td class="content">Some placeholders may depend on other options given to the
Junio C Hamanoac12f0e2014-09-19 22:32:512731revision traversal engine. For example, the <code>%g*</code> reflog options will
Junio C Hamanoc21ab052009-10-31 04:03:552732insert an empty string unless we are traversing reflog entries (e.g., by
Junio C Hamano00b9f1a2014-09-29 23:11:282733<code>git log -g</code>). The <code>%d</code> and <code>%D</code> placeholders will use the "short"
2734decoration format if <code>--decorate</code> was not already provided on the command
2735line.</td>
Junio C Hamanoc21ab052009-10-31 04:03:552736</tr></table>
2737</div>
Junio C Hamanoac12f0e2014-09-19 22:32:512738<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:592739is inserted immediately before the expansion if and only if the
2740placeholder expands to a non-empty string.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512741<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:592742immediately precede the expansion are deleted if and only if the
2743placeholder expands to an empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592744<div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
Junio C Hamano89a57342010-06-22 23:22:552745is inserted immediately before the expansion if and only if the
2746placeholder expands to a non-empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592747<div class="ulist"><ul>
Junio C Hamano6fb124c2008-06-13 10:04:012748<li>
2749<p>
2750<em>tformat:</em>
2751</p>
Junio C Hamano68cf15a2010-11-06 01:01:592752<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:012753provides "terminator" semantics instead of "separator" semantics. In
2754other words, each commit has the message terminator character (usually a
2755newline) appended, rather than a separator placed between entries.
2756This means that the final entry of a single-line format will be properly
2757terminated with a new line, just as the "oneline" format does.
Junio C Hamanoba4b9282008-07-06 05:20:312758For example:</p></div>
Junio C Hamano6fb124c2008-06-13 10:04:012759<div class="listingblock">
2760<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512761<pre><code>$ git log -2 --pretty=format:%h 4da45bef \
Junio C Hamano6fb124c2008-06-13 10:04:012762 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
27634da45be
27647134973 -- NO NEWLINE
2765
2766$ git log -2 --pretty=tformat:%h 4da45bef \
2767 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
27684da45be
Junio C Hamanoac12f0e2014-09-19 22:32:5127697134973</code></pre>
Junio C Hamano6fb124c2008-06-13 10:04:012770</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512771<div class="paragraph"><p>In addition, any unrecognized string that has a <code>%</code> in it is interpreted
2772as if it has <code>tformat:</code> in front of it. For example, these two are
Junio C Hamano0a235222009-03-06 08:21:092773equivalent:</p></div>
2774<div class="listingblock">
2775<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512776<pre><code>$ git log -2 --pretty=tformat:%h 4da45bef
2777$ git log -2 --pretty=%h 4da45bef</code></pre>
Junio C Hamano0a235222009-03-06 08:21:092778</div></div>
Junio C Hamano6fb124c2008-06-13 10:04:012779</li>
Junio C Hamanoba4b9282008-07-06 05:20:312780</ul></div>
Junio C Hamano1a4e8412005-12-27 08:17:232781</div>
Junio C Hamano9629d4f2012-12-19 00:28:272782</div>
2783<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:592784<h2 id="_common_diff_options">COMMON DIFF OPTIONS</h2>
Junio C Hamanod2c978f2011-03-20 19:42:222785<div class="sectionbody">
2786<div class="dlist"><dl>
2787<dt class="hdlist1">
2788-p
2789</dt>
2790<dt class="hdlist1">
2791-u
2792</dt>
2793<dt class="hdlist1">
2794--patch
2795</dt>
2796<dd>
2797<p>
2798 Generate patch (see section on generating patches).
Junio C Hamanod2c978f2011-03-20 19:42:222799</p>
2800</dd>
2801<dt class="hdlist1">
Junio C Hamano58f587a2013-07-22 19:20:592802-s
2803</dt>
2804<dt class="hdlist1">
2805--no-patch
2806</dt>
2807<dd>
2808<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512809 Suppress diff output. Useful for commands like <code>git show</code> that
2810 show the patch by default, or to cancel the effect of <code>--patch</code>.
Junio C Hamano58f587a2013-07-22 19:20:592811</p>
2812</dd>
2813<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222814-U&lt;n&gt;
2815</dt>
2816<dt class="hdlist1">
2817--unified=&lt;n&gt;
2818</dt>
2819<dd>
2820<p>
2821 Generate diffs with &lt;n&gt; lines of context instead of
2822 the usual three.
Junio C Hamanoac12f0e2014-09-19 22:32:512823 Implies <code>-p</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222824</p>
2825</dd>
2826<dt class="hdlist1">
2827--raw
2828</dt>
2829<dd>
2830<p>
Junio C Hamano85f1fde2015-06-01 20:37:322831 For each commit, show a summary of changes using the raw diff
2832 format. See the "RAW OUTPUT FORMAT" section of
2833 <a href="git-diff.html">git-diff(1)</a>. This is different from showing the log
2834 itself in raw format, which you can achieve with
2835 <code>--format=raw</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222836</p>
2837</dd>
2838<dt class="hdlist1">
2839--patch-with-raw
2840</dt>
2841<dd>
2842<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512843 Synonym for <code>-p --raw</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222844</p>
2845</dd>
2846<dt class="hdlist1">
Junio C Hamanoad70bf02016-09-26 23:44:272847--indent-heuristic
2848</dt>
2849<dt class="hdlist1">
2850--no-indent-heuristic
2851</dt>
Junio C Hamano5f888332016-06-13 19:28:312852<dd>
2853<p>
Junio C Hamanoad70bf02016-09-26 23:44:272854 These are to help debugging and tuning experimental heuristics
2855 (which are off by default) that shift diff hunk boundaries to
2856 make patches easier to read.
Junio C Hamano5f888332016-06-13 19:28:312857</p>
2858</dd>
2859<dt class="hdlist1">
Junio C Hamano5a73f302011-10-14 05:58:342860--minimal
2861</dt>
2862<dd>
2863<p>
2864 Spend extra time to make sure the smallest possible
2865 diff is produced.
2866</p>
2867</dd>
2868<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222869--patience
2870</dt>
2871<dd>
2872<p>
2873 Generate a diff using the "patience diff" algorithm.
2874</p>
2875</dd>
2876<dt class="hdlist1">
Junio C Hamanoaea9e6b2012-03-07 00:17:112877--histogram
2878</dt>
2879<dd>
2880<p>
2881 Generate a diff using the "histogram diff" algorithm.
2882</p>
2883</dd>
2884<dt class="hdlist1">
Junio C Hamano80ad00d2013-02-18 00:19:032885--diff-algorithm={patience|minimal|histogram|myers}
2886</dt>
2887<dd>
2888<p>
2889 Choose a diff algorithm. The variants are as follows:
2890</p>
2891<div class="openblock">
2892<div class="content">
2893<div class="dlist"><dl>
2894<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512895<code>default</code>, <code>myers</code>
Junio C Hamano80ad00d2013-02-18 00:19:032896</dt>
2897<dd>
2898<p>
2899 The basic greedy diff algorithm. Currently, this is the default.
2900</p>
2901</dd>
2902<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512903<code>minimal</code>
Junio C Hamano80ad00d2013-02-18 00:19:032904</dt>
2905<dd>
2906<p>
2907 Spend extra time to make sure the smallest possible diff is
2908 produced.
2909</p>
2910</dd>
2911<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512912<code>patience</code>
Junio C Hamano80ad00d2013-02-18 00:19:032913</dt>
2914<dd>
2915<p>
2916 Use "patience diff" algorithm when generating patches.
2917</p>
2918</dd>
2919<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512920<code>histogram</code>
Junio C Hamano80ad00d2013-02-18 00:19:032921</dt>
2922<dd>
2923<p>
2924 This algorithm extends the patience algorithm to "support
2925 low-occurrence common elements".
2926</p>
2927</dd>
2928</dl></div>
2929</div></div>
2930<div class="paragraph"><p>For instance, if you configured diff.algorithm variable to a
2931non-default value and want to use the default one, then you
Junio C Hamanoac12f0e2014-09-19 22:32:512932have to use <code>--diff-algorithm=default</code> option.</p></div>
Junio C Hamano80ad00d2013-02-18 00:19:032933</dd>
2934<dt class="hdlist1">
Junio C Hamano4c4b0122011-06-30 01:19:322935--stat[=&lt;width&gt;[,&lt;name-width&gt;[,&lt;count&gt;]]]
Junio C Hamanod2c978f2011-03-20 19:42:222936</dt>
2937<dd>
2938<p>
Junio C Hamanoaea9e6b2012-03-07 00:17:112939 Generate a diffstat. By default, as much space as necessary
2940 will be used for the filename part, and the rest for the graph
2941 part. Maximum width defaults to terminal width, or 80 columns
Junio C Hamano7f2b3cb2012-06-22 22:42:392942 if not connected to a terminal, and can be overridden by
Junio C Hamanoac12f0e2014-09-19 22:32:512943 <code>&lt;width&gt;</code>. The width of the filename part can be limited by
2944 giving another width <code>&lt;name-width&gt;</code> after a comma. The width
Junio C Hamanoaea9e6b2012-03-07 00:17:112945 of the graph part can be limited by using
Junio C Hamanoac12f0e2014-09-19 22:32:512946 <code>--stat-graph-width=&lt;width&gt;</code> (affects all commands generating
2947 a stat graph) or by setting <code>diff.statGraphWidth=&lt;width&gt;</code>
2948 (does not affect <code>git format-patch</code>).
2949 By giving a third parameter <code>&lt;count&gt;</code>, you can limit the
2950 output to the first <code>&lt;count&gt;</code> lines, followed by <code>...</code> if
Junio C Hamanoaea9e6b2012-03-07 00:17:112951 there are more.
Junio C Hamanod2c978f2011-03-20 19:42:222952</p>
Junio C Hamanoac12f0e2014-09-19 22:32:512953<div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=&lt;width&gt;</code>,
2954<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:222955</dd>
2956<dt class="hdlist1">
2957--numstat
2958</dt>
2959<dd>
2960<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512961 Similar to <code>--stat</code>, but shows number of added and
Junio C Hamanod2c978f2011-03-20 19:42:222962 deleted lines in decimal notation and pathname without
2963 abbreviation, to make it more machine friendly. For
Junio C Hamanoac12f0e2014-09-19 22:32:512964 binary files, outputs two <code>-</code> instead of saying
2965 <code>0 0</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222966</p>
2967</dd>
2968<dt class="hdlist1">
2969--shortstat
2970</dt>
2971<dd>
2972<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512973 Output only the last line of the <code>--stat</code> format containing total
Junio C Hamanod2c978f2011-03-20 19:42:222974 number of modified files, as well as number of added and deleted
2975 lines.
2976</p>
2977</dd>
2978<dt class="hdlist1">
Junio C Hamano1c222c52011-05-13 19:55:322979--dirstat[=&lt;param1,param2,&#8230;&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:222980</dt>
2981<dd>
2982<p>
Junio C Hamano1c222c52011-05-13 19:55:322983 Output the distribution of relative amount of changes for each
Junio C Hamanoac12f0e2014-09-19 22:32:512984 sub-directory. The behavior of <code>--dirstat</code> can be customized by
Junio C Hamano1c222c52011-05-13 19:55:322985 passing it a comma separated list of parameters.
Junio C Hamanoac12f0e2014-09-19 22:32:512986 The defaults are controlled by the <code>diff.dirstat</code> configuration
Junio C Hamanoa28a9202012-06-21 07:08:232987 variable (see <a href="git-config.html">git-config(1)</a>).
Junio C Hamano1c222c52011-05-13 19:55:322988 The following parameters are available:
Junio C Hamanod2c978f2011-03-20 19:42:222989</p>
Junio C Hamano9629d4f2012-12-19 00:28:272990<div class="openblock">
2991<div class="content">
Junio C Hamano1c222c52011-05-13 19:55:322992<div class="dlist"><dl>
2993<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:512994<code>changes</code>
Junio C Hamano1c222c52011-05-13 19:55:322995</dt>
2996<dd>
2997<p>
2998 Compute the dirstat numbers by counting the lines that have been
2999 removed from the source, or added to the destination. This ignores
3000 the amount of pure code movements within a file. In other words,
3001 rearranging lines in a file is not counted as much as other changes.
3002 This is the default behavior when no parameter is given.
3003</p>
Junio C Hamanod2c978f2011-03-20 19:42:223004</dd>
3005<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513006<code>lines</code>
Junio C Hamanod2c978f2011-03-20 19:42:223007</dt>
3008<dd>
3009<p>
Junio C Hamano1c222c52011-05-13 19:55:323010 Compute the dirstat numbers by doing the regular line-based diff
3011 analysis, and summing the removed/added line counts. (For binary
3012 files, count 64-byte chunks instead, since binary files have no
Junio C Hamanoac12f0e2014-09-19 22:32:513013 natural concept of lines). This is a more expensive <code>--dirstat</code>
3014 behavior than the <code>changes</code> behavior, but it does count rearranged
Junio C Hamano1c222c52011-05-13 19:55:323015 lines within a file as much as other changes. The resulting output
Junio C Hamanoac12f0e2014-09-19 22:32:513016 is consistent with what you get from the other <code>--*stat</code> options.
Junio C Hamanod2c978f2011-03-20 19:42:223017</p>
3018</dd>
3019<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513020<code>files</code>
Junio C Hamano1c222c52011-05-13 19:55:323021</dt>
3022<dd>
3023<p>
3024 Compute the dirstat numbers by counting the number of files changed.
3025 Each changed file counts equally in the dirstat analysis. This is
Junio C Hamanoac12f0e2014-09-19 22:32:513026 the computationally cheapest <code>--dirstat</code> behavior, since it does
Junio C Hamano1c222c52011-05-13 19:55:323027 not have to look at the file contents at all.
3028</p>
3029</dd>
3030<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513031<code>cumulative</code>
Junio C Hamano1c222c52011-05-13 19:55:323032</dt>
3033<dd>
3034<p>
3035 Count changes in a child directory for the parent directory as well.
Junio C Hamanoac12f0e2014-09-19 22:32:513036 Note that when using <code>cumulative</code>, the sum of the percentages
Junio C Hamano1c222c52011-05-13 19:55:323037 reported may exceed 100%. The default (non-cumulative) behavior can
Junio C Hamanoac12f0e2014-09-19 22:32:513038 be specified with the <code>noncumulative</code> parameter.
Junio C Hamano1c222c52011-05-13 19:55:323039</p>
3040</dd>
3041<dt class="hdlist1">
3042&lt;limit&gt;
3043</dt>
3044<dd>
3045<p>
3046 An integer parameter specifies a cut-off percent (3% by default).
3047 Directories contributing less than this percentage of the changes
3048 are not shown in the output.
3049</p>
3050</dd>
3051</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:273052</div></div>
Junio C Hamano1c222c52011-05-13 19:55:323053<div class="paragraph"><p>Example: The following will count changed files, while ignoring
3054directories with less than 10% of the total amount of changed files,
3055and accumulating child directory counts in the parent directories:
Junio C Hamanoac12f0e2014-09-19 22:32:513056<code>--dirstat=files,10,cumulative</code>.</p></div>
Junio C Hamano1c222c52011-05-13 19:55:323057</dd>
3058<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223059--summary
3060</dt>
3061<dd>
3062<p>
3063 Output a condensed summary of extended header information
3064 such as creations, renames and mode changes.
3065</p>
3066</dd>
3067<dt class="hdlist1">
3068--patch-with-stat
3069</dt>
3070<dd>
3071<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513072 Synonym for <code>-p --stat</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223073</p>
3074</dd>
3075<dt class="hdlist1">
3076-z
3077</dt>
3078<dd>
3079<p>
3080 Separate the commits with NULs instead of with new newlines.
3081</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513082<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:223083pathnames and use NULs as output field terminators.</p></div>
Junio C Hamano0f6f3bf2017-03-13 07:01:533084<div class="paragraph"><p>Without this option, pathnames with "unusual" characters are quoted as
3085explained for the configuration variable <code>core.quotePath</code> (see
3086<a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223087</dd>
3088<dt class="hdlist1">
3089--name-only
3090</dt>
3091<dd>
3092<p>
3093 Show only names of changed files.
3094</p>
3095</dd>
3096<dt class="hdlist1">
3097--name-status
3098</dt>
3099<dd>
3100<p>
3101 Show only names and status of changed files. See the description
Junio C Hamanoac12f0e2014-09-19 22:32:513102 of the <code>--diff-filter</code> option on what the status letters mean.
Junio C Hamanod2c978f2011-03-20 19:42:223103</p>
3104</dd>
3105<dt class="hdlist1">
3106--submodule[=&lt;format&gt;]
3107</dt>
3108<dd>
3109<p>
Junio C Hamanocd451662016-09-13 00:54:093110 Specify how differences in submodules are shown. When specifying
3111 <code>--submodule=short</code> the <em>short</em> format is used. This format just
3112 shows the names of the commits at the beginning and end of the range.
3113 When <code>--submodule</code> or <code>--submodule=log</code> is specified, the <em>log</em>
3114 format is used. This format lists the commits in the range like
3115 <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does. When <code>--submodule=diff</code>
3116 is specified, the <em>diff</em> format is used. This format shows an
3117 inline diff of the changes in the submodule contents between the
3118 commit range. Defaults to <code>diff.submodule</code> or the <em>short</em> format
3119 if the config option is unset.
Junio C Hamanod2c978f2011-03-20 19:42:223120</p>
3121</dd>
3122<dt class="hdlist1">
3123--color[=&lt;when&gt;]
3124</dt>
3125<dd>
3126<p>
3127 Show colored diff.
Junio C Hamanoac12f0e2014-09-19 22:32:513128 <code>--color</code> (i.e. without <em>=&lt;when&gt;</em>) is the same as <code>--color=always</code>.
3129 <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:223130</p>
3131</dd>
3132<dt class="hdlist1">
3133--no-color
3134</dt>
3135<dd>
3136<p>
Junio C Hamano5f2627d2011-05-06 20:23:483137 Turn off colored diff.
Junio C Hamanoac12f0e2014-09-19 22:32:513138 It is the same as <code>--color=never</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223139</p>
3140</dd>
3141<dt class="hdlist1">
3142--word-diff[=&lt;mode&gt;]
3143</dt>
3144<dd>
3145<p>
3146 Show a word diff, using the &lt;mode&gt; to delimit changed words.
3147 By default, words are delimited by whitespace; see
Junio C Hamanoac12f0e2014-09-19 22:32:513148 <code>--word-diff-regex</code> below. The &lt;mode&gt; defaults to <em>plain</em>, and
Junio C Hamanod2c978f2011-03-20 19:42:223149 must be one of:
3150</p>
Junio C Hamano9629d4f2012-12-19 00:28:273151<div class="openblock">
3152<div class="content">
Junio C Hamanod2c978f2011-03-20 19:42:223153<div class="dlist"><dl>
3154<dt class="hdlist1">
3155color
3156</dt>
3157<dd>
3158<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513159 Highlight changed words using only colors. Implies <code>--color</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223160</p>
3161</dd>
3162<dt class="hdlist1">
3163plain
3164</dt>
3165<dd>
3166<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513167 Show words as <code>[-removed-]</code> and <code>{+added+}</code>. Makes no
Junio C Hamanod2c978f2011-03-20 19:42:223168 attempts to escape the delimiters if they appear in the input,
3169 so the output may be ambiguous.
3170</p>
3171</dd>
3172<dt class="hdlist1">
3173porcelain
3174</dt>
3175<dd>
3176<p>
3177 Use a special line-based format intended for script
3178 consumption. Added/removed/unchanged runs are printed in the
Junio C Hamanoac12f0e2014-09-19 22:32:513179 usual unified diff format, starting with a <code>+</code>/<code>-</code>/` `
Junio C Hamanod2c978f2011-03-20 19:42:223180 character at the beginning of the line and extending to the
3181 end of the line. Newlines in the input are represented by a
Junio C Hamanoac12f0e2014-09-19 22:32:513182 tilde <code>~</code> on a line of its own.
Junio C Hamanod2c978f2011-03-20 19:42:223183</p>
3184</dd>
3185<dt class="hdlist1">
3186none
3187</dt>
3188<dd>
3189<p>
3190 Disable word diff again.
3191</p>
3192</dd>
3193</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:273194</div></div>
Junio C Hamanod2c978f2011-03-20 19:42:223195<div class="paragraph"><p>Note that despite the name of the first mode, color is used to
3196highlight the changed parts in all modes if enabled.</p></div>
3197</dd>
3198<dt class="hdlist1">
3199--word-diff-regex=&lt;regex&gt;
3200</dt>
3201<dd>
3202<p>
3203 Use &lt;regex&gt; to decide what a word is, instead of considering
3204 runs of non-whitespace to be a word. Also implies
Junio C Hamanoac12f0e2014-09-19 22:32:513205 <code>--word-diff</code> unless it was already enabled.
Junio C Hamanod2c978f2011-03-20 19:42:223206</p>
3207<div class="paragraph"><p>Every non-overlapping match of the
3208&lt;regex&gt; is considered a word. Anything between these matches is
3209considered whitespace and ignored(!) for the purposes of finding
Junio C Hamanoac12f0e2014-09-19 22:32:513210differences. You may want to append <code>|[^[:space:]]</code> to your regular
Junio C Hamanod2c978f2011-03-20 19:42:223211expression to make sure that it matches all non-whitespace characters.
3212A match that contains a newline is silently truncated(!) at the
3213newline.</p></div>
Junio C Hamano713eded2015-12-03 00:24:023214<div class="paragraph"><p>For example, <code>--word-diff-regex=.</code> will treat each character as a word
3215and, correspondingly, show differences character by character.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223216<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:243217<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:223218overrides any diff driver or configuration setting. Diff drivers
3219override configuration settings.</p></div>
3220</dd>
3221<dt class="hdlist1">
3222--color-words[=&lt;regex&gt;]
3223</dt>
3224<dd>
3225<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513226 Equivalent to <code>--word-diff=color</code> plus (if a regex was
3227 specified) <code>--word-diff-regex=&lt;regex&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223228</p>
3229</dd>
3230<dt class="hdlist1">
3231--no-renames
3232</dt>
3233<dd>
3234<p>
3235 Turn off rename detection, even when the configuration
3236 file gives the default to do so.
3237</p>
3238</dd>
3239<dt class="hdlist1">
3240--check
3241</dt>
3242<dd>
3243<p>
Junio C Hamano84ea1e42016-04-08 21:53:483244 Warn if changes introduce conflict markers or whitespace errors.
3245 What are considered whitespace errors is controlled by <code>core.whitespace</code>
Junio C Hamano6005bfa2011-06-23 00:51:223246 configuration. By default, trailing whitespaces (including
3247 lines that solely consist of whitespaces) and a space character
3248 that is immediately followed by a tab character inside the
3249 initial indent of the line are considered whitespace errors.
3250 Exits with non-zero status if problems are found. Not compatible
3251 with --exit-code.
Junio C Hamanod2c978f2011-03-20 19:42:223252</p>
3253</dd>
3254<dt class="hdlist1">
Junio C Hamano8c5d5942015-06-11 19:37:483255--ws-error-highlight=&lt;kind&gt;
3256</dt>
3257<dd>
3258<p>
3259 Highlight whitespace errors on lines specified by &lt;kind&gt;
3260 in the color specified by <code>color.diff.whitespace</code>. &lt;kind&gt;
3261 is a comma separated list of <code>old</code>, <code>new</code>, <code>context</code>. When
3262 this option is not given, only whitespace errors in <code>new</code>
3263 lines are highlighted. E.g. <code>--ws-error-highlight=new,old</code>
3264 highlights whitespace errors on both deleted and added lines.
3265 <code>all</code> can be used as a short-hand for <code>old,new,context</code>.
Junio C Hamano4a401d52016-10-26 22:24:373266 The <code>diff.wsErrorHighlight</code> configuration variable can be
3267 used to specify the default behaviour.
Junio C Hamano8c5d5942015-06-11 19:37:483268</p>
3269</dd>
3270<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223271--full-index
3272</dt>
3273<dd>
3274<p>
3275 Instead of the first handful of characters, show the full
3276 pre- and post-image blob object names on the "index"
3277 line when generating patch format output.
3278</p>
3279</dd>
3280<dt class="hdlist1">
3281--binary
3282</dt>
3283<dd>
3284<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513285 In addition to <code>--full-index</code>, output a binary diff that
3286 can be applied with <code>git-apply</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223287</p>
3288</dd>
3289<dt class="hdlist1">
3290--abbrev[=&lt;n&gt;]
3291</dt>
3292<dd>
3293<p>
3294 Instead of showing the full 40-byte hexadecimal object
3295 name in diff-raw format output and diff-tree header
3296 lines, show only a partial prefix. This is
Junio C Hamanoac12f0e2014-09-19 22:32:513297 independent of the <code>--full-index</code> option above, which controls
Junio C Hamanod2c978f2011-03-20 19:42:223298 the diff-patch output format. Non default number of
Junio C Hamanoac12f0e2014-09-19 22:32:513299 digits can be specified with <code>--abbrev=&lt;n&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223300</p>
3301</dd>
3302<dt class="hdlist1">
3303-B[&lt;n&gt;][/&lt;m&gt;]
3304</dt>
3305<dt class="hdlist1">
3306--break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]
3307</dt>
3308<dd>
3309<p>
3310 Break complete rewrite changes into pairs of delete and
3311 create. This serves two purposes:
3312</p>
3313<div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file
3314not as a series of deletion and insertion mixed together with a very
3315few lines that happen to match textually as the context, but as a
3316single deletion of everything old followed by a single insertion of
Junio C Hamanoac12f0e2014-09-19 22:32:513317everything new, and the number <code>m</code> controls this aspect of the -B
3318option (defaults to 60%). <code>-B/70%</code> specifies that less than 30% of the
Junio C Hamano076ffcc2013-02-06 05:13:213319original should remain in the result for Git to consider it a total
Junio C Hamanod2c978f2011-03-20 19:42:223320rewrite (i.e. otherwise the resulting patch will be a series of
3321deletion and insertion mixed together with context lines).</p></div>
3322<div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
3323source of a rename (usually -M only considers a file that disappeared
Junio C Hamanoac12f0e2014-09-19 22:32:513324as the source of a rename), and the number <code>n</code> controls this aspect of
3325the -B option (defaults to 50%). <code>-B20%</code> specifies that a change with
Junio C Hamanod2c978f2011-03-20 19:42:223326addition and deletion compared to 20% or more of the file&#8217;s size are
3327eligible for being picked up as a possible source of a rename to
3328another file.</p></div>
3329</dd>
3330<dt class="hdlist1">
3331-M[&lt;n&gt;]
3332</dt>
3333<dt class="hdlist1">
3334--find-renames[=&lt;n&gt;]
3335</dt>
3336<dd>
3337<p>
3338 If generating diffs, detect and report renames for each commit.
3339 For following files across renames while traversing history, see
Junio C Hamanoac12f0e2014-09-19 22:32:513340 <code>--follow</code>.
3341 If <code>n</code> is specified, it is a threshold on the similarity
Junio C Hamanod2c978f2011-03-20 19:42:223342 index (i.e. amount of addition/deletions compared to the
Junio C Hamanoac12f0e2014-09-19 22:32:513343 file&#8217;s size). For example, <code>-M90%</code> means Git should consider a
Junio C Hamanod2c978f2011-03-20 19:42:223344 delete/add pair to be a rename if more than 90% of the file
Junio C Hamanoac12f0e2014-09-19 22:32:513345 hasn&#8217;t changed. Without a <code>%</code> sign, the number is to be read as
3346 a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes
3347 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is
3348 the same as <code>-M5%</code>. To limit detection to exact renames, use
3349 <code>-M100%</code>. The default similarity index is 50%.
Junio C Hamanod2c978f2011-03-20 19:42:223350</p>
3351</dd>
3352<dt class="hdlist1">
3353-C[&lt;n&gt;]
3354</dt>
3355<dt class="hdlist1">
3356--find-copies[=&lt;n&gt;]
3357</dt>
3358<dd>
3359<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513360 Detect copies as well as renames. See also <code>--find-copies-harder</code>.
3361 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:223362</p>
3363</dd>
3364<dt class="hdlist1">
3365--find-copies-harder
3366</dt>
3367<dd>
3368<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513369 For performance reasons, by default, <code>-C</code> option finds copies only
Junio C Hamanod2c978f2011-03-20 19:42:223370 if the original file of the copy was modified in the same
3371 changeset. This flag makes the command
3372 inspect unmodified files as candidates for the source of
3373 copy. This is a very expensive operation for large
3374 projects, so use it with caution. Giving more than one
Junio C Hamanoac12f0e2014-09-19 22:32:513375 <code>-C</code> option has the same effect.
Junio C Hamanod2c978f2011-03-20 19:42:223376</p>
3377</dd>
3378<dt class="hdlist1">
Junio C Hamanob02377c2011-04-28 22:26:023379-D
3380</dt>
3381<dt class="hdlist1">
3382--irreversible-delete
3383</dt>
3384<dd>
3385<p>
3386 Omit the preimage for deletes, i.e. print only the header but not
Junio C Hamanoac12f0e2014-09-19 22:32:513387 the diff between the preimage and <code>/dev/null</code>. The resulting patch
3388 is not meant to be applied with <code>patch</code> or <code>git apply</code>; this is
Junio C Hamanob02377c2011-04-28 22:26:023389 solely for people who want to just concentrate on reviewing the
3390 text after the change. In addition, the output obviously lack
3391 enough information to apply such a patch in reverse, even manually,
3392 hence the name of the option.
3393</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513394<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:023395of a delete/create pair.</p></div>
3396</dd>
3397<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223398-l&lt;num&gt;
3399</dt>
3400<dd>
3401<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513402 The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n
Junio C Hamanod2c978f2011-03-20 19:42:223403 is the number of potential rename/copy targets. This
3404 option prevents rename/copy detection from running if
3405 the number of rename/copy targets exceeds the specified
3406 number.
3407</p>
3408</dd>
3409<dt class="hdlist1">
3410--diff-filter=[(A|C|D|M|R|T|U|X|B)&#8230;[*]]
3411</dt>
3412<dd>
3413<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513414 Select only files that are Added (<code>A</code>), Copied (<code>C</code>),
3415 Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their
3416 type (i.e. regular file, symlink, submodule, &#8230;) changed (<code>T</code>),
3417 are Unmerged (<code>U</code>), are
3418 Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>).
Junio C Hamanod2c978f2011-03-20 19:42:223419 Any combination of the filter characters (including none) can be used.
Junio C Hamanoac12f0e2014-09-19 22:32:513420 When <code>*</code> (All-or-none) is added to the combination, all
Junio C Hamanod2c978f2011-03-20 19:42:223421 paths are selected if there is any file that matches
3422 other criteria in the comparison; if there is no file
3423 that matches other criteria, nothing is selected.
3424</p>
Junio C Hamanoeed15af2016-07-25 22:49:423425<div class="paragraph"><p>Also, these upper-case letters can be downcased to exclude. E.g.
3426<code>--diff-filter=ad</code> excludes added and deleted paths.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223427</dd>
3428<dt class="hdlist1">
3429-S&lt;string&gt;
3430</dt>
3431<dd>
3432<p>
Junio C Hamanof1f5a7b2013-06-11 22:23:523433 Look for differences that change the number of occurrences of
3434 the specified string (i.e. addition/deletion) in a file.
3435 Intended for the scripter&#8217;s use.
Junio C Hamanod2c978f2011-03-20 19:42:223436</p>
Junio C Hamanof1f5a7b2013-06-11 22:23:523437<div class="paragraph"><p>It is useful when you&#8217;re looking for an exact block of code (like a
3438struct), and want to know the history of that block since it first
3439came into being: use the feature iteratively to feed the interesting
Junio C Hamanoac12f0e2014-09-19 22:32:513440block in the preimage back into <code>-S</code>, and keep going until you get the
Junio C Hamanof1f5a7b2013-06-11 22:23:523441very first version of the block.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223442</dd>
3443<dt class="hdlist1">
3444-G&lt;regex&gt;
3445</dt>
3446<dd>
3447<p>
Junio C Hamanof1f5a7b2013-06-11 22:23:523448 Look for differences whose patch text contains added/removed
3449 lines that match &lt;regex&gt;.
Junio C Hamanod2c978f2011-03-20 19:42:223450</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513451<div class="paragraph"><p>To illustrate the difference between <code>-S&lt;regex&gt; --pickaxe-regex</code> and
3452<code>-G&lt;regex&gt;</code>, consider a commit with the following diff in the same
Junio C Hamanof1f5a7b2013-06-11 22:23:523453file:</p></div>
3454<div class="listingblock">
3455<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513456<pre><code>+ return !regexec(regexp, two-&gt;ptr, 1, &amp;regmatch, 0);
Junio C Hamanof1f5a7b2013-06-11 22:23:523457...
Junio C Hamanoac12f0e2014-09-19 22:32:513458- hit = !regexec(regexp, mf2.ptr, 1, &amp;regmatch, 0);</code></pre>
Junio C Hamanof1f5a7b2013-06-11 22:23:523459</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513460<div class="paragraph"><p>While <code>git log -G"regexec\(regexp"</code> will show this commit, <code>git log
3461-S"regexec\(regexp" --pickaxe-regex</code> will not (because the number of
Junio C Hamanof1f5a7b2013-06-11 22:23:523462occurrences of that string did not change).</p></div>
3463<div class="paragraph"><p>See the <em>pickaxe</em> entry in <a href="gitdiffcore.html">gitdiffcore(7)</a> for more
3464information.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223465</dd>
3466<dt class="hdlist1">
3467--pickaxe-all
3468</dt>
3469<dd>
3470<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513471 When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that
Junio C Hamanod2c978f2011-03-20 19:42:223472 changeset, not just the files that contain the change
3473 in &lt;string&gt;.
3474</p>
3475</dd>
3476<dt class="hdlist1">
3477--pickaxe-regex
3478</dt>
3479<dd>
3480<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513481 Treat the &lt;string&gt; given to <code>-S</code> as an extended POSIX regular
Junio C Hamanof1f5a7b2013-06-11 22:23:523482 expression to match.
Junio C Hamanod2c978f2011-03-20 19:42:223483</p>
3484</dd>
3485<dt class="hdlist1">
3486-O&lt;orderfile&gt;
3487</dt>
3488<dd>
3489<p>
Junio C Hamanobcd98f42017-01-24 00:12:163490 Control the order in which files appear in the output.
Junio C Hamano322c6242015-03-23 21:32:463491 This overrides the <code>diff.orderFile</code> configuration variable
3492 (see <a href="git-config.html">git-config(1)</a>). To cancel <code>diff.orderFile</code>,
Junio C Hamanoac12f0e2014-09-19 22:32:513493 use <code>-O/dev/null</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223494</p>
Junio C Hamanobcd98f42017-01-24 00:12:163495<div class="paragraph"><p>The output order is determined by the order of glob patterns in
3496&lt;orderfile&gt;.
3497All files with pathnames that match the first pattern are output
3498first, all files with pathnames that match the second pattern (but not
3499the first) are output next, and so on.
3500All files with pathnames that do not match any pattern are output
3501last, as if there was an implicit match-all pattern at the end of the
3502file.
3503If multiple pathnames have the same rank (they match the same pattern
3504but no earlier patterns), their output order relative to each other is
3505the normal order.</p></div>
3506<div class="paragraph"><p>&lt;orderfile&gt; is parsed as follows:</p></div>
3507<div class="openblock">
3508<div class="content">
3509<div class="ulist"><ul>
3510<li>
3511<p>
3512Blank lines are ignored, so they can be used as separators for
3513 readability.
3514</p>
3515</li>
3516<li>
3517<p>
3518Lines starting with a hash ("<code>#</code>") are ignored, so they can be used
3519 for comments. Add a backslash ("<code>\</code>") to the beginning of the
3520 pattern if it starts with a hash.
3521</p>
3522</li>
3523<li>
3524<p>
3525Each other line contains a single pattern.
3526</p>
3527</li>
3528</ul></div>
3529</div></div>
3530<div class="paragraph"><p>Patterns have the same syntax and semantics as patterns used for
3531fnmantch(3) without the FNM_PATHNAME flag, except a pathname also
3532matches a pattern if removing any number of the final pathname
3533components matches the pattern. For example, the pattern "<code>foo*bar</code>"
3534matches "<code>fooasdfbar</code>" and "<code>foo/bar/baz/asdf</code>" but not "<code>foobarx</code>".</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223535</dd>
3536<dt class="hdlist1">
3537-R
3538</dt>
3539<dd>
3540<p>
3541 Swap two inputs; that is, show differences from index or
3542 on-disk file to tree contents.
3543</p>
3544</dd>
3545<dt class="hdlist1">
3546--relative[=&lt;path&gt;]
3547</dt>
3548<dd>
3549<p>
3550 When run from a subdirectory of the project, it can be
3551 told to exclude changes outside the directory and show
3552 pathnames relative to it with this option. When you are
3553 not in a subdirectory (e.g. in a bare repository), you
3554 can name which subdirectory to make the output relative
3555 to by giving a &lt;path&gt; as an argument.
3556</p>
3557</dd>
3558<dt class="hdlist1">
3559-a
3560</dt>
3561<dt class="hdlist1">
3562--text
3563</dt>
3564<dd>
3565<p>
3566 Treat all files as text.
3567</p>
3568</dd>
3569<dt class="hdlist1">
3570--ignore-space-at-eol
3571</dt>
3572<dd>
3573<p>
3574 Ignore changes in whitespace at EOL.
3575</p>
3576</dd>
3577<dt class="hdlist1">
3578-b
3579</dt>
3580<dt class="hdlist1">
3581--ignore-space-change
3582</dt>
3583<dd>
3584<p>
3585 Ignore changes in amount of whitespace. This ignores whitespace
3586 at line end, and considers all other sequences of one or
3587 more whitespace characters to be equivalent.
3588</p>
3589</dd>
3590<dt class="hdlist1">
3591-w
3592</dt>
3593<dt class="hdlist1">
3594--ignore-all-space
3595</dt>
3596<dd>
3597<p>
3598 Ignore whitespace when comparing lines. This ignores
3599 differences even if one line has whitespace where the other
3600 line has none.
3601</p>
3602</dd>
3603<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:183604--ignore-blank-lines
3605</dt>
3606<dd>
3607<p>
3608 Ignore changes whose lines are all blank.
3609</p>
3610</dd>
3611<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223612--inter-hunk-context=&lt;lines&gt;
3613</dt>
3614<dd>
3615<p>
3616 Show the context between diff hunks, up to the specified number
3617 of lines, thereby fusing hunks that are close to each other.
Junio C Hamanobcd98f42017-01-24 00:12:163618 Defaults to <code>diff.interHunkContext</code> or 0 if the config option
3619 is unset.
Junio C Hamanod2c978f2011-03-20 19:42:223620</p>
3621</dd>
3622<dt class="hdlist1">
Junio C Hamano11821ed2011-10-19 18:42:093623-W
3624</dt>
3625<dt class="hdlist1">
3626--function-context
3627</dt>
3628<dd>
3629<p>
3630 Show whole surrounding functions of changes.
3631</p>
3632</dd>
3633<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223634--ext-diff
3635</dt>
3636<dd>
3637<p>
3638 Allow an external diff helper to be executed. If you set an
Junio C Hamanoa28a9202012-06-21 07:08:233639 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
3640 to use this option with <a href="git-log.html">git-log(1)</a> and friends.
Junio C Hamanod2c978f2011-03-20 19:42:223641</p>
3642</dd>
3643<dt class="hdlist1">
3644--no-ext-diff
3645</dt>
3646<dd>
3647<p>
3648 Disallow external diff drivers.
3649</p>
3650</dd>
3651<dt class="hdlist1">
Junio C Hamanoc652aed2011-07-07 01:14:313652--textconv
3653</dt>
3654<dt class="hdlist1">
3655--no-textconv
3656</dt>
3657<dd>
3658<p>
3659 Allow (or disallow) external text conversion filters to be run
Junio C Hamanoa28a9202012-06-21 07:08:233660 when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for
Junio C Hamanoc652aed2011-07-07 01:14:313661 details. Because textconv filters are typically a one-way
3662 conversion, the resulting diff is suitable for human
3663 consumption, but cannot be applied. For this reason, textconv
Junio C Hamanoa28a9202012-06-21 07:08:233664 filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and
3665 <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:313666 diff plumbing commands.
3667</p>
3668</dd>
3669<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223670--ignore-submodules[=&lt;when&gt;]
3671</dt>
3672<dd>
3673<p>
3674 Ignore changes to submodules in the diff generation. &lt;when&gt; can be
Junio C Hamanoc7102962013-05-29 23:57:173675 either "none", "untracked", "dirty" or "all", which is the default.
Junio C Hamanod2c978f2011-03-20 19:42:223676 Using "none" will consider the submodule modified when it either contains
3677 untracked or modified files or its HEAD differs from the commit recorded
3678 in the superproject and can be used to override any settings of the
Junio C Hamanoa28a9202012-06-21 07:08:233679 <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:223680 "untracked" is used submodules are not considered dirty when they only
3681 contain untracked content (but they are still scanned for modified
3682 content). Using "dirty" ignores all changes to the work tree of submodules,
3683 only changes to the commits stored in the superproject are shown (this was
3684 the behavior until 1.7.0). Using "all" hides all changes to submodules.
3685</p>
3686</dd>
3687<dt class="hdlist1">
3688--src-prefix=&lt;prefix&gt;
3689</dt>
3690<dd>
3691<p>
3692 Show the given source prefix instead of "a/".
3693</p>
3694</dd>
3695<dt class="hdlist1">
3696--dst-prefix=&lt;prefix&gt;
3697</dt>
3698<dd>
3699<p>
3700 Show the given destination prefix instead of "b/".
3701</p>
3702</dd>
3703<dt class="hdlist1">
3704--no-prefix
3705</dt>
3706<dd>
3707<p>
3708 Do not show any source or destination prefix.
3709</p>
3710</dd>
Junio C Hamanocd451662016-09-13 00:54:093711<dt class="hdlist1">
3712--line-prefix=&lt;prefix&gt;
3713</dt>
3714<dd>
3715<p>
3716 Prepend an additional prefix to every line of output.
3717</p>
3718</dd>
Junio C Hamanof7017f12016-10-27 23:31:343719<dt class="hdlist1">
3720--ita-invisible-in-index
3721</dt>
3722<dd>
3723<p>
3724 By default entries added by "git add -N" appear as an existing
3725 empty file in "git diff" and a new file in "git diff --cached".
3726 This option makes the entry appear as a new file in "git diff"
3727 and non-existent in "git diff --cached". This option could be
3728 reverted with <code>--ita-visible-in-index</code>. Both options are
3729 experimental and could be removed in future.
3730</p>
3731</dd>
Junio C Hamanod2c978f2011-03-20 19:42:223732</dl></div>
3733<div class="paragraph"><p>For more detailed explanation on these common options, see also
Junio C Hamanoa28a9202012-06-21 07:08:233734<a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223735</div>
Junio C Hamano9629d4f2012-12-19 00:28:273736</div>
3737<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:313738<h2 id="_generating_patches_with_p">Generating patches with -p</h2>
Junio C Hamano00b8b632007-12-07 09:50:493739<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:593740<div class="paragraph"><p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
Junio C Hamano92d80372016-07-13 22:00:053741with a <code>-p</code> option, "git diff" without the <code>--raw</code> option, or
Junio C Hamano00b8b632007-12-07 09:50:493742"git log" with the "-p" option, they
3743do not produce the output described above; instead they produce a
3744patch file. You can customize the creation of such patches via the
Junio C Hamano042f2142016-06-27 18:05:053745<code>GIT_EXTERNAL_DIFF</code> and the <code>GIT_DIFF_OPTS</code> environment variables.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593746<div class="paragraph"><p>What the -p option produces is slightly different from the traditional
Junio C Hamano7f9fa862010-10-19 23:51:143747diff format:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593748<div class="olist arabic"><ol class="arabic">
Junio C Hamano00b8b632007-12-07 09:50:493749<li>
3750<p>
Junio C Hamano7f9fa862010-10-19 23:51:143751It is preceded with a "git diff" header that looks like this:
Junio C Hamano00b8b632007-12-07 09:50:493752</p>
3753<div class="literalblock">
3754<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513755<pre><code>diff --git a/file1 b/file2</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493756</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513757<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:493758involved. Especially, even for a creation or a deletion,
Junio C Hamanoac12f0e2014-09-19 22:32:513759<code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p></div>
3760<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:493761name of the source file of the rename/copy and the name of
Junio C Hamanoba4b9282008-07-06 05:20:313762the file that rename/copy produces, respectively.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493763</li>
3764<li>
3765<p>
3766It is followed by one or more extended header lines:
3767</p>
3768<div class="literalblock">
3769<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513770<pre><code>old mode &lt;mode&gt;
Junio C Hamano00b8b632007-12-07 09:50:493771new mode &lt;mode&gt;
3772deleted file mode &lt;mode&gt;
3773new file mode &lt;mode&gt;
3774copy from &lt;path&gt;
3775copy to &lt;path&gt;
3776rename from &lt;path&gt;
3777rename to &lt;path&gt;
3778similarity index &lt;number&gt;
3779dissimilarity index &lt;number&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:513780index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493781</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:593782<div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type
Junio C Hamano7f9fa862010-10-19 23:51:143783and file permission bits.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513784<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:593785<div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and
Junio C Hamano7f9fa862010-10-19 23:51:143786the dissimilarity index is the percentage of changed lines. It
3787is a rounded down integer, followed by a percent sign. The
3788similarity index value of 100% is thus reserved for two equal
3789files, while 100% dissimilarity means that no line from the old
3790file made it into the new one.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593791<div class="paragraph"><p>The index line includes the SHA-1 checksum before and after the change.
Junio C Hamano7f9fa862010-10-19 23:51:143792The &lt;mode&gt; is included if the file mode does not change; otherwise,
3793separate lines indicate the old and the new mode.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493794</li>
3795<li>
3796<p>
Junio C Hamano0f6f3bf2017-03-13 07:01:533797Pathnames with "unusual" characters are quoted as explained for
3798 the configuration variable <code>core.quotePath</code> (see
3799 <a href="git-config.html">git-config(1)</a>).
Junio C Hamano00b8b632007-12-07 09:50:493800</p>
3801</li>
Junio C Hamano7f9fa862010-10-19 23:51:143802<li>
3803<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513804All the <code>file1</code> files in the output refer to files before the
3805 commit, and all the <code>file2</code> files refer to files after the commit.
Junio C Hamano7f9fa862010-10-19 23:51:143806 It is incorrect to apply each change to each file sequentially. For
3807 example, this patch will swap a and b:
3808</p>
3809<div class="literalblock">
3810<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513811<pre><code>diff --git a/a b/b
Junio C Hamano7f9fa862010-10-19 23:51:143812rename from a
3813rename to b
3814diff --git a/b b/a
3815rename from b
Junio C Hamanoac12f0e2014-09-19 22:32:513816rename to a</code></pre>
Junio C Hamano7f9fa862010-10-19 23:51:143817</div></div>
3818</li>
Junio C Hamanoba4b9282008-07-06 05:20:313819</ol></div>
Junio C Hamano00b8b632007-12-07 09:50:493820</div>
Junio C Hamano9629d4f2012-12-19 00:28:273821</div>
3822<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:313823<h2 id="_combined_diff_format">combined diff format</h2>
Junio C Hamano00b8b632007-12-07 09:50:493824<div class="sectionbody">
Junio C Hamano1dbca522015-05-22 20:48:553825<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:433826produce a <em>combined diff</em> when showing a merge. This is the default
Junio C Hamanoa28a9202012-06-21 07:08:233827format when showing merges with <a href="git-diff.html">git-diff(1)</a> or
Junio C Hamano1dbca522015-05-22 20:48:553828<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:433829of these commands to force generation of diffs with individual parents
3830of a merge.</p></div>
3831<div class="paragraph"><p>A <em>combined diff</em> format looks like this:</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493832<div class="listingblock">
3833<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513834<pre><code>diff --combined describe.c
Junio C Hamano00b8b632007-12-07 09:50:493835index fabadb8,cc95eb0..4866510
3836--- a/describe.c
3837+++ b/describe.c
3838@@@ -98,20 -98,12 +98,20 @@@
3839 return (a_date &gt; b_date) ? -1 : (a_date == b_date) ? 0 : 1;
3840 }
3841
3842- static void describe(char *arg)
3843 -static void describe(struct commit *cmit, int last_one)
3844++static void describe(char *arg, int last_one)
3845 {
3846 + unsigned char sha1[20];
3847 + struct commit *cmit;
3848 struct commit_list *list;
3849 static int initialized = 0;
3850 struct commit_name *n;
3851
3852 + if (get_sha1(arg, sha1) &lt; 0)
3853 + usage(describe_usage);
3854 + cmit = lookup_commit_reference(sha1);
3855 + if (!cmit)
3856 + usage(describe_usage);
3857 +
3858 if (!initialized) {
3859 initialized = 1;
Junio C Hamanoac12f0e2014-09-19 22:32:513860 for_each_ref(get_name);</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493861</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:593862<div class="olist arabic"><ol class="arabic">
Junio C Hamano00b8b632007-12-07 09:50:493863<li>
3864<p>
3865It is preceded with a "git diff" header, that looks like
Junio C Hamano92d80372016-07-13 22:00:053866 this (when <code>-c</code> option is used):
Junio C Hamano00b8b632007-12-07 09:50:493867</p>
3868<div class="literalblock">
3869<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513870<pre><code>diff --combined file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493871</div></div>
Junio C Hamano92d80372016-07-13 22:00:053872<div class="paragraph"><p>or like this (when <code>--cc</code> option is used):</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493873<div class="literalblock">
3874<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513875<pre><code>diff --cc file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493876</div></div>
3877</li>
3878<li>
3879<p>
3880It is followed by one or more extended header lines
3881 (this example shows a merge with two parents):
3882</p>
3883<div class="literalblock">
3884<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513885<pre><code>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
Junio C Hamano00b8b632007-12-07 09:50:493886mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;
3887new file mode &lt;mode&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:513888deleted file mode &lt;mode&gt;,&lt;mode&gt;</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493889</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513890<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:493891the &lt;mode&gt; is different from the rest. Extended headers with
3892information about detected contents movement (renames and
3893copying detection) are designed to work with diff of two
Junio C Hamanoba4b9282008-07-06 05:20:313894&lt;tree-ish&gt; and are not used by combined diff format.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493895</li>
3896<li>
3897<p>
3898It is followed by two-line from-file/to-file header
3899</p>
3900<div class="literalblock">
3901<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513902<pre><code>--- a/file
3903+++ b/file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:493904</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:593905<div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff
Junio C Hamanoac12f0e2014-09-19 22:32:513906format, <code>/dev/null</code> is used to signal created or deleted
Junio C Hamanoba4b9282008-07-06 05:20:313907files.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493908</li>
3909<li>
3910<p>
3911Chunk header format is modified to prevent people from
Junio C Hamanoac12f0e2014-09-19 22:32:513912 accidentally feeding it to <code>patch -p1</code>. Combined diff format
Junio C Hamano00b8b632007-12-07 09:50:493913 was created for review of merge commit changes, and was not
3914 meant for apply. The change is similar to the change in the
3915 extended <em>index</em> header:
3916</p>
3917<div class="literalblock">
3918<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513919<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:493920</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513921<div class="paragraph"><p>There are (number of parents + 1) <code>@</code> characters in the chunk
Junio C Hamanoba4b9282008-07-06 05:20:313922header for combined diff format.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493923</li>
Junio C Hamanoba4b9282008-07-06 05:20:313924</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:593925<div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two
Junio C Hamanoac12f0e2014-09-19 22:32:513926files 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
3927added to B), or <code>" "</code> (space&#8201;&#8212;&#8201;unchanged) prefix, this format
Junio C Hamano00b8b632007-12-07 09:50:493928compares two or more files file1, file2,&#8230; with one file X, and
3929shows how X differs from each of fileN. One column for each of
Junio C Hamano68cf15a2010-11-06 01:01:593930fileN is prepended to the output line to note how X&#8217;s line is
Junio C Hamanoba4b9282008-07-06 05:20:313931different from it.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513932<div class="paragraph"><p>A <code>-</code> character in the column N means that the line appears in
3933fileN but it does not appear in the result. A <code>+</code> character
Junio C Hamano54bf1e22008-12-20 06:30:113934in the column N means that the line appears in the result,
Junio C Hamano00b8b632007-12-07 09:50:493935and fileN does not have that line (in other words, the line was
Junio C Hamanoba4b9282008-07-06 05:20:313936added, from the point of view of that parent).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593937<div class="paragraph"><p>In the above example output, the function signature was changed
Junio C Hamanoac12f0e2014-09-19 22:32:513938from both files (hence two <code>-</code> removals from both file1 and
3939file2, plus <code>++</code> to mean one line that was added does not appear
Junio C Hamanod75148a2014-04-08 19:48:383940in either file1 or file2). Also eight other lines are the same
Junio C Hamanoac12f0e2014-09-19 22:32:513941from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p></div>
3942<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:493943merge commit with the merge result (i.e. file1..fileN are the
Junio C Hamanoac12f0e2014-09-19 22:32:513944parents). When shown by <code>git diff-files -c</code>, it compares the
Junio C Hamano00b8b632007-12-07 09:50:493945two unresolved merge parents with the working tree file
3946(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
Junio C Hamanoba4b9282008-07-06 05:20:313947"their version").</p></div>
Junio C Hamano00b8b632007-12-07 09:50:493948</div>
Junio C Hamano9629d4f2012-12-19 00:28:273949</div>
3950<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:593951<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:233952<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:593953<div class="dlist"><dl>
3954<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513955<code>git log --no-merges</code>
Junio C Hamano1a4e8412005-12-27 08:17:233956</dt>
3957<dd>
3958<p>
3959 Show the whole commit history, but skip any merges
3960</p>
3961</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593962<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513963<code>git log v2.6.12.. include/scsi drivers/scsi</code>
Junio C Hamano1a4e8412005-12-27 08:17:233964</dt>
3965<dd>
3966<p>
3967 Show all commits since version <em>v2.6.12</em> that changed any file
Junio C Hamanoac12f0e2014-09-19 22:32:513968 in the <code>include/scsi</code> or <code>drivers/scsi</code> subdirectories
Junio C Hamano1a4e8412005-12-27 08:17:233969</p>
3970</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593971<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513972<code>git log --since="2 weeks ago" -- gitk</code>
Junio C Hamano1a4e8412005-12-27 08:17:233973</dt>
3974<dd>
3975<p>
3976 Show the changes during the last two weeks to the file <em>gitk</em>.
Junio C Hamanob73af6c2013-12-03 22:07:113977 The &#8220;--&#8221; is necessary to avoid confusion with the <strong>branch</strong> named
Junio C Hamano1a4e8412005-12-27 08:17:233978 <em>gitk</em>
3979</p>
3980</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593981<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513982<code>git log --name-status release..test</code>
Junio C Hamanoba7c8d82006-04-15 06:17:423983</dt>
3984<dd>
3985<p>
3986 Show the commits that are in the "test" branch but not yet
3987 in the "release" branch, along with the list of paths
3988 each commit modifies.
3989</p>
3990</dd>
Junio C Hamano68cf15a2010-11-06 01:01:593991<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513992<code>git log --follow builtin/rev-list.c</code>
Junio C Hamano235d53f2007-07-13 00:25:153993</dt>
3994<dd>
3995<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513996 Shows the commits that changed <code>builtin/rev-list.c</code>, including
Junio C Hamano235d53f2007-07-13 00:25:153997 those commits that occurred before the file was given its
3998 present name.
3999</p>
4000</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594001<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514002<code>git log --branches --not --remotes=origin</code>
Junio C Hamano57827fb2010-01-23 03:02:504003</dt>
4004<dd>
4005<p>
4006 Shows all commits that are in any of local branches but not in
Junio C Hamano97bcb482010-11-25 03:16:074007 any of remote-tracking branches for <em>origin</em> (what you have that
Junio C Hamano68cf15a2010-11-06 01:01:594008 origin doesn&#8217;t).
Junio C Hamano57827fb2010-01-23 03:02:504009</p>
4010</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594011<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514012<code>git log master --not --remotes=*/master</code>
Junio C Hamano57827fb2010-01-23 03:02:504013</dt>
4014<dd>
4015<p>
4016 Shows all commits that are in local master but not in any remote
4017 repository master branches.
4018</p>
4019</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594020<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514021<code>git log -p -m --first-parent</code>
Junio C Hamano31667362010-03-25 00:38:534022</dt>
4023<dd>
4024<p>
4025 Shows the history including change diffs, but only from the
Junio C Hamanob73af6c2013-12-03 22:07:114026 &#8220;main branch&#8221; perspective, skipping commits that come from merged
Junio C Hamano31667362010-03-25 00:38:534027 branches, and showing full diffs of changes introduced by the merges.
4028 This makes sense only when following a strict policy of merging all
4029 topic branches when staying on a single integration branch.
4030</p>
4031</dd>
Junio C Hamano693e7092012-09-12 22:56:534032<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514033<code>git log -L '/int main/',/^}/:main.c</code>
Junio C Hamano7e590a12013-06-02 23:46:524034</dt>
4035<dd>
4036<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514037 Shows how the function <code>main()</code> in the file <code>main.c</code> evolved
Junio C Hamano7e590a12013-06-02 23:46:524038 over time.
4039</p>
4040</dd>
4041<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514042<code>git log -3</code>
Junio C Hamano693e7092012-09-12 22:56:534043</dt>
4044<dd>
4045<p>
4046 Limits the number of commits to show to 3.
4047</p>
4048</dd>
Junio C Hamanoba4b9282008-07-06 05:20:314049</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:234050</div>
Junio C Hamano9629d4f2012-12-19 00:28:274051</div>
4052<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594053<h2 id="_discussion">DISCUSSION</h2>
Junio C Hamano775a0f42006-12-31 01:19:144054<div class="sectionbody">
Junio C Hamanod7ed4042015-08-03 19:43:004055<div class="paragraph"><p>Git is to some extent character encoding agnostic.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594056<div class="ulist"><ul>
Junio C Hamano775a0f42006-12-31 01:19:144057<li>
4058<p>
Junio C Hamano54bf1e22008-12-20 06:30:114059The contents of the blob objects are uninterpreted sequences
Junio C Hamano775a0f42006-12-31 01:19:144060 of bytes. There is no encoding translation at the core
4061 level.
4062</p>
4063</li>
4064<li>
4065<p>
Junio C Hamanod7ed4042015-08-03 19:43:004066Path names are encoded in UTF-8 normalization form C. This
4067 applies to tree objects, the index file, ref names, as well as
4068 path names in command line arguments, environment variables
4069 and config files (<code>.git/config</code> (see <a href="git-config.html">git-config(1)</a>),
4070 <a href="gitignore.html">gitignore(5)</a>, <a href="gitattributes.html">gitattributes(5)</a> and
4071 <a href="gitmodules.html">gitmodules(5)</a>).
4072</p>
4073<div class="paragraph"><p>Note that Git at the core level treats path names simply as
4074sequences of non-NUL bytes, there are no path name encoding
4075conversions (except on Mac and Windows). Therefore, using
4076non-ASCII path names will mostly work even on platforms and file
4077systems that use legacy extended ASCII encodings. However,
4078repositories created on such systems will not work properly on
4079UTF-8-based systems (e.g. Linux, Mac, Windows) and vice versa.
4080Additionally, many Git-based tools simply assume path names to
4081be UTF-8 and will fail to display other encodings correctly.</p></div>
4082</li>
4083<li>
4084<p>
4085Commit log messages are typically encoded in UTF-8, but other
4086 extended ASCII encodings are also supported. This includes
4087 ISO-8859-x, CP125x and many others, but <em>not</em> UTF-16/32,
4088 EBCDIC and CJK multi-byte encodings (GBK, Shift-JIS, Big5,
4089 EUC-x, CP9xx etc.).
Junio C Hamano775a0f42006-12-31 01:19:144090</p>
4091</li>
Junio C Hamanoba4b9282008-07-06 05:20:314092</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:594093<div class="paragraph"><p>Although we encourage that the commit log messages are encoded
Junio C Hamano076ffcc2013-02-06 05:13:214094in UTF-8, both the core and Git Porcelain are designed not to
Junio C Hamano775a0f42006-12-31 01:19:144095force UTF-8 on projects. If all participants of a particular
Junio C Hamano076ffcc2013-02-06 05:13:214096project find it more convenient to use legacy encodings, Git
Junio C Hamano775a0f42006-12-31 01:19:144097does not forbid it. However, there are a few things to keep in
Junio C Hamanoba4b9282008-07-06 05:20:314098mind.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594099<div class="olist arabic"><ol class="arabic">
Junio C Hamano775a0f42006-12-31 01:19:144100<li>
4101<p>
Junio C Hamano1aa40d22010-01-21 17:46:434102<em>git commit</em> and <em>git commit-tree</em> issues
Junio C Hamano14b76482008-01-05 10:32:264103 a warning if the commit log message given to it does not look
Junio C Hamano775a0f42006-12-31 01:19:144104 like a valid UTF-8 string, unless you explicitly say your
4105 project uses a legacy encoding. The way to say this is to
Junio C Hamanoac12f0e2014-09-19 22:32:514106 have i18n.commitencoding in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:144107</p>
4108<div class="listingblock">
4109<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514110<pre><code>[i18n]
4111 commitencoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:144112</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594113<div class="paragraph"><p>Commit objects created with the above setting record the value
Junio C Hamanoac12f0e2014-09-19 22:32:514114of <code>i18n.commitencoding</code> in its <code>encoding</code> header. This is to
Junio C Hamano775a0f42006-12-31 01:19:144115help other people who look at them later. Lack of this header
Junio C Hamanoba4b9282008-07-06 05:20:314116implies that the commit log message is encoded in UTF-8.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144117</li>
4118<li>
4119<p>
Junio C Hamano1aa40d22010-01-21 17:46:434120<em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
Junio C Hamanoac12f0e2014-09-19 22:32:514121 <code>encoding</code> header of a commit object, and try to re-code the
Junio C Hamanoaa17c7c2008-11-03 04:36:584122 log message into UTF-8 unless otherwise specified. You can
Junio C Hamano775a0f42006-12-31 01:19:144123 specify the desired output encoding with
Junio C Hamanoac12f0e2014-09-19 22:32:514124 <code>i18n.logoutputencoding</code> in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:144125</p>
4126<div class="listingblock">
4127<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514128<pre><code>[i18n]
4129 logoutputencoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:144130</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594131<div class="paragraph"><p>If you do not have this configuration variable, the value of
Junio C Hamanoac12f0e2014-09-19 22:32:514132<code>i18n.commitencoding</code> is used instead.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144133</li>
Junio C Hamanoba4b9282008-07-06 05:20:314134</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:594135<div class="paragraph"><p>Note that we deliberately chose not to re-code the commit log
Junio C Hamano775a0f42006-12-31 01:19:144136message when a commit is made to force UTF-8 at the commit
4137object level, because re-coding to UTF-8 is not necessarily a
Junio C Hamanoba4b9282008-07-06 05:20:314138reversible operation.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144139</div>
Junio C Hamano9629d4f2012-12-19 00:28:274140</div>
4141<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594142<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamanoa574a092010-06-13 19:57:104143<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:234144<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:104145for settings related to diff generation.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594146<div class="dlist"><dl>
4147<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104148format.pretty
4149</dt>
4150<dd>
4151<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514152 Default for the <code>--format</code> option. (See <em>Pretty Formats</em> above.)
4153 Defaults to <code>medium</code>.
Junio C Hamanoa574a092010-06-13 19:57:104154</p>
4155</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594156<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104157i18n.logOutputEncoding
4158</dt>
4159<dd>
4160<p>
Junio C Hamanob73af6c2013-12-03 22:07:114161 Encoding to use when displaying logs. (See <em>Discussion</em> above.)
Junio C Hamanoac12f0e2014-09-19 22:32:514162 Defaults to the value of <code>i18n.commitEncoding</code> if set, and UTF-8
Junio C Hamanoa574a092010-06-13 19:57:104163 otherwise.
4164</p>
4165</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594166<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104167log.date
4168</dt>
4169<dd>
4170<p>
4171 Default format for human-readable dates. (Compare the
Junio C Hamanoac12f0e2014-09-19 22:32:514172 <code>--date</code> option.) Defaults to "default", which means to write
4173 dates like <code>Sat May 8 19:35:34 2010 -0500</code>.
Junio C Hamanoa574a092010-06-13 19:57:104174</p>
4175</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594176<dt class="hdlist1">
Junio C Hamanod7ed4042015-08-03 19:43:004177log.follow
4178</dt>
4179<dd>
4180<p>
Junio C Hamanob0a1e832015-10-15 23:08:314181 If <code>true</code>, <code>git log</code> will act as if the <code>--follow</code> option was used when
4182 a single &lt;path&gt; is given. This has the same limitations as <code>--follow</code>,
4183 i.e. it cannot be used to follow multiple files and does not work well
4184 on non-linear history.
Junio C Hamanod7ed4042015-08-03 19:43:004185</p>
4186</dd>
4187<dt class="hdlist1">
Junio C Hamano322c6242015-03-23 21:32:464188log.showRoot
Junio C Hamanoa574a092010-06-13 19:57:104189</dt>
4190<dd>
4191<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514192 If <code>false</code>, <code>git log</code> and related commands will not treat the
Junio C Hamanoa574a092010-06-13 19:57:104193 initial commit as a big creation event. Any root commits in
Junio C Hamanoac12f0e2014-09-19 22:32:514194 <code>git log -p</code> output would be shown without a diff attached.
4195 The default is <code>true</code>.
Junio C Hamanoa574a092010-06-13 19:57:104196</p>
4197</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594198<dt class="hdlist1">
Junio C Hamano48931e22016-07-11 20:08:474199log.showSignature
4200</dt>
4201<dd>
4202<p>
4203 If <code>true</code>, <code>git log</code> and related commands will act as if the
4204 <code>--show-signature</code> option was passed to them.
4205</p>
4206</dd>
4207<dt class="hdlist1">
Junio C Hamanoabad6da2013-01-06 09:06:324208mailmap.*
Junio C Hamanoa574a092010-06-13 19:57:104209</dt>
4210<dd>
4211<p>
Junio C Hamanoa28a9202012-06-21 07:08:234212 See <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanoa574a092010-06-13 19:57:104213</p>
4214</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594215<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104216notes.displayRef
4217</dt>
4218<dd>
4219<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514220 Which refs, in addition to the default set by <code>core.notesRef</code>
Junio C Hamano042f2142016-06-27 18:05:054221 or <code>GIT_NOTES_REF</code>, to read notes from when showing commit
Junio C Hamanoac12f0e2014-09-19 22:32:514222 messages with the <code>log</code> family of commands. See
Junio C Hamanoa28a9202012-06-21 07:08:234223 <a href="git-notes.html">git-notes(1)</a>.
Junio C Hamanoa574a092010-06-13 19:57:104224</p>
Junio C Hamano68cf15a2010-11-06 01:01:594225<div class="paragraph"><p>May be an unabbreviated ref name or a glob and may be specified
Junio C Hamanoa574a092010-06-13 19:57:104226multiple times. A warning will be issued for refs that do not exist,
4227but a glob that does not match any refs is silently ignored.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514228<div class="paragraph"><p>This setting can be disabled by the <code>--no-notes</code> option,
Junio C Hamano042f2142016-06-27 18:05:054229overridden by the <code>GIT_NOTES_DISPLAY_REF</code> environment variable,
Junio C Hamanoac12f0e2014-09-19 22:32:514230and overridden by the <code>--notes=&lt;ref&gt;</code> option.</p></div>
Junio C Hamanoa574a092010-06-13 19:57:104231</dd>
4232</dl></div>
4233</div>
Junio C Hamano9629d4f2012-12-19 00:28:274234</div>
4235<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:314236<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:234237<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:234238<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:234239</div>
Junio C Hamano7bd050f2011-09-22 06:32:224240</div>
Junio C Hamano9629d4f2012-12-19 00:28:274241</div>
Junio C Hamano7bd050f2011-09-22 06:32:224242<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:234243<div id="footer">
4244<div id="footer-text">
Junio C Hamano919d24f2017-05-09 14:51:224245Last updated 2016-07-12 05:08:30 JST
Junio C Hamano1a4e8412005-12-27 08:17:234246</div>
4247</div>
4248</body>
4249</html>