blob: 91eaf58e27690b0ff34273cb95778188f0276da7 [file] [log] [blame]
Junio C Hamano96153bf2018-04-25 08:25:341<?xml version="1.0" encoding="UTF-8"?>
Junio C Hamano1a4e8412005-12-27 08:17:232<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5<head>
Junio C Hamano9629d4f2012-12-19 00:28:276<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
Junio C Hamano96153bf2018-04-25 08:25:347<meta name="generator" content="AsciiDoc 8.6.10" />
Junio C Hamano68cf15a2010-11-06 01:01:598<title>git-log(1)</title>
Junio C Hamano1a4e8412005-12-27 08:17:239<style type="text/css">
Junio C Hamano9629d4f2012-12-19 00:28:2710/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
11
12/* Default font. */
13body {
14 font-family: Georgia,serif;
15}
16
17/* Title font. */
18h1, h2, h3, h4, h5, h6,
19div.title, caption.title,
20thead, p.table.header,
21#toctitle,
22#author, #revnumber, #revdate, #revremark,
23#footer {
24 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano1a4e8412005-12-27 08:17:2325}
26
27body {
28 margin: 1em 5% 1em 5%;
29}
30
Junio C Hamanoba4b9282008-07-06 05:20:3131a {
32 color: blue;
33 text-decoration: underline;
34}
35a:visited {
36 color: fuchsia;
37}
Junio C Hamano1a4e8412005-12-27 08:17:2338
39em {
40 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5941 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2342}
43
44strong {
45 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5946 color: #083194;
Junio C Hamano1a4e8412005-12-27 08:17:2347}
48
Junio C Hamano1a4e8412005-12-27 08:17:2349h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:2351 margin-top: 1.2em;
52 margin-bottom: 0.5em;
53 line-height: 1.3;
54}
55
Junio C Hamanoba4b9282008-07-06 05:20:3156h1, h2, h3 {
Junio C Hamano1a4e8412005-12-27 08:17:2357 border-bottom: 2px solid silver;
58}
59h2 {
Junio C Hamano1a4e8412005-12-27 08:17:2360 padding-top: 0.5em;
61}
Junio C Hamanoba4b9282008-07-06 05:20:3162h3 {
63 float: left;
64}
65h3 + * {
66 clear: left;
67}
Junio C Hamano9629d4f2012-12-19 00:28:2768h5 {
69 font-size: 1.0em;
70}
Junio C Hamano1a4e8412005-12-27 08:17:2371
72div.sectionbody {
Junio C Hamano1a4e8412005-12-27 08:17:2373 margin-left: 0;
74}
75
76hr {
77 border: 1px solid silver;
78}
79
80p {
81 margin-top: 0.5em;
82 margin-bottom: 0.5em;
83}
84
Junio C Hamano68cf15a2010-11-06 01:01:5985ul, ol, li > p {
86 margin-top: 0;
87}
Junio C Hamano9629d4f2012-12-19 00:28:2788ul > li { color: #aaa; }
89ul > li > * { color: black; }
Junio C Hamano68cf15a2010-11-06 01:01:5990
Junio C Hamanoac12f0e2014-09-19 22:32:5191.monospaced, code, pre {
92 font-family: "Courier New", Courier, monospace;
93 font-size: inherit;
94 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2395 padding: 0;
96 margin: 0;
97}
Junio C Hamanoac12f0e2014-09-19 22:32:5198pre {
99 white-space: pre-wrap;
100}
Junio C Hamano1a4e8412005-12-27 08:17:23101
Junio C Hamano9629d4f2012-12-19 00:28:27102#author {
Junio C Hamano1a4e8412005-12-27 08:17:23103 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23104 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31105 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23106}
Junio C Hamano9629d4f2012-12-19 00:28:27107#email {
Junio C Hamano1a4e8412005-12-27 08:17:23108}
Junio C Hamano9629d4f2012-12-19 00:28:27109#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23110}
111
Junio C Hamano9629d4f2012-12-19 00:28:27112#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23113 font-size: small;
114 border-top: 2px solid silver;
115 padding-top: 0.5em;
116 margin-top: 4.0em;
117}
Junio C Hamano9629d4f2012-12-19 00:28:27118#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23119 float: left;
120 padding-bottom: 0.5em;
121}
Junio C Hamano9629d4f2012-12-19 00:28:27122#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23123 float: right;
124 padding-bottom: 0.5em;
125}
126
Junio C Hamano9629d4f2012-12-19 00:28:27127#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59128 margin-top: 1.5em;
129 margin-bottom: 1.5em;
130}
Junio C Hamano9629d4f2012-12-19 00:28:27131div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23132div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22134 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23135 margin-bottom: 1.5em;
136}
137div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22138 margin-top: 2.0em;
139 margin-bottom: 2.0em;
140 margin-right: 10%;
141 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23142}
143
144div.content { /* Block element content. */
145 padding: 0;
146}
147
148/* Block element titles. */
149div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59150 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23151 font-weight: bold;
152 text-align: left;
153 margin-top: 1.0em;
154 margin-bottom: 0.5em;
155}
156div.title + * {
157 margin-top: 0;
158}
159
160td div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content div.title:first-child {
164 margin-top: 0.0em;
165}
166div.content + div.title {
167 margin-top: 0.0em;
168}
169
170div.sidebarblock > div.content {
171 background: #ffffee;
Junio C Hamano9629d4f2012-12-19 00:28:27172 border: 1px solid #dddddd;
173 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23174 padding: 0.5em;
175}
176
177div.listingblock > div.content {
Junio C Hamano9629d4f2012-12-19 00:28:27178 border: 1px solid #dddddd;
179 border-left: 5px solid #f0f0f0;
180 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23181 padding: 0.5em;
182}
183
Junio C Hamano7bd050f2011-09-22 06:32:22184div.quoteblock, div.verseblock {
185 padding-left: 1.0em;
186 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59187 margin-right: 10%;
Junio C Hamano9629d4f2012-12-19 00:28:27188 border-left: 5px solid #f0f0f0;
189 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23190}
Junio C Hamano7bd050f2011-09-22 06:32:22191
Junio C Hamano68cf15a2010-11-06 01:01:59192div.quoteblock > div.attribution {
193 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23194 text-align: right;
195}
Junio C Hamano68cf15a2010-11-06 01:01:59196
Junio C Hamano9629d4f2012-12-19 00:28:27197div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59200}
201div.verseblock > div.attribution {
202 padding-top: 0.75em;
203 text-align: left;
204}
205/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31206div.verseblock + div.attribution {
207 text-align: left;
208}
Junio C Hamano1a4e8412005-12-27 08:17:23209
210div.admonitionblock .icon {
211 vertical-align: top;
212 font-size: 1.1em;
213 font-weight: bold;
214 text-decoration: underline;
215 color: #527bbd;
216 padding-right: 0.5em;
217}
218div.admonitionblock td.content {
219 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22220 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23221}
222
223div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22224 border-left: 3px solid #dddddd;
225 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23226}
227
Junio C Hamano1a4e8412005-12-27 08:17:23228div.imageblock div.content { padding-left: 0; }
Junio C Hamanoac12f0e2014-09-19 22:32:51229span.image img { border-style: none; vertical-align: text-bottom; }
Junio C Hamano68cf15a2010-11-06 01:01:59230a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23231
232dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
235}
236dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59239 font-style: normal;
240 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23241}
242dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59243 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23244}
245
246ul, ol {
247 list-style-position: outside;
248}
Junio C Hamano68cf15a2010-11-06 01:01:59249ol.arabic {
250 list-style-type: decimal;
251}
252ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23253 list-style-type: lower-alpha;
254}
Junio C Hamano68cf15a2010-11-06 01:01:59255ol.upperalpha {
256 list-style-type: upper-alpha;
257}
258ol.lowerroman {
259 list-style-type: lower-roman;
260}
261ol.upperroman {
262 list-style-type: upper-roman;
263}
264
265div.compact ul, div.compact ol,
266div.compact p, div.compact p,
267div.compact div, div.compact div {
268 margin-top: 0.1em;
269 margin-bottom: 0.1em;
270}
Junio C Hamano1a4e8412005-12-27 08:17:23271
Junio C Hamano1a4e8412005-12-27 08:17:23272tfoot {
273 font-weight: bold;
274}
Junio C Hamano68cf15a2010-11-06 01:01:59275td > div.verse {
276 white-space: pre;
277}
Junio C Hamano68cf15a2010-11-06 01:01:59278
279div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
282}
Junio C Hamano68cf15a2010-11-06 01:01:59283div.hdlist tr {
284 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31285}
Junio C Hamano68cf15a2010-11-06 01:01:59286dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
288}
289td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23290 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59291 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23292 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59293 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23294}
Junio C Hamano68cf15a2010-11-06 01:01:59295td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23296 vertical-align: top;
297}
Junio C Hamano68cf15a2010-11-06 01:01:59298div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
301}
302
303.comment {
304 background: yellow;
305}
Junio C Hamano1a4e8412005-12-27 08:17:23306
Junio C Hamano7bd050f2011-09-22 06:32:22307.footnote, .footnoteref {
308 font-size: 0.8em;
309}
310
311span.footnote, span.footnoteref {
312 vertical-align: super;
313}
314
315#footnotes {
316 margin: 20px 0 20px 0;
317 padding: 7px 0 0 0;
318}
319
320#footnotes div.footnote {
321 margin: 0 0 5px 0;
322}
323
324#footnotes hr {
325 border: none;
326 border-top: 1px solid silver;
327 height: 1px;
328 text-align: left;
329 margin-left: 0;
330 width: 20%;
331 min-width: 100px;
332}
333
Junio C Hamano9629d4f2012-12-19 00:28:27334div.colist td {
335 padding-right: 0.5em;
336 padding-bottom: 0.3em;
337 vertical-align: top;
338}
339div.colist td img {
340 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23341}
Junio C Hamanoba4b9282008-07-06 05:20:31342
Junio C Hamano9629d4f2012-12-19 00:28:27343@media print {
344 #footer-badges { display: none; }
345}
346
347#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22348 margin-bottom: 2.5em;
349}
350
Junio C Hamano9629d4f2012-12-19 00:28:27351#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31352 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31353 font-size: 1.1em;
354 font-weight: bold;
355 margin-top: 1.0em;
356 margin-bottom: 0.1em;
357}
358
Junio C Hamanoac12f0e2014-09-19 22:32:51359div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31360 margin-top: 0;
361 margin-bottom: 0;
362}
363div.toclevel2 {
364 margin-left: 2em;
365 font-size: 0.9em;
366}
367div.toclevel3 {
368 margin-left: 4em;
369 font-size: 0.9em;
370}
371div.toclevel4 {
372 margin-left: 6em;
373 font-size: 0.9em;
374}
Junio C Hamano9629d4f2012-12-19 00:28:27375
376span.aqua { color: aqua; }
377span.black { color: black; }
378span.blue { color: blue; }
379span.fuchsia { color: fuchsia; }
380span.gray { color: gray; }
381span.green { color: green; }
382span.lime { color: lime; }
383span.maroon { color: maroon; }
384span.navy { color: navy; }
385span.olive { color: olive; }
386span.purple { color: purple; }
387span.red { color: red; }
388span.silver { color: silver; }
389span.teal { color: teal; }
390span.white { color: white; }
391span.yellow { color: yellow; }
392
393span.aqua-background { background: aqua; }
394span.black-background { background: black; }
395span.blue-background { background: blue; }
396span.fuchsia-background { background: fuchsia; }
397span.gray-background { background: gray; }
398span.green-background { background: green; }
399span.lime-background { background: lime; }
400span.maroon-background { background: maroon; }
401span.navy-background { background: navy; }
402span.olive-background { background: olive; }
403span.purple-background { background: purple; }
404span.red-background { background: red; }
405span.silver-background { background: silver; }
406span.teal-background { background: teal; }
407span.white-background { background: white; }
408span.yellow-background { background: yellow; }
409
410span.big { font-size: 2em; }
411span.small { font-size: 0.6em; }
412
413span.underline { text-decoration: underline; }
414span.overline { text-decoration: overline; }
415span.line-through { text-decoration: line-through; }
416
Junio C Hamanoac12f0e2014-09-19 22:32:51417div.unbreakable { page-break-inside: avoid; }
418
Junio C Hamano9629d4f2012-12-19 00:28:27419
420/*
421 * xhtml11 specific
422 *
423 * */
424
425div.tableblock {
426 margin-top: 1.0em;
427 margin-bottom: 1.5em;
428}
429div.tableblock > table {
430 border: 3px solid #527bbd;
431}
432thead, p.table.header {
433 font-weight: bold;
434 color: #527bbd;
435}
436p.table {
437 margin-top: 0;
438}
439/* Because the table frame attribute is overriden by CSS in most browsers. */
440div.tableblock > table[frame="void"] {
441 border-style: none;
442}
443div.tableblock > table[frame="hsides"] {
444 border-left-style: none;
445 border-right-style: none;
446}
447div.tableblock > table[frame="vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
450}
451
452
453/*
454 * html5 specific
455 *
456 * */
457
458table.tableblock {
459 margin-top: 1.0em;
460 margin-bottom: 1.5em;
461}
462thead, p.tableblock.header {
463 font-weight: bold;
464 color: #527bbd;
465}
466p.tableblock {
467 margin-top: 0;
468}
469table.tableblock {
470 border-width: 3px;
471 border-spacing: 0px;
472 border-style: solid;
473 border-color: #527bbd;
474 border-collapse: collapse;
475}
476th.tableblock, td.tableblock {
477 border-width: 1px;
478 padding: 4px;
479 border-style: solid;
480 border-color: #527bbd;
481}
482
483table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
486}
487table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
490}
491table.tableblock.frame-none {
492 border-style: hidden;
493}
494
495th.tableblock.halign-left, td.tableblock.halign-left {
496 text-align: left;
497}
498th.tableblock.halign-center, td.tableblock.halign-center {
499 text-align: center;
500}
501th.tableblock.halign-right, td.tableblock.halign-right {
502 text-align: right;
503}
504
505th.tableblock.valign-top, td.tableblock.valign-top {
506 vertical-align: top;
507}
508th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
510}
511th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
513}
514
515
516/*
517 * manpage specific
518 *
519 * */
520
521body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59522 padding-top: 0.5em;
523 padding-bottom: 0.5em;
524 border-top: 2px solid silver;
525 border-bottom: 2px solid silver;
526}
Junio C Hamano9629d4f2012-12-19 00:28:27527body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59528 border-style: none;
529}
Junio C Hamano9629d4f2012-12-19 00:28:27530body.manpage div.sectionbody {
531 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59532}
533
534@media print {
Junio C Hamano9629d4f2012-12-19 00:28:27535 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59536}
Junio C Hamanoac12f0e2014-09-19 22:32:51537
538
Junio C Hamano1a4e8412005-12-27 08:17:23539</style>
Junio C Hamano7bd050f2011-09-22 06:32:22540<script type="text/javascript">
541/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22542var asciidoc = { // Namespace.
543
544/////////////////////////////////////////////////////////////////////
545// Table Of Contents generator
546/////////////////////////////////////////////////////////////////////
547
548/* Author: Mihai Bazon, September 2002
549 * http://students.infoiasi.ro/~mishoo
550 *
551 * Table Of Content generator
552 * Version: 0.4
553 *
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
556 */
557
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
560
561// toclevels = 1..4.
562toc: function (toclevels) {
563
564 function getText(el) {
565 var text = "";
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
568 text += i.data;
569 else if (i.firstChild != null)
570 text += getText(i);
571 }
572 return text;
573 }
574
575 function TocEntry(el, text, toclevel) {
576 this.element = el;
577 this.text = text;
578 this.toclevel = toclevel;
579 }
580
581 function tocEntries(el, toclevels) {
582 var result = new Array;
Junio C Hamanoac12f0e2014-09-19 22:32:51583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
586 // browsers).
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
593 }
594 iterate(i);
595 }
596 }
597 }
598 iterate(el);
599 return result;
600 }
601
602 var toc = document.getElementById("toc");
Junio C Hamano9629d4f2012-12-19 00:28:27603 if (!toc) {
604 return;
605 }
606
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
609 var i;
610 for (i = 0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
Junio C Hamanoac12f0e2014-09-19 22:32:51612 if (entry.nodeName.toLowerCase() == 'div'
Junio C Hamano9629d4f2012-12-19 00:28:27613 && entry.getAttribute("class")
614 && entry.getAttribute("class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
616 }
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
619 }
620
621 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22622 var entries = tocEntries(document.getElementById("content"), toclevels);
623 for (var i = 0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id == "")
626 entry.element.id = "_toc_" + i;
627 var a = document.createElement("a");
628 a.href = "#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement("div");
631 div.appendChild(a);
632 div.className = "toclevel" + entry.toclevel;
633 toc.appendChild(div);
634 }
635 if (entries.length == 0)
636 toc.parentNode.removeChild(toc);
637},
638
639
640/////////////////////////////////////////////////////////////////////
641// Footnotes generator
642/////////////////////////////////////////////////////////////////////
643
644/* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
646 */
647
648footnotes: function () {
Junio C Hamano9629d4f2012-12-19 00:28:27649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22651 var noteholder = document.getElementById("footnotes");
Junio C Hamano9629d4f2012-12-19 00:28:27652 if (!noteholder) {
653 return;
654 }
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
Junio C Hamanoac12f0e2014-09-19 22:32:51658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
Junio C Hamano9629d4f2012-12-19 00:28:27659 entriesToRemove.push(entry);
660 }
661 for (i = 0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
663 }
664
665 // Rebuild footnote entries.
666 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22667 var spans = cont.getElementsByTagName("span");
668 var refs = {};
669 var n = 0;
670 for (i=0; i<spans.length; i++) {
671 if (spans[i].className == "footnote") {
672 n++;
Junio C Hamano9629d4f2012-12-19 00:28:27673 var note = spans[i].getAttribute("data-note");
674 if (!note) {
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
678 spans[i].innerHTML =
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
681 spans[i].setAttribute("data-note", note);
682 }
Junio C Hamano7bd050f2011-09-22 06:32:22683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22687 var id =spans[i].getAttribute("id");
688 if (id != null) refs["#"+id] = n;
689 }
690 }
691 if (n == 0)
692 noteholder.parentNode.removeChild(noteholder);
693 else {
694 // Process footnoterefs.
695 for (i=0; i<spans.length; i++) {
696 if (spans[i].className == "footnoteref") {
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
699 n = refs[href];
700 spans[i].innerHTML =
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
703 }
704 }
705 }
Junio C Hamano9629d4f2012-12-19 00:28:27706},
707
708install: function(toclevels) {
709 var timerId;
710
711 function reinstall() {
712 asciidoc.footnotes();
713 if (toclevels) {
714 asciidoc.toc(toclevels);
715 }
716 }
717
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
720 reinstall();
721 }
722
723 timerId = setInterval(reinstall, 500);
724 if (document.addEventListener)
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
726 else
727 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22728}
729
730}
Junio C Hamano9629d4f2012-12-19 00:28:27731asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22732/*]]>*/
733</script>
Junio C Hamano1a4e8412005-12-27 08:17:23734</head>
Junio C Hamano9629d4f2012-12-19 00:28:27735<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23736<div id="header">
737<h1>
738git-log(1) Manual Page
739</h1>
740<h2>NAME</h2>
741<div class="sectionbody">
742<p>git-log -
743 Show commit logs
744</p>
745</div>
746</div>
Junio C Hamano7bd050f2011-09-22 06:32:22747<div id="content">
Junio C Hamano9629d4f2012-12-19 00:28:27748<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59749<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23750<div class="sectionbody">
Junio C Hamano15567bc2011-07-23 00:51:59751<div class="verseblock">
Junio C Hamanof26c77e2013-04-27 00:06:04752<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:27753<div class="attribution">
Junio C Hamano15567bc2011-07-23 00:51:59754</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23755</div>
Junio C Hamano9629d4f2012-12-19 00:28:27756</div>
757<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31758<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23759<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59760<div class="paragraph"><p>Shows the commit logs.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:51761<div class="paragraph"><p>The command takes options applicable to the <code>git rev-list</code>
Junio C Hamanoba7c8d82006-04-15 06:17:42762command to control what is shown and how, and options applicable to
Junio C Hamanoac12f0e2014-09-19 22:32:51763the <code>git diff-*</code> commands to control how the changes
Junio C Hamanoba4b9282008-07-06 05:20:31764each commit introduces are shown.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23765</div>
Junio C Hamano9629d4f2012-12-19 00:28:27766</div>
767<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31768<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23769<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59770<div class="dlist"><dl>
771<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45772--follow
773</dt>
774<dd>
775<p>
776 Continue listing the history of a file beyond renames
777 (works only for a single file).
778</p>
779</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59780<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45781--no-decorate
782</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59783<dt class="hdlist1">
Junio C Hamano37cf4082016-05-30 01:22:14784--decorate[=short|full|auto|no]
Junio C Hamano78e3a782010-07-15 22:24:45785</dt>
786<dd>
787<p>
788 Print out the ref names of any commits that are shown. If <em>short</em> is
789 specified, the ref name prefixes <em>refs/heads/</em>, <em>refs/tags/</em> and
790 <em>refs/remotes/</em> will not be printed. If <em>full</em> is specified, the
Junio C Hamano37cf4082016-05-30 01:22:14791 full ref name (including prefix) will be printed. If <em>auto</em> is
792 specified, then if the output is going to a terminal, the ref names
793 are shown as if <em>short</em> were given, otherwise no ref names are
794 shown. The default option is <em>short</em>.
Junio C Hamano78e3a782010-07-15 22:24:45795</p>
796</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59797<dt class="hdlist1">
Junio C Hamano371470a2017-12-13 22:26:40798--decorate-refs=&lt;pattern&gt;
799</dt>
800<dt class="hdlist1">
801--decorate-refs-exclude=&lt;pattern&gt;
802</dt>
803<dd>
804<p>
805 If no <code>--decorate-refs</code> is given, pretend as if all refs were
806 included. For each candidate, do not use it for decoration if it
807 matches any patterns given to <code>--decorate-refs-exclude</code> or if it
808 doesn&#8217;t match any of the patterns given to <code>--decorate-refs</code>.
809</p>
810</dd>
811<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45812--source
813</dt>
814<dd>
815<p>
816 Print out the ref name given on the command line by which each
817 commit was reached.
818</p>
819</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59820<dt class="hdlist1">
Junio C Hamano36594952019-07-25 22:26:52821--[no-]use-mailmap
Junio C Hamanoce836cc2013-01-21 02:01:53822</dt>
823<dd>
824<p>
825 Use mailmap file to map author and committer names and email
Junio C Hamanob73af6c2013-12-03 22:07:11826 addresses to canonical real names and email addresses. See
Junio C Hamanoce836cc2013-01-21 02:01:53827 <a href="git-shortlog.html">git-shortlog(1)</a>.
828</p>
829</dd>
830<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45831--full-diff
832</dt>
833<dd>
834<p>
Junio C Hamanoac12f0e2014-09-19 22:32:51835 Without this flag, <code>git log -p &lt;path&gt;...</code> shows commits that
Junio C Hamano78e3a782010-07-15 22:24:45836 touch the specified paths, and diffs about the same specified
837 paths. With this, the full diff is shown for commits that touch
838 the specified paths; this means that "&lt;path&gt;&#8230;" limits only
Junio C Hamano68cf15a2010-11-06 01:01:59839 commits, and doesn&#8217;t limit diff for those commits.
Junio C Hamano78e3a782010-07-15 22:24:45840</p>
Junio C Hamano68cf15a2010-11-06 01:01:59841<div class="paragraph"><p>Note that this affects all diff-based output types, e.g. those
Junio C Hamanoac12f0e2014-09-19 22:32:51842produced by <code>--stat</code>, etc.</p></div>
Junio C Hamano78e3a782010-07-15 22:24:45843</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59844<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45845--log-size
846</dt>
847<dd>
848<p>
Junio C Hamanob73af6c2013-12-03 22:07:11849 Include a line &#8220;log size &lt;number&gt;&#8221; in the output for each commit,
850 where &lt;number&gt; is the length of that commit&#8217;s message in bytes.
Junio C Hamanoac12f0e2014-09-19 22:32:51851 Intended to speed up tools that read log messages from <code>git log</code>
Junio C Hamanob73af6c2013-12-03 22:07:11852 output by allowing them to allocate space in advance.
Junio C Hamano78e3a782010-07-15 22:24:45853</p>
854</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59855<dt class="hdlist1">
Junio C Hamano8eac2682013-09-09 22:35:20856-L &lt;start&gt;,&lt;end&gt;:&lt;file&gt;
857</dt>
858<dt class="hdlist1">
Junio C Hamanodd5004a2015-05-06 19:33:32859-L :&lt;funcname&gt;:&lt;file&gt;
Junio C Hamano7e590a12013-06-02 23:46:52860</dt>
861<dd>
862<p>
863 Trace the evolution of the line range given by "&lt;start&gt;,&lt;end&gt;"
Junio C Hamanodd5004a2015-05-06 19:33:32864 (or the function name regex &lt;funcname&gt;) within the &lt;file&gt;. You may
Junio C Hamano7e590a12013-06-02 23:46:52865 not give any pathspec limiters. This is currently limited to
866 a walk starting from a single revision, i.e., you may only
867 give zero or one positive revision arguments.
868 You can specify this option more than once.
869</p>
870<div class="paragraph"><p>&lt;start&gt; and &lt;end&gt; can take one of these forms:</p></div>
871<div class="ulist"><ul>
872<li>
873<p>
874number
875</p>
876<div class="paragraph"><p>If &lt;start&gt; or &lt;end&gt; is a number, it specifies an
877absolute line number (lines count from 1).</p></div>
878</li>
879<li>
880<p>
881/regex/
882</p>
883<div class="paragraph"><p>This form will use the first line matching the given
Junio C Hamano8eac2682013-09-09 22:35:20884POSIX regex. If &lt;start&gt; is a regex, it will search from the end of
Junio C Hamanoac12f0e2014-09-19 22:32:51885the previous <code>-L</code> range, if any, otherwise from the start of file.
Junio C Hamano8eac2682013-09-09 22:35:20886If &lt;start&gt; is &#8220;^/regex/&#8221;, it will search from the start of file.
887If &lt;end&gt; is a regex, it will search
Junio C Hamano7e590a12013-06-02 23:46:52888starting at the line given by &lt;start&gt;.</p></div>
889</li>
890<li>
891<p>
892+offset or -offset
893</p>
894<div class="paragraph"><p>This is only valid for &lt;end&gt; and will specify a number
895of lines before or after the line given by &lt;start&gt;.</p></div>
896</li>
Junio C Hamano7e590a12013-06-02 23:46:52897</ul></div>
Junio C Hamanodd5004a2015-05-06 19:33:32898<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
899regular expression that denotes the range from the first funcname line
900that matches &lt;funcname&gt;, up to the next funcname line. &#8220;:&lt;funcname&gt;&#8221;
901searches from the end of the previous <code>-L</code> range, if any, otherwise
902from the start of file. &#8220;^:&lt;funcname&gt;&#8221; searches from the start of
903file.</p></div>
Junio C Hamano7e590a12013-06-02 23:46:52904</dd>
905<dt class="hdlist1">
Junio C Hamanof26c77e2013-04-27 00:06:04906&lt;revision range&gt;
907</dt>
908<dd>
909<p>
910 Show only commits in the specified revision range. When no
Junio C Hamanoac12f0e2014-09-19 22:32:51911 &lt;revision range&gt; is specified, it defaults to <code>HEAD</code> (i.e. the
912 whole history leading to the current commit). <code>origin..HEAD</code>
Junio C Hamanof26c77e2013-04-27 00:06:04913 specifies all the commits reachable from the current commit
Junio C Hamanoac12f0e2014-09-19 22:32:51914 (i.e. <code>HEAD</code>), but not from <code>origin</code>. For a complete list of
Junio C Hamanob73af6c2013-12-03 22:07:11915 ways to spell &lt;revision range&gt;, see the <em>Specifying Ranges</em>
Junio C Hamanof26c77e2013-04-27 00:06:04916 section of <a href="gitrevisions.html">gitrevisions(7)</a>.
917</p>
918</dd>
919<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45920[--] &lt;path&gt;&#8230;
921</dt>
922<dd>
923<p>
Junio C Hamano5723afa2011-08-31 00:49:23924 Show only commits that are enough to explain how the files
Junio C Hamanob73af6c2013-12-03 22:07:11925 that match the specified paths came to be. See <em>History
926 Simplification</em> below for details and other simplification
Junio C Hamano5723afa2011-08-31 00:49:23927 modes.
Junio C Hamano78e3a782010-07-15 22:24:45928</p>
Junio C Hamanoccb82522018-05-08 07:52:09929<div class="paragraph"><p>Paths may need to be prefixed with <code>--</code> to separate them from
Junio C Hamanof26c77e2013-04-27 00:06:04930options or the revision range, when confusion arises.</p></div>
Junio C Hamano78e3a782010-07-15 22:24:45931</dd>
932</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:27933<div class="sect2">
934<h3 id="_commit_limiting">Commit Limiting</h3>
Junio C Hamano68cf15a2010-11-06 01:01:59935<div class="paragraph"><p>Besides specifying a range of commits that should be listed using the
Junio C Hamanob0e02952008-01-19 08:02:00936special notations explained in the description, additional commit
Junio C Hamano8ce35d72012-09-18 22:30:42937limiting may be applied.</p></div>
938<div class="paragraph"><p>Using more options generally further limits the output (e.g.
Junio C Hamanoac12f0e2014-09-19 22:32:51939<code>--since=&lt;date1&gt;</code> limits to commits newer than <code>&lt;date1&gt;</code>, and using it
940with <code>--grep=&lt;pattern&gt;</code> further limits to commits whose log message
941has a line that matches <code>&lt;pattern&gt;</code>), unless otherwise noted.</p></div>
Junio C Hamano8ce35d72012-09-18 22:30:42942<div class="paragraph"><p>Note that these are applied before commit
Junio C Hamanoac12f0e2014-09-19 22:32:51943ordering and formatting options, such as <code>--reverse</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59944<div class="dlist"><dl>
945<dt class="hdlist1">
Junio C Hamano693e7092012-09-12 22:56:53946-&lt;number&gt;
947</dt>
948<dt class="hdlist1">
949-n &lt;number&gt;
Junio C Hamanoeb415992008-06-08 22:49:47950</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59951<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32952--max-count=&lt;number&gt;
Junio C Hamanob0e02952008-01-19 08:02:00953</dt>
954<dd>
955<p>
Junio C Hamanoc5be4cc2011-03-09 07:20:43956 Limit the number of commits to output.
Junio C Hamanob0e02952008-01-19 08:02:00957</p>
958</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59959<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32960--skip=&lt;number&gt;
Junio C Hamanob0e02952008-01-19 08:02:00961</dt>
962<dd>
963<p>
964 Skip <em>number</em> commits before starting to show the commit output.
965</p>
966</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59967<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32968--since=&lt;date&gt;
Junio C Hamanoeb415992008-06-08 22:49:47969</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59970<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32971--after=&lt;date&gt;
Junio C Hamanob0e02952008-01-19 08:02:00972</dt>
973<dd>
974<p>
975 Show commits more recent than a specific date.
976</p>
977</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59978<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32979--until=&lt;date&gt;
Junio C Hamanoeb415992008-06-08 22:49:47980</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59981<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32982--before=&lt;date&gt;
Junio C Hamanob0e02952008-01-19 08:02:00983</dt>
984<dd>
985<p>
986 Show commits older than a specific date.
987</p>
988</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59989<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32990--author=&lt;pattern&gt;
Junio C Hamanoeb415992008-06-08 22:49:47991</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59992<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32993--committer=&lt;pattern&gt;
Junio C Hamanob0e02952008-01-19 08:02:00994</dt>
995<dd>
996<p>
997 Limit the commits output to ones with author/committer
Junio C Hamano8ce35d72012-09-18 22:30:42998 header lines that match the specified pattern (regular
Junio C Hamanoac12f0e2014-09-19 22:32:51999 expression). With more than one <code>--author=&lt;pattern&gt;</code>,
Junio C Hamano8ce35d72012-09-18 22:30:421000 commits whose author matches any of the given patterns are
Junio C Hamanoac12f0e2014-09-19 22:32:511001 chosen (similarly for multiple <code>--committer=&lt;pattern&gt;</code>).
Junio C Hamanob0e02952008-01-19 08:02:001002</p>
1003</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591004<dt class="hdlist1">
Junio C Hamano9954ed72012-10-03 04:54:001005--grep-reflog=&lt;pattern&gt;
1006</dt>
1007<dd>
1008<p>
1009 Limit the commits output to ones with reflog entries that
1010 match the specified pattern (regular expression). With
Junio C Hamanoac12f0e2014-09-19 22:32:511011 more than one <code>--grep-reflog</code>, commits whose reflog message
Junio C Hamano9954ed72012-10-03 04:54:001012 matches any of the given patterns are chosen. It is an
Junio C Hamanoac12f0e2014-09-19 22:32:511013 error to use this option unless <code>--walk-reflogs</code> is in use.
Junio C Hamano9954ed72012-10-03 04:54:001014</p>
1015</dd>
1016<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:321017--grep=&lt;pattern&gt;
Junio C Hamanob0e02952008-01-19 08:02:001018</dt>
1019<dd>
1020<p>
1021 Limit the commits output to ones with log message that
Junio C Hamano8ce35d72012-09-18 22:30:421022 matches the specified pattern (regular expression). With
Junio C Hamanoac12f0e2014-09-19 22:32:511023 more than one <code>--grep=&lt;pattern&gt;</code>, commits whose message
Junio C Hamano8ce35d72012-09-18 22:30:421024 matches any of the given patterns are chosen (but see
Junio C Hamanoac12f0e2014-09-19 22:32:511025 <code>--all-match</code>).
Junio C Hamanob0e02952008-01-19 08:02:001026</p>
Junio C Hamanob3f862c2019-12-05 22:22:001027<div class="paragraph"><p>When <code>--notes</code> is in effect, the message from the notes is
Junio C Hamano8152abf2015-04-28 22:48:021028matched as if it were part of the log message.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001029</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591030<dt class="hdlist1">
Junio C Hamanoaa17c7c2008-11-03 04:36:581031--all-match
1032</dt>
1033<dd>
1034<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511035 Limit the commits output to ones that match all given <code>--grep</code>,
Junio C Hamano8ce35d72012-09-18 22:30:421036 instead of ones that match at least one.
Junio C Hamanoaa17c7c2008-11-03 04:36:581037</p>
1038</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591039<dt class="hdlist1">
Junio C Hamano6bb32e62015-02-17 22:11:261040--invert-grep
1041</dt>
1042<dd>
1043<p>
1044 Limit the commits output to ones with log message that do not
1045 match the pattern specified with <code>--grep=&lt;pattern&gt;</code>.
1046</p>
1047</dd>
1048<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471049-i
1050</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591051<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471052--regexp-ignore-case
Junio C Hamanob0e02952008-01-19 08:02:001053</dt>
1054<dd>
1055<p>
Junio C Hamanob73af6c2013-12-03 22:07:111056 Match the regular expression limiting patterns without regard to letter
1057 case.
Junio C Hamanob0e02952008-01-19 08:02:001058</p>
1059</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591060<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:041061--basic-regexp
1062</dt>
1063<dd>
1064<p>
1065 Consider the limiting patterns to be basic regular expressions;
1066 this is the default.
1067</p>
1068</dd>
1069<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471070-E
1071</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591072<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471073--extended-regexp
Junio C Hamanob0e02952008-01-19 08:02:001074</dt>
1075<dd>
1076<p>
1077 Consider the limiting patterns to be extended regular expressions
1078 instead of the default basic regular expressions.
1079</p>
1080</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591081<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471082-F
1083</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591084<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471085--fixed-strings
Junio C Hamano24bc09a2008-02-28 00:27:441086</dt>
1087<dd>
1088<p>
Junio C Hamano68cf15a2010-11-06 01:01:591089 Consider the limiting patterns to be fixed strings (don&#8217;t interpret
Junio C Hamano24bc09a2008-02-28 00:27:441090 pattern as a regular expression).
1091</p>
1092</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591093<dt class="hdlist1">
Junio C Hamanoa275c1f2017-06-19 20:10:121094-P
1095</dt>
1096<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:041097--perl-regexp
1098</dt>
1099<dd>
1100<p>
Junio C Hamano222ed822017-06-02 06:24:061101 Consider the limiting patterns to be Perl-compatible regular
1102 expressions.
Junio C Hamanoa1295452012-11-13 22:32:041103</p>
Junio C Hamano222ed822017-06-02 06:24:061104<div class="paragraph"><p>Support for these types of regular expressions is an optional
1105compile-time dependency. If Git wasn&#8217;t compiled with support for them
1106providing this option will cause it to die.</p></div>
Junio C Hamanoa1295452012-11-13 22:32:041107</dd>
1108<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001109--remove-empty
1110</dt>
1111<dd>
1112<p>
1113 Stop when a given path disappears from the tree.
1114</p>
1115</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591116<dt class="hdlist1">
Junio C Hamano934e1782009-07-16 06:59:151117--merges
1118</dt>
1119<dd>
1120<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511121 Print only merge commits. This is exactly the same as <code>--min-parents=2</code>.
Junio C Hamano934e1782009-07-16 06:59:151122</p>
1123</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591124<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001125--no-merges
1126</dt>
1127<dd>
1128<p>
Junio C Hamanof32ce262011-03-27 07:35:111129 Do not print commits with more than one parent. This is
Junio C Hamanoac12f0e2014-09-19 22:32:511130 exactly the same as <code>--max-parents=1</code>.
Junio C Hamanob0e02952008-01-19 08:02:001131</p>
1132</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591133<dt class="hdlist1">
Junio C Hamanof32ce262011-03-27 07:35:111134--min-parents=&lt;number&gt;
1135</dt>
1136<dt class="hdlist1">
1137--max-parents=&lt;number&gt;
1138</dt>
1139<dt class="hdlist1">
1140--no-min-parents
1141</dt>
1142<dt class="hdlist1">
1143--no-max-parents
1144</dt>
1145<dd>
1146<p>
Junio C Hamanoc5bb3b32013-08-05 22:43:361147 Show only commits which have at least (or at most) that many parent
Junio C Hamanoac12f0e2014-09-19 22:32:511148 commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>,
1149 <code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code>
1150 gives all root commits and <code>--min-parents=3</code> all octopus merges.
Junio C Hamanof32ce262011-03-27 07:35:111151</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511152<div class="paragraph"><p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit)
1153again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more
1154parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p></div>
Junio C Hamanof32ce262011-03-27 07:35:111155</dd>
1156<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001157--first-parent
1158</dt>
1159<dd>
1160<p>
1161 Follow only the first parent commit upon seeing a merge
1162 commit. This option can give a better overview when
1163 viewing the evolution of a particular topic branch,
1164 because merges into a topic branch tend to be only about
1165 adjusting to updated upstream from time to time, and
1166 this option allows you to ignore the individual commits
Junio C Hamanoef57d1e2015-03-25 21:23:001167 brought in to your history by such a merge. Cannot be
1168 combined with --bisect.
Junio C Hamanob0e02952008-01-19 08:02:001169</p>
1170</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591171<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001172--not
1173</dt>
1174<dd>
1175<p>
1176 Reverses the meaning of the <em>&#94;</em> prefix (or lack thereof)
Junio C Hamanoac12f0e2014-09-19 22:32:511177 for all following revision specifiers, up to the next <code>--not</code>.
Junio C Hamanob0e02952008-01-19 08:02:001178</p>
1179</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591180<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001181--all
1182</dt>
1183<dd>
1184<p>
Junio C Hamanoe89102f2017-02-15 23:18:151185 Pretend as if all the refs in <code>refs/</code>, along with <code>HEAD</code>, are
1186 listed on the command line as <em>&lt;commit&gt;</em>.
Junio C Hamanob0e02952008-01-19 08:02:001187</p>
1188</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591189<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171190--branches[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561191</dt>
1192<dd>
1193<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511194 Pretend as if all the refs in <code>refs/heads</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171195 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:501196 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
Junio C Hamano81d540a2012-03-02 19:52:471197 <em>&#42;</em>, or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561198</p>
1199</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591200<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171201--tags[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561202</dt>
1203<dd>
1204<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511205 Pretend as if all the refs in <code>refs/tags</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171206 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:471207 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>&#42;</em>,
1208 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561209</p>
1210</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591211<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171212--remotes[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561213</dt>
1214<dd>
1215<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511216 Pretend as if all the refs in <code>refs/remotes</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171217 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:071218 remote-tracking branches to ones matching given shell glob.
Junio C Hamano81d540a2012-03-02 19:52:471219 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:501220</p>
1221</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591222<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171223--glob=&lt;glob-pattern&gt;
Junio C Hamano57827fb2010-01-23 03:02:501224</dt>
1225<dd>
1226<p>
Junio C Hamanod2179ef2010-10-22 04:12:171227 Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
Junio C Hamano57827fb2010-01-23 03:02:501228 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
Junio C Hamano81d540a2012-03-02 19:52:471229 is automatically prepended if missing. If pattern lacks <em>?</em>, <em>&#42;</em>,
1230 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561231</p>
1232</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591233<dt class="hdlist1">
Junio C Hamanof079f702013-12-06 23:43:181234--exclude=&lt;glob-pattern&gt;
1235</dt>
1236<dd>
1237<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511238 Do not include refs matching <em>&lt;glob-pattern&gt;</em> that the next <code>--all</code>,
1239 <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or <code>--glob</code> would otherwise
Junio C Hamanof079f702013-12-06 23:43:181240 consider. Repetitions of this option accumulate exclusion patterns
Junio C Hamanoac12f0e2014-09-19 22:32:511241 up to the next <code>--all</code>, <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or
1242 <code>--glob</code> option (other options or arguments do not clear
Junio C Hamanofb5ffde2014-11-04 22:38:561243 accumulated patterns).
Junio C Hamanof079f702013-12-06 23:43:181244</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511245<div class="paragraph"><p>The patterns given should not begin with <code>refs/heads</code>, <code>refs/tags</code>, or
1246<code>refs/remotes</code> when applied to <code>--branches</code>, <code>--tags</code>, or <code>--remotes</code>,
1247respectively, and they must begin with <code>refs/</code> when applied to <code>--glob</code>
1248or <code>--all</code>. If a trailing <em>/&#42;</em> is intended, it must be given
Junio C Hamanof079f702013-12-06 23:43:181249explicitly.</p></div>
1250</dd>
1251<dt class="hdlist1">
Junio C Hamano2a4bcbc2014-10-29 20:07:391252--reflog
1253</dt>
1254<dd>
1255<p>
1256 Pretend as if all objects mentioned by reflogs are listed on the
1257 command line as <code>&lt;commit&gt;</code>.
1258</p>
1259</dd>
1260<dt class="hdlist1">
Junio C Hamanoa42e0332019-07-19 19:49:371261--alternate-refs
1262</dt>
1263<dd>
1264<p>
1265 Pretend as if all objects mentioned as ref tips of alternate
1266 repositories were listed on the command line. An alternate
1267 repository is any repository whose object directory is specified
1268 in <code>objects/info/alternates</code>. The set of included objects may
1269 be modified by <code>core.alternateRefsCommand</code>, etc. See
1270 <a href="git-config.html">git-config(1)</a>.
1271</p>
1272</dd>
1273<dt class="hdlist1">
Junio C Hamano8d57fa92017-09-19 05:01:081274--single-worktree
1275</dt>
1276<dd>
1277<p>
1278 By default, all working trees will be examined by the
1279 following options when there are more than one (see
1280 <a href="git-worktree.html">git-worktree(1)</a>): <code>--all</code>, <code>--reflog</code> and
1281 <code>--indexed-objects</code>.
1282 This option forces them to examine the current working tree
1283 only.
1284</p>
1285</dd>
1286<dt class="hdlist1">
Junio C Hamano084228c2011-05-30 08:13:521287--ignore-missing
1288</dt>
1289<dd>
1290<p>
1291 Upon seeing an invalid object name in the input, pretend as if
1292 the bad input was not given.
1293</p>
1294</dd>
1295<dt class="hdlist1">
Junio C Hamano5706e0b2009-11-24 10:54:161296--bisect
1297</dt>
1298<dd>
1299<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511300 Pretend as if the bad bisection ref <code>refs/bisect/bad</code>
1301 was listed and as if it was followed by <code>--not</code> and the good
1302 bisection refs <code>refs/bisect/good-*</code> on the command
Junio C Hamanoef57d1e2015-03-25 21:23:001303 line. Cannot be combined with --first-parent.
Junio C Hamano5706e0b2009-11-24 10:54:161304</p>
1305</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591306<dt class="hdlist1">
Junio C Hamano5706e0b2009-11-24 10:54:161307--stdin
1308</dt>
1309<dd>
1310<p>
1311 In addition to the <em>&lt;commit&gt;</em> listed on the command
Junio C Hamano92d80372016-07-13 22:00:051312 line, read them from the standard input. If a <code>--</code> separator is
Junio C Hamano5706e0b2009-11-24 10:54:161313 seen, stop reading commits and start reading paths to limit the
1314 result.
1315</p>
1316</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591317<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151318--cherry-mark
1319</dt>
1320<dd>
1321<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511322 Like <code>--cherry-pick</code> (see below) but mark equivalent commits
1323 with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151324</p>
1325</dd>
1326<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001327--cherry-pick
1328</dt>
1329<dd>
1330<p>
1331 Omit any commit that introduces the same change as
Junio C Hamanob73af6c2013-12-03 22:07:111332 another commit on the &#8220;other side&#8221; when the set of
Junio C Hamano68cf15a2010-11-06 01:01:591333 commits are limited with symmetric difference.
1334</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511335<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:001336to list all commits on only one side of them is with
Junio C Hamanoac12f0e2014-09-19 22:32:511337<code>--left-right</code> (see the example below in the description of
1338the <code>--left-right</code> option). However, it shows the commits that were
Junio C Hamanob73af6c2013-12-03 22:07:111339cherry-picked from the other branch (for example, &#8220;3rd on b&#8221; may be
1340cherry-picked from branch A). With this option, such pairs of commits are
Junio C Hamano68cf15a2010-11-06 01:01:591341excluded from the output.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001342</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591343<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151344--left-only
1345</dt>
1346<dt class="hdlist1">
1347--right-only
1348</dt>
1349<dd>
1350<p>
Junio C Hamanocd451662016-09-13 00:54:091351 List only commits on the respective side of a symmetric difference,
Junio C Hamanoac12f0e2014-09-19 22:32:511352 i.e. only those which would be marked <code>&lt;</code> resp. <code>&gt;</code> by
1353 <code>--left-right</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151354</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511355<div class="paragraph"><p>For example, <code>--cherry-pick --right-only A...B</code> omits those
1356commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in
1357<code>A</code>. In other words, this lists the <code>+</code> commits from <code>git cherry A B</code>.
1358More precisely, <code>--cherry-pick --right-only --no-merges</code> gives the exact
Junio C Hamano9a2fb2d2011-03-23 05:40:151359list.</p></div>
1360</dd>
1361<dt class="hdlist1">
1362--cherry
1363</dt>
1364<dd>
1365<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511366 A synonym for <code>--right-only --cherry-mark --no-merges</code>; useful to
Junio C Hamano9a2fb2d2011-03-23 05:40:151367 limit the output to the commits on our side and mark those that
1368 have been applied to the other side of a forked history with
Junio C Hamanoac12f0e2014-09-19 22:32:511369 <code>git log --cherry upstream...mybranch</code>, similar to
1370 <code>git cherry upstream mybranch</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151371</p>
1372</dd>
1373<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471374-g
1375</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591376<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471377--walk-reflogs
Junio C Hamanob0e02952008-01-19 08:02:001378</dt>
1379<dd>
1380<p>
1381 Instead of walking the commit ancestry chain, walk
1382 reflog entries from the most recent one to older ones.
1383 When this option is used you cannot specify commits to
1384 exclude (that is, <em>&#94;commit</em>, <em>commit1..commit2</em>,
Junio C Hamanod75148a2014-04-08 19:48:381385 and <em>commit1...commit2</em> notations cannot be used).
Junio C Hamano68cf15a2010-11-06 01:01:591386</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511387<div class="paragraph"><p>With <code>--pretty</code> format other than <code>oneline</code> (for obvious reasons),
Junio C Hamanob0e02952008-01-19 08:02:001388this causes the output to have two extra lines of information
Junio C Hamanoe548d1b2016-08-08 22:26:491389taken from the reflog. The reflog designator in the output may be shown
1390as <code>ref@{Nth}</code> (where <code>Nth</code> is the reverse-chronological index in the
1391reflog) or as <code>ref@{timestamp}</code> (with the timestamp for that entry),
1392depending on a few rules:</p></div>
1393<div class="openblock">
1394<div class="content">
1395<div class="olist arabic"><ol class="arabic">
1396<li>
1397<p>
1398If the starting point is specified as <code>ref@{Nth}</code>, show the index
Junio C Hamano2567b322019-02-05 23:33:561399 format.
Junio C Hamanoe548d1b2016-08-08 22:26:491400</p>
1401</li>
1402<li>
1403<p>
1404If the starting point was specified as <code>ref@{now}</code>, show the
Junio C Hamano2567b322019-02-05 23:33:561405 timestamp format.
Junio C Hamanoe548d1b2016-08-08 22:26:491406</p>
1407</li>
1408<li>
1409<p>
1410If neither was used, but <code>--date</code> was given on the command line, show
Junio C Hamano2567b322019-02-05 23:33:561411 the timestamp in the format requested by <code>--date</code>.
Junio C Hamanoe548d1b2016-08-08 22:26:491412</p>
1413</li>
1414<li>
1415<p>
1416Otherwise, show the index format.
1417</p>
1418</li>
1419</ol></div>
1420</div></div>
1421<div class="paragraph"><p>Under <code>--pretty=oneline</code>, the commit message is
Junio C Hamanob0e02952008-01-19 08:02:001422prefixed with this information on the same line.
Junio C Hamanoac12f0e2014-09-19 22:32:511423This option cannot be combined with <code>--reverse</code>.
Junio C Hamanoa28a9202012-06-21 07:08:231424See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001425</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591426<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001427--merge
1428</dt>
1429<dd>
1430<p>
1431 After a failed merge, show refs that touch files having a
Junio C Hamano68cf15a2010-11-06 01:01:591432 conflict and don&#8217;t exist on all heads to merge.
Junio C Hamanob0e02952008-01-19 08:02:001433</p>
1434</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591435<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001436--boundary
1437</dt>
1438<dd>
1439<p>
Junio C Hamano27159f82013-06-14 17:19:221440 Output excluded boundary commits. Boundary commits are
Junio C Hamanoac12f0e2014-09-19 22:32:511441 prefixed with <code>-</code>.
Junio C Hamanob0e02952008-01-19 08:02:001442</p>
1443</dd>
Junio C Hamanoa76cb0d2008-08-13 20:04:101444</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271445</div>
1446<div class="sect2">
1447<h3 id="_history_simplification">History Simplification</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591448<div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the
Junio C Hamano28363492008-11-14 08:26:311449commits modifying a particular &lt;path&gt;. But there are two parts of
1450<em>History Simplification</em>, one part is selecting the commits and the other
1451is how to do it, as there are various strategies to simplify the history.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591452<div class="paragraph"><p>The following options select the commits to be shown:</p></div>
1453<div class="dlist"><dl>
1454<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311455&lt;paths&gt;
1456</dt>
1457<dd>
1458<p>
1459 Commits modifying the given &lt;paths&gt; are selected.
1460</p>
1461</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591462<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311463--simplify-by-decoration
1464</dt>
1465<dd>
1466<p>
1467 Commits that are referred by some branch or tag are selected.
1468</p>
1469</dd>
1470</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591471<div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div>
1472<div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div>
1473<div class="dlist"><dl>
1474<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311475Default mode
1476</dt>
1477<dd>
1478<p>
1479 Simplifies the history to the simplest history explaining the
1480 final state of the tree. Simplest because it prunes some side
1481 branches if the end result is the same (i.e. merging branches
1482 with the same content)
1483</p>
1484</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591485<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311486--full-history
1487</dt>
1488<dd>
1489<p>
Junio C Hamano15567bc2011-07-23 00:51:591490 Same as the default mode, but does not prune some history.
Junio C Hamano28363492008-11-14 08:26:311491</p>
1492</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591493<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311494--dense
1495</dt>
1496<dd>
1497<p>
1498 Only the selected commits are shown, plus some to have a
1499 meaningful history.
1500</p>
1501</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591502<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311503--sparse
1504</dt>
1505<dd>
1506<p>
1507 All commits in the simplified history are shown.
1508</p>
1509</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591510<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311511--simplify-merges
1512</dt>
1513<dd>
1514<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511515 Additional option to <code>--full-history</code> to remove some needless
Junio C Hamano28363492008-11-14 08:26:311516 merges from the resulting history, as there are no selected
1517 commits contributing to this merge.
1518</p>
1519</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591520<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551521--ancestry-path
1522</dt>
1523<dd>
1524<p>
1525 When given a range of commits to display (e.g. <em>commit1..commit2</em>
1526 or <em>commit2 &#94;commit1</em>), only display commits that exist
1527 directly on the ancestry chain between the <em>commit1</em> and
1528 <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>,
1529 and ancestors of <em>commit2</em>.
1530</p>
1531</dd>
Junio C Hamano28363492008-11-14 08:26:311532</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591533<div class="paragraph"><p>A more detailed explanation follows.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511534<div class="paragraph"><p>Suppose you specified <code>foo</code> as the &lt;paths&gt;. We shall call commits
1535that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff
1536filtered for <code>foo</code>, they look different and equal, respectively.)</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591537<div class="paragraph"><p>In the following, we will always refer to the same example history to
Junio C Hamanoa76cb0d2008-08-13 20:04:101538illustrate the differences between simplification settings. We assume
Junio C Hamanoac12f0e2014-09-19 22:32:511539that you are filtering for a file <code>foo</code> in this commit graph:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101540<div class="listingblock">
1541<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511542<pre><code> .-A---M---N---O---P---Q
Junio C Hamano27159f82013-06-14 17:19:221543 / / / / / /
1544 I B C D E Y
1545 \ / / / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511546 `-------------' X</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101547</div></div>
Junio C Hamano27159f82013-06-14 17:19:221548<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:101549each merge. The commits are:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591550<div class="ulist"><ul>
Junio C Hamanoa76cb0d2008-08-13 20:04:101551<li>
1552<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511553<code>I</code> is the initial commit, in which <code>foo</code> exists with contents
1554 &#8220;asdf&#8221;, and a file <code>quux</code> exists with contents &#8220;quux&#8221;. Initial
1555 commits are compared to an empty tree, so <code>I</code> is !TREESAME.
Junio C Hamanoa76cb0d2008-08-13 20:04:101556</p>
1557</li>
1558<li>
1559<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511560In <code>A</code>, <code>foo</code> contains just &#8220;foo&#8221;.
Junio C Hamanoa76cb0d2008-08-13 20:04:101561</p>
1562</li>
1563<li>
1564<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511565<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:101566 hence TREESAME to all parents.
1567</p>
1568</li>
1569<li>
1570<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511571<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:101572 so it is not TREESAME to any parent.
1573</p>
1574</li>
1575<li>
1576<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511577<code>D</code> sets <code>foo</code> to &#8220;baz&#8221;. Its merge <code>O</code> combines the strings from
1578 <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:101579</p>
1580</li>
1581<li>
1582<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511583<code>E</code> changes <code>quux</code> to &#8220;xyzzy&#8221;, and its merge <code>P</code> combines the
1584 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:221585</p>
1586</li>
1587<li>
1588<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511589<code>X</code> is an independent root commit that added a new file <code>side</code>, and <code>Y</code>
1590 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
1591 <code>Q</code> is TREESAME to <code>P</code>, but not to <code>Y</code>.
Junio C Hamanoa76cb0d2008-08-13 20:04:101592</p>
1593</li>
1594</ul></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511595<div class="paragraph"><p><code>rev-list</code> walks backwards through history, including or excluding
1596commits based on whether <code>--full-history</code> and/or parent rewriting
1597(via <code>--parents</code> or <code>--children</code>) are used. The following settings
Junio C Hamanoa76cb0d2008-08-13 20:04:101598are available.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591599<div class="dlist"><dl>
1600<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101601Default mode
1602</dt>
1603<dd>
1604<p>
1605 Commits are included if they are not TREESAME to any parent
Junio C Hamanoac12f0e2014-09-19 22:32:511606 (though this can be changed, see <code>--sparse</code> below). If the
Junio C Hamanoa76cb0d2008-08-13 20:04:101607 commit was a merge, and it was TREESAME to one parent, follow
1608 only that parent. (Even if there are several TREESAME
1609 parents, follow only one of them.) Otherwise, follow all
1610 parents.
1611</p>
Junio C Hamano68cf15a2010-11-06 01:01:591612<div class="paragraph"><p>This results in:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101613<div class="listingblock">
1614<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511615<pre><code> .-A---N---O
Junio C Hamano89a57342010-06-22 23:22:551616 / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511617 I---------D</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101618</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591619<div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is
Junio C Hamanoac12f0e2014-09-19 22:32:511620available, removed <code>B</code> from consideration entirely. <code>C</code> was
1621considered via <code>N</code>, but is TREESAME. Root commits are compared to an
1622empty tree, so <code>I</code> is !TREESAME.</p></div>
1623<div class="paragraph"><p>Parent/child relations are only visible with <code>--parents</code>, but that does
Junio C Hamanoa76cb0d2008-08-13 20:04:101624not affect the commits selected in default mode, so we have shown the
1625parent lines.</p></div>
1626</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591627<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101628--full-history without parent rewriting
1629</dt>
1630<dd>
1631<p>
1632 This mode differs from the default in one point: always follow
1633 all parents of a merge, even if it is TREESAME to one of them.
1634 Even if more than one side of the merge has commits that are
1635 included, this does not imply that the merge itself is! In
1636 the example, we get
1637</p>
1638<div class="listingblock">
1639<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511640<pre><code> I A B N D O P Q</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101641</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511642<div class="paragraph"><p><code>M</code> was excluded because it is TREESAME to both parents. <code>E</code>,
1643<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:101644do not appear.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591645<div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk
Junio C Hamanoa76cb0d2008-08-13 20:04:101646about the parent/child relationships between the commits, so we show
1647them disconnected.</p></div>
1648</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591649<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101650--full-history with parent rewriting
1651</dt>
1652<dd>
1653<p>
1654 Ordinary commits are only included if they are !TREESAME
Junio C Hamanoac12f0e2014-09-19 22:32:511655 (though this can be changed, see <code>--sparse</code> below).
Junio C Hamanoa76cb0d2008-08-13 20:04:101656</p>
Junio C Hamano68cf15a2010-11-06 01:01:591657<div class="paragraph"><p>Merges are always included. However, their parent list is rewritten:
Junio C Hamanoa76cb0d2008-08-13 20:04:101658Along each parent, prune away commits that are not included
1659themselves. This results in</p></div>
1660<div class="listingblock">
1661<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511662<pre><code> .-A---M---N---O---P---Q
Junio C Hamanoa76cb0d2008-08-13 20:04:101663 / / / / /
1664 I B / D /
1665 \ / / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511666 `-------------'</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101667</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511668<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:101669was pruned away because it is TREESAME, but the parent list of P was
Junio C Hamanoac12f0e2014-09-19 22:32:511670rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and
1671<code>N</code>, and <code>X</code>, <code>Y</code> and <code>Q</code>.</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101672</dd>
1673</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591674<div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME
Junio C Hamanoa76cb0d2008-08-13 20:04:101675affects inclusion:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591676<div class="dlist"><dl>
1677<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471678--dense
1679</dt>
Junio C Hamanoa76cb0d2008-08-13 20:04:101680<dd>
1681<p>
1682 Commits that are walked are included if they are not TREESAME
1683 to any parent.
1684</p>
1685</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591686<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471687--sparse
Junio C Hamanob0e02952008-01-19 08:02:001688</dt>
1689<dd>
1690<p>
Junio C Hamanoa76cb0d2008-08-13 20:04:101691 All commits that are walked are included.
Junio C Hamanob0e02952008-01-19 08:02:001692</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511693<div class="paragraph"><p>Note that without <code>--full-history</code>, this still simplifies merges: if
Junio C Hamanoa76cb0d2008-08-13 20:04:101694one of the parents is TREESAME, we follow only that one, so the other
1695sides of the merge are never walked.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001696</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591697<dt class="hdlist1">
Junio C Hamanoa2f46622008-09-03 05:20:311698--simplify-merges
1699</dt>
1700<dd>
1701<p>
1702 First, build a history graph in the same way that
Junio C Hamanoac12f0e2014-09-19 22:32:511703 <code>--full-history</code> with parent rewriting does (see above).
Junio C Hamanoa2f46622008-09-03 05:20:311704</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511705<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:311706history according to the following rules:</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271707<div class="openblock">
1708<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591709<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311710<li>
1711<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511712Set <code>C'</code> to <code>C</code>.
Junio C Hamanoa2f46622008-09-03 05:20:311713</p>
1714</li>
1715<li>
1716<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511717Replace each parent <code>P</code> of <code>C'</code> with its simplification <code>P'</code>. In
Junio C Hamano27159f82013-06-14 17:19:221718 the process, drop parents that are ancestors of other parents or that are
1719 root commits TREESAME to an empty tree, and remove duplicates, but take care
1720 to never drop all parents that we are TREESAME to.
Junio C Hamanoa2f46622008-09-03 05:20:311721</p>
1722</li>
1723<li>
1724<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511725If after this parent rewriting, <code>C'</code> is a root or merge commit (has
Junio C Hamanoa2f46622008-09-03 05:20:311726 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1727 Otherwise, it is replaced with its only parent.
1728</p>
1729</li>
1730</ul></div>
Junio C Hamano9629d4f2012-12-19 00:28:271731</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591732<div class="paragraph"><p>The effect of this is best shown by way of comparing to
Junio C Hamanoac12f0e2014-09-19 22:32:511733<code>--full-history</code> with parent rewriting. The example turns into:</p></div>
Junio C Hamanoa2f46622008-09-03 05:20:311734<div class="listingblock">
1735<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511736<pre><code> .-A---M---N---O
Junio C Hamanoa2f46622008-09-03 05:20:311737 / / /
1738 I B D
1739 \ / /
Junio C Hamanoac12f0e2014-09-19 22:32:511740 `---------'</code></pre>
Junio C Hamanoa2f46622008-09-03 05:20:311741</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511742<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:271743<div class="openblock">
1744<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591745<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311746<li>
1747<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511748<code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the
1749 other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME.
Junio C Hamanoa2f46622008-09-03 05:20:311750</p>
1751</li>
1752<li>
1753<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511754<code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then
Junio C Hamanoa2f46622008-09-03 05:20:311755 removed completely, because it had one parent and is TREESAME.
1756</p>
1757</li>
Junio C Hamano27159f82013-06-14 17:19:221758<li>
1759<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511760<code>Q</code>'s parent list had <code>Y</code> simplified to <code>X</code>. <code>X</code> was then removed, because it
1761 was a TREESAME root. <code>Q</code> was then removed completely, because it had one
Junio C Hamano27159f82013-06-14 17:19:221762 parent and is TREESAME.
1763</p>
1764</li>
Junio C Hamanoa2f46622008-09-03 05:20:311765</ul></div>
Junio C Hamano9629d4f2012-12-19 00:28:271766</div></div>
Junio C Hamanoa2f46622008-09-03 05:20:311767</dd>
1768</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591769<div class="paragraph"><p>Finally, there is a fifth simplification mode available:</p></div>
1770<div class="dlist"><dl>
1771<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551772--ancestry-path
1773</dt>
1774<dd>
1775<p>
1776 Limit the displayed commits to those directly on the ancestry
Junio C Hamanob73af6c2013-12-03 22:07:111777 chain between the &#8220;from&#8221; and &#8220;to&#8221; commits in the given commit
1778 range. I.e. only display commits that are ancestor of the &#8220;to&#8221;
1779 commit and descendants of the &#8220;from&#8221; commit.
Junio C Hamano89a57342010-06-22 23:22:551780</p>
Junio C Hamano68cf15a2010-11-06 01:01:591781<div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
Junio C Hamano89a57342010-06-22 23:22:551782<div class="listingblock">
1783<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511784<pre><code> D---E-------F
Junio C Hamano89a57342010-06-22 23:22:551785 / \ \
1786 B---C---G---H---I---J
1787 / \
Junio C Hamanoac12f0e2014-09-19 22:32:511788 A-------K---------------L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551789</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511790<div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>,
1791but excludes the ones that are ancestors of <code>D</code>. This is useful to see
1792what happened to the history leading to <code>M</code> since <code>D</code>, in the sense
1793that &#8220;what does <code>M</code> have that did not exist in <code>D</code>&#8221;. The result in this
1794example 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:551795of course).</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511796<div class="paragraph"><p>When we want to find out what commits in <code>M</code> are contaminated with the
1797bug introduced by <code>D</code> and need fixing, however, we might want to view
1798only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e.
1799excluding <code>C</code> and <code>K</code>. This is exactly what the <code>--ancestry-path</code>
Junio C Hamano89a57342010-06-22 23:22:551800option does. Applied to the <em>D..M</em> range, it results in:</p></div>
1801<div class="listingblock">
1802<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511803<pre><code> E-------F
Junio C Hamano89a57342010-06-22 23:22:551804 \ \
1805 G---H---I---J
1806 \
Junio C Hamanoac12f0e2014-09-19 22:32:511807 L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551808</div></div>
1809</dd>
1810</dl></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511811<div class="paragraph"><p>The <code>--simplify-by-decoration</code> option allows you to view only the
Junio C Hamano28363492008-11-14 08:26:311812big picture of the topology of the history, by omitting commits
1813that are not referenced by tags. Commits are marked as !TREESAME
1814(in other words, kept after history simplification rules described
1815above) if (1) they are referenced by tags, or (2) they change the
1816contents of the paths given on the command line. All other
1817commits are marked as TREESAME (subject to be simplified away).</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271818</div>
1819<div class="sect2">
1820<h3 id="_commit_ordering">Commit Ordering</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591821<div class="paragraph"><p>By default, the commits are shown in reverse chronological order.</p></div>
1822<div class="dlist"><dl>
1823<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001824--date-order
1825</dt>
1826<dd>
1827<p>
Junio C Hamanod0316112012-08-22 19:55:291828 Show no parents before all of its children are shown, but
1829 otherwise show commits in the commit timestamp order.
Junio C Hamanob0e02952008-01-19 08:02:001830</p>
1831</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591832<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:181833--author-date-order
1834</dt>
1835<dd>
1836<p>
1837 Show no parents before all of its children are shown, but
1838 otherwise show commits in the author timestamp order.
1839</p>
1840</dd>
1841<dt class="hdlist1">
Junio C Hamanod0316112012-08-22 19:55:291842--topo-order
1843</dt>
1844<dd>
1845<p>
1846 Show no parents before all of its children are shown, and
1847 avoid showing commits on multiple lines of history
1848 intermixed.
1849</p>
1850<div class="paragraph"><p>For example, in a commit history like this:</p></div>
1851<div class="listingblock">
1852<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511853<pre><code> ---1----2----4----7
Junio C Hamanod0316112012-08-22 19:55:291854 \ \
Junio C Hamanoac12f0e2014-09-19 22:32:511855 3----5----6----8---</code></pre>
Junio C Hamanod0316112012-08-22 19:55:291856</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511857<div class="paragraph"><p>where the numbers denote the order of commit timestamps, <code>git
1858rev-list</code> and friends with <code>--date-order</code> show the commits in the
Junio C Hamanod0316112012-08-22 19:55:291859timestamp order: 8 7 6 5 4 3 2 1.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511860<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:2918613 1); some older commits are shown before newer ones in order to
1862avoid showing the commits from two parallel development track mixed
1863together.</p></div>
1864</dd>
1865<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001866--reverse
1867</dt>
1868<dd>
1869<p>
Junio C Hamanof3ca7b82016-10-03 22:27:021870 Output the commits chosen to be shown (see Commit Limiting
1871 section above) in reverse order. Cannot be combined with
1872 <code>--walk-reflogs</code>.
Junio C Hamanob0e02952008-01-19 08:02:001873</p>
1874</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311875</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271876</div>
1877<div class="sect2">
1878<h3 id="_object_traversal">Object Traversal</h3>
Junio C Hamano076ffcc2013-02-06 05:13:211879<div class="paragraph"><p>These options are mostly targeted for packing of Git repositories.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591880<div class="dlist"><dl>
1881<dt class="hdlist1">
Junio C Hamanoeccdd4a2012-09-10 23:28:171882--no-walk[=(sorted|unsorted)]
Junio C Hamanob0e02952008-01-19 08:02:001883</dt>
1884<dd>
1885<p>
Junio C Hamanoeccdd4a2012-09-10 23:28:171886 Only show the given commits, but do not traverse their ancestors.
1887 This has no effect if a range is specified. If the argument
Junio C Hamanoac12f0e2014-09-19 22:32:511888 <code>unsorted</code> is given, the commits are shown in the order they were
1889 given on the command line. Otherwise (if <code>sorted</code> or no argument
Junio C Hamanob73af6c2013-12-03 22:07:111890 was given), the commits are shown in reverse chronological order
Junio C Hamanoeccdd4a2012-09-10 23:28:171891 by commit time.
Junio C Hamanoef57d1e2015-03-25 21:23:001892 Cannot be combined with <code>--graph</code>.
Junio C Hamanob0e02952008-01-19 08:02:001893</p>
1894</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591895<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001896--do-walk
1897</dt>
1898<dd>
1899<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511900 Overrides a previous <code>--no-walk</code>.
Junio C Hamanob0e02952008-01-19 08:02:001901</p>
1902</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311903</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271904</div>
1905<div class="sect2">
1906<h3 id="_commit_formatting">Commit Formatting</h3>
Junio C Hamanod2c978f2011-03-20 19:42:221907<div class="dlist"><dl>
1908<dt class="hdlist1">
1909--pretty[=&lt;format&gt;]
1910</dt>
1911<dt class="hdlist1">
1912--format=&lt;format&gt;
1913</dt>
1914<dd>
1915<p>
1916 Pretty-print the contents of the commit logs in a given format,
1917 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:261918 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em>, <em>format:&lt;string&gt;</em>
1919 and <em>tformat:&lt;string&gt;</em>. When <em>&lt;format&gt;</em> is none of the above,
1920 and has <em>%placeholder</em> in it, it acts as if
1921 <em>--pretty=tformat:&lt;format&gt;</em> were given.
Junio C Hamanod2c978f2011-03-20 19:42:221922</p>
Junio C Hamano6bb32e62015-02-17 22:11:261923<div class="paragraph"><p>See the "PRETTY FORMATS" section for some additional details for each
1924format. When <em>=&lt;format&gt;</em> part is omitted, it defaults to <em>medium</em>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221925<div class="paragraph"><p>Note: you can specify the default pretty format in the repository
Junio C Hamanoa28a9202012-06-21 07:08:231926configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221927</dd>
1928<dt class="hdlist1">
1929--abbrev-commit
1930</dt>
1931<dd>
1932<p>
1933 Instead of showing the full 40-byte hexadecimal commit object
1934 name, show only a partial prefix. Non default number of
1935 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
1936 diff output, if it is displayed).
1937</p>
1938<div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
1939people using 80-column terminals.</p></div>
1940</dd>
1941<dt class="hdlist1">
Junio C Hamanof93530e2011-05-25 23:59:591942--no-abbrev-commit
1943</dt>
1944<dd>
1945<p>
1946 Show the full 40-byte hexadecimal commit object name. This negates
Junio C Hamanoac12f0e2014-09-19 22:32:511947 <code>--abbrev-commit</code> and those options which imply it such as
Junio C Hamano042f2142016-06-27 18:05:051948 "--oneline". It also overrides the <code>log.abbrevCommit</code> variable.
Junio C Hamanof93530e2011-05-25 23:59:591949</p>
1950</dd>
1951<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221952--oneline
1953</dt>
1954<dd>
1955<p>
1956 This is a shorthand for "--pretty=oneline --abbrev-commit"
1957 used together.
1958</p>
1959</dd>
1960<dt class="hdlist1">
Junio C Hamanoc5bb3b32013-08-05 22:43:361961--encoding=&lt;encoding&gt;
Junio C Hamanod2c978f2011-03-20 19:42:221962</dt>
1963<dd>
1964<p>
1965 The commit objects record the encoding used for the log message
1966 in their encoding header; this option can be used to tell the
1967 command to re-code the commit log message in the encoding
1968 preferred by the user. For non plumbing commands this
Junio C Hamano823eebb2015-07-10 22:29:341969 defaults to UTF-8. Note that if an object claims to be encoded
1970 in <code>X</code> and we are outputting in <code>X</code>, we will output the object
1971 verbatim; this means that invalid sequences in the original
1972 commit may be copied to the output.
Junio C Hamanod2c978f2011-03-20 19:42:221973</p>
1974</dd>
1975<dt class="hdlist1">
Junio C Hamano5996b672016-04-13 22:01:411976--expand-tabs=&lt;n&gt;
1977</dt>
1978<dt class="hdlist1">
1979--expand-tabs
1980</dt>
1981<dt class="hdlist1">
1982--no-expand-tabs
1983</dt>
1984<dd>
1985<p>
1986 Perform a tab expansion (replace each tab with enough spaces
1987 to fill to the next display column that is multiple of <em>&lt;n&gt;</em>)
1988 in the log message before showing it in the output.
1989 <code>--expand-tabs</code> is a short-hand for <code>--expand-tabs=8</code>, and
1990 <code>--no-expand-tabs</code> is a short-hand for <code>--expand-tabs=0</code>,
1991 which disables tab expansion.
1992</p>
1993<div class="paragraph"><p>By default, tabs are expanded in pretty formats that indent the log
1994message by 4 spaces (i.e. <em>medium</em>, which is the default, <em>full</em>,
1995and <em>fuller</em>).</p></div>
1996</dd>
1997<dt class="hdlist1">
Junio C Hamanob3f862c2019-12-05 22:22:001998--notes[=&lt;ref&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:221999</dt>
2000<dd>
2001<p>
Junio C Hamanoa28a9202012-06-21 07:08:232002 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
Junio C Hamanod2c978f2011-03-20 19:42:222003 commit, when showing the commit log message. This is the default
Junio C Hamanoac12f0e2014-09-19 22:32:512004 for <code>git log</code>, <code>git show</code> and <code>git whatchanged</code> commands when
2005 there is no <code>--pretty</code>, <code>--format</code>, or <code>--oneline</code> option given
Junio C Hamano60033462011-05-03 00:48:432006 on the command line.
Junio C Hamanod2c978f2011-03-20 19:42:222007</p>
Junio C Hamano60033462011-05-03 00:48:432008<div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the
Junio C Hamano042f2142016-06-27 18:05:052009<code>core.notesRef</code> and <code>notes.displayRef</code> variables (or corresponding
Junio C Hamanoa28a9202012-06-21 07:08:232010environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div>
Junio C Hamanob3f862c2019-12-05 22:22:002011<div class="paragraph"><p>With an optional <em>&lt;ref&gt;</em> argument, use the ref to find the notes
2012to display. The ref can specify the full refname when it begins
Junio C Hamano1f7c4a52015-10-14 22:15:512013with <code>refs/notes/</code>; when it begins with <code>notes/</code>, <code>refs/</code> and otherwise
2014<code>refs/notes/</code> is prefixed to form a full name of the ref.</p></div>
Junio C Hamano60033462011-05-03 00:48:432015<div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
2016being displayed. Examples: "--notes=foo" will show only notes from
2017"refs/notes/foo"; "--notes=foo --notes" will show both notes from
2018"refs/notes/foo" and from the default notes ref(s).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:222019</dd>
2020<dt class="hdlist1">
Junio C Hamano60033462011-05-03 00:48:432021--no-notes
2022</dt>
2023<dd>
2024<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512025 Do not show notes. This negates the above <code>--notes</code> option, by
Junio C Hamano60033462011-05-03 00:48:432026 resetting the list of notes refs from which notes are shown.
2027 Options are parsed in the order given on the command line, so e.g.
2028 "--notes --notes=foo --no-notes --notes=bar" will only show notes
2029 from "refs/notes/bar".
2030</p>
2031</dd>
2032<dt class="hdlist1">
Junio C Hamanob3f862c2019-12-05 22:22:002033--show-notes[=&lt;ref&gt;]
Junio C Hamano60033462011-05-03 00:48:432034</dt>
2035<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222036--[no-]standard-notes
2037</dt>
2038<dd>
2039<p>
Junio C Hamano60033462011-05-03 00:48:432040 These options are deprecated. Use the above --notes/--no-notes
2041 options instead.
Junio C Hamanod2c978f2011-03-20 19:42:222042</p>
2043</dd>
2044<dt class="hdlist1">
Junio C Hamano0acb1ae2012-09-24 21:28:132045--show-signature
2046</dt>
2047<dd>
2048<p>
2049 Check the validity of a signed commit object by passing the signature
Junio C Hamanoac12f0e2014-09-19 22:32:512050 to <code>gpg --verify</code> and show the output.
Junio C Hamano0acb1ae2012-09-24 21:28:132051</p>
2052</dd>
2053<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222054--relative-date
2055</dt>
2056<dd>
2057<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512058 Synonym for <code>--date=relative</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222059</p>
2060</dd>
2061<dt class="hdlist1">
Junio C Hamano1eb56092015-10-05 20:39:532062--date=&lt;format&gt;
Junio C Hamanod2c978f2011-03-20 19:42:222063</dt>
2064<dd>
2065<p>
2066 Only takes effect for dates shown in human-readable format, such
Junio C Hamanoac12f0e2014-09-19 22:32:512067 as when using <code>--pretty</code>. <code>log.date</code> config variable sets a default
Junio C Hamano1eb56092015-10-05 20:39:532068 value for the log command&#8217;s <code>--date</code> option. By default, dates
2069 are shown in the original time zone (either committer&#8217;s or
2070 author&#8217;s). If <code>-local</code> is appended to the format (e.g.,
2071 <code>iso-local</code>), the user&#8217;s local time zone is used instead.
Junio C Hamanod2c978f2011-03-20 19:42:222072</p>
Junio C Hamanob5513772019-04-22 03:38:392073<div class="openblock">
2074<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512075<div class="paragraph"><p><code>--date=relative</code> shows dates relative to the current time,
Junio C Hamanoe548d1b2016-08-08 22:26:492076e.g. &#8220;2 hours ago&#8221;. The <code>-local</code> option has no effect for
2077<code>--date=relative</code>.</p></div>
Junio C Hamano1eb56092015-10-05 20:39:532078<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:512079<div class="paragraph"><p><code>--date=iso</code> (or <code>--date=iso8601</code>) shows timestamps in a ISO 8601-like format.
2080The differences to the strict ISO 8601 format are:</p></div>
2081<div class="ulist"><ul>
2082<li>
2083<p>
2084a space instead of the <code>T</code> date/time delimiter
2085</p>
2086</li>
2087<li>
2088<p>
2089a space between time and time zone
2090</p>
2091</li>
2092<li>
2093<p>
2094no colon between hours and minutes of the time zone
2095</p>
2096</li>
2097</ul></div>
2098<div class="paragraph"><p><code>--date=iso-strict</code> (or <code>--date=iso8601-strict</code>) shows timestamps in strict
2099ISO 8601 format.</p></div>
2100<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:112101format, often found in email messages.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512102<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:492103<div class="paragraph"><p><code>--date=raw</code> shows the date as seconds since the epoch (1970-01-01
210400:00:00 UTC), followed by a space, and then the timezone as an offset
2105from UTC (a <code>+</code> or <code>-</code> with four digits; the first two are hours, and
2106the second two are minutes). I.e., as if the timestamp were formatted
2107with <code>strftime("%s %z")</code>).
2108Note that the <code>-local</code> option does not affect the seconds-since-epoch
2109value (which is always measured in UTC), but does switch the accompanying
2110timezone value.</p></div>
Junio C Hamano23168ef2019-02-07 07:20:472111<div class="paragraph"><p><code>--date=human</code> shows the timezone if the timezone does not match the
2112current time-zone, and doesn&#8217;t print the whole date if that matches
2113(ie skip printing year for dates that are "this year", but also skip
2114the whole date itself if it&#8217;s in the last few days and we can just say
2115what weekday it was). For older dates the hour and minute is also
2116omitted.</p></div>
Junio C Hamanoe548d1b2016-08-08 22:26:492117<div class="paragraph"><p><code>--date=unix</code> shows the date as a Unix epoch timestamp (seconds since
21181970). As with <code>--raw</code>, this is always in UTC and therefore <code>-local</code>
2119has no effect.</p></div>
Junio C Hamano55d91912017-06-22 22:32:462120<div class="paragraph"><p><code>--date=format:...</code> feeds the format <code>...</code> to your system <code>strftime</code>,
2121except for %z and %Z, which are handled internally.
Junio C Hamanod7ed4042015-08-03 19:43:002122Use <code>--date=format:%c</code> to show the date in your system locale&#8217;s
2123preferred format. See the <code>strftime</code> manual for a complete list of
Junio C Hamano1eb56092015-10-05 20:39:532124format placeholders. When using <code>-local</code>, the correct syntax is
2125<code>--date=format-local:...</code>.</p></div>
2126<div class="paragraph"><p><code>--date=default</code> is the default format, and is similar to
2127<code>--date=rfc2822</code>, with a few exceptions:</p></div>
Junio C Hamanob5513772019-04-22 03:38:392128</div></div>
Junio C Hamano1eb56092015-10-05 20:39:532129<div class="ulist"><ul>
2130<li>
2131<p>
2132there is no comma after the day-of-week
2133</p>
2134</li>
2135<li>
2136<p>
2137the time zone is omitted when the local time zone is used
2138</p>
2139</li>
2140</ul></div>
Junio C Hamanod2c978f2011-03-20 19:42:222141</dd>
2142<dt class="hdlist1">
2143--parents
2144</dt>
2145<dd>
2146<p>
2147 Print also the parents of the commit (in the form "commit parent&#8230;").
Junio C Hamanoce019c02017-10-30 05:57:462148 Also enables parent rewriting, see <em>History Simplification</em> above.
Junio C Hamanod2c978f2011-03-20 19:42:222149</p>
2150</dd>
2151<dt class="hdlist1">
2152--children
2153</dt>
2154<dd>
2155<p>
2156 Print also the children of the commit (in the form "commit child&#8230;").
Junio C Hamanoce019c02017-10-30 05:57:462157 Also enables parent rewriting, see <em>History Simplification</em> above.
Junio C Hamanod2c978f2011-03-20 19:42:222158</p>
2159</dd>
2160<dt class="hdlist1">
2161--left-right
2162</dt>
2163<dd>
2164<p>
Junio C Hamanocd451662016-09-13 00:54:092165 Mark which side of a symmetric difference a commit is reachable from.
Junio C Hamanoac12f0e2014-09-19 22:32:512166 Commits from the left side are prefixed with <code>&lt;</code> and those from
2167 the right with <code>&gt;</code>. If combined with <code>--boundary</code>, those
2168 commits are prefixed with <code>-</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222169</p>
2170<div class="paragraph"><p>For example, if you have this topology:</p></div>
2171<div class="listingblock">
2172<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512173<pre><code> y---b---b branch B
Junio C Hamanod2c978f2011-03-20 19:42:222174 / \ /
2175 / .
2176 / / \
Junio C Hamanoac12f0e2014-09-19 22:32:512177 o---x---a---a branch A</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222178</div></div>
2179<div class="paragraph"><p>you would get an output like this:</p></div>
2180<div class="listingblock">
2181<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512182<pre><code> $ git rev-list --left-right --boundary --pretty=oneline A...B
Junio C Hamanod2c978f2011-03-20 19:42:222183
2184 &gt;bbbbbbb... 3rd on b
2185 &gt;bbbbbbb... 2nd on b
2186 &lt;aaaaaaa... 3rd on a
2187 &lt;aaaaaaa... 2nd on a
2188 -yyyyyyy... 1st on b
Junio C Hamanoac12f0e2014-09-19 22:32:512189 -xxxxxxx... 1st on a</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222190</div></div>
2191</dd>
2192<dt class="hdlist1">
2193--graph
2194</dt>
2195<dd>
2196<p>
2197 Draw a text-based graphical representation of the commit history
2198 on the left hand side of the output. This may cause extra lines
2199 to be printed in between commits, in order for the graph history
2200 to be drawn properly.
Junio C Hamanoef57d1e2015-03-25 21:23:002201 Cannot be combined with <code>--no-walk</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222202</p>
Junio C Hamanoce019c02017-10-30 05:57:462203<div class="paragraph"><p>This enables parent rewriting, see <em>History Simplification</em> above.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512204<div class="paragraph"><p>This implies the <code>--topo-order</code> option by default, but the
2205<code>--date-order</code> option may also be specified.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:222206</dd>
Junio C Hamano624dd4c2014-04-03 21:56:302207<dt class="hdlist1">
2208--show-linear-break[=&lt;barrier&gt;]
2209</dt>
2210<dd>
2211<p>
2212 When --graph is not used, all history branches are flattened
2213 which can make it hard to see that the two consecutive commits
2214 do not belong to a linear branch. This option puts a barrier
Junio C Hamanoac12f0e2014-09-19 22:32:512215 in between them in that case. If <code>&lt;barrier&gt;</code> is specified, it
Junio C Hamano624dd4c2014-04-03 21:56:302216 is the string that will be shown instead of the default one.
2217</p>
2218</dd>
Junio C Hamanod2c978f2011-03-20 19:42:222219</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:272220</div>
2221<div class="sect2">
2222<h3 id="_diff_formatting">Diff Formatting</h3>
Junio C Hamanob73af6c2013-12-03 22:07:112223<div class="paragraph"><p>Listed below are options that control the formatting of diff output.
Junio C Hamanoa28a9202012-06-21 07:08:232224Some of them are specific to <a href="git-rev-list.html">git-rev-list(1)</a>, however other diff
2225options 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:222226<div class="dlist"><dl>
2227<dt class="hdlist1">
2228-c
2229</dt>
2230<dd>
2231<p>
2232 With this option, diff output for a merge commit
2233 shows the differences from each of the parents to the merge result
2234 simultaneously instead of showing pairwise diff between a parent
2235 and the result one at a time. Furthermore, it lists only files
2236 which were modified from all parents.
2237</p>
2238</dd>
2239<dt class="hdlist1">
2240--cc
2241</dt>
2242<dd>
2243<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512244 This flag implies the <code>-c</code> option and further compresses the
Junio C Hamanod2c978f2011-03-20 19:42:222245 patch output by omitting uninteresting hunks whose contents in
2246 the parents have only two variants and the merge result picks
2247 one of them without modification.
2248</p>
2249</dd>
2250<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:002251--combined-all-paths
2252</dt>
2253<dd>
2254<p>
2255 This flag causes combined diffs (used for merge commits) to
2256 list the name of the file from all parents. It thus only has
2257 effect when -c or --cc are specified, and is likely only
2258 useful if filename changes are detected (i.e. when either
2259 rename or copy detection have been requested).
2260</p>
2261</dd>
2262<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222263-m
2264</dt>
2265<dd>
2266<p>
2267 This flag makes the merge commits show the full diff like
2268 regular commits; for each merge parent, a separate log entry
2269 and diff is generated. An exception is that only diff against
Junio C Hamanoac12f0e2014-09-19 22:32:512270 the first parent is shown when <code>--first-parent</code> option is given;
Junio C Hamanod2c978f2011-03-20 19:42:222271 in that case, the output represents the changes the merge
2272 brought <em>into</em> the then-current branch.
2273</p>
2274</dd>
2275<dt class="hdlist1">
2276-r
2277</dt>
2278<dd>
2279<p>
2280 Show recursive diffs.
2281</p>
2282</dd>
2283<dt class="hdlist1">
2284-t
2285</dt>
2286<dd>
2287<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512288 Show the tree objects in the diff output. This implies <code>-r</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222289</p>
2290</dd>
Junio C Hamanod2c978f2011-03-20 19:42:222291</dl></div>
Junio C Hamano0430e3a2007-05-15 03:13:172292</div>
Junio C Hamano9629d4f2012-12-19 00:28:272293</div>
2294</div>
2295<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312296<h2 id="_pretty_formats">PRETTY FORMATS</h2>
Junio C Hamano0430e3a2007-05-15 03:13:172297<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592298<div class="paragraph"><p>If the commit is a merge, and if the pretty-format
Junio C Hamano0430e3a2007-05-15 03:13:172299is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
2300inserted before the <em>Author:</em> line. This line begins with
2301"Merge: " and the sha1s of ancestral commits are printed,
2302separated by spaces. Note that the listed commits may not
2303necessarily be the list of the <strong>direct</strong> parent commits if you
2304have limited your view of history: for example, if you are
2305only interested in changes related to a certain directory or
Junio C Hamanoba4b9282008-07-06 05:20:312306file.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592307<div class="paragraph"><p>There are several built-in formats, and you can define
Junio C Hamanoa574a092010-06-13 19:57:102308additional formats by setting a pretty.&lt;name&gt;
2309config option to either another format name, or a
2310<em>format:</em> string, as described below (see
Junio C Hamanoa28a9202012-06-21 07:08:232311<a href="git-config.html">git-config(1)</a>). Here are the details of the
Junio C Hamanoa574a092010-06-13 19:57:102312built-in formats:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592313<div class="ulist"><ul>
Junio C Hamanoa340aaa2006-11-23 02:47:332314<li>
2315<p>
2316<em>oneline</em>
2317</p>
2318<div class="literalblock">
2319<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512320<pre><code>&lt;sha1&gt; &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332321</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592322<div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:332323</li>
2324<li>
2325<p>
2326<em>short</em>
2327</p>
2328<div class="literalblock">
2329<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512330<pre><code>commit &lt;sha1&gt;
2331Author: &lt;author&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332332</div></div>
2333<div class="literalblock">
2334<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512335<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332336</div></div>
2337</li>
2338<li>
2339<p>
2340<em>medium</em>
2341</p>
2342<div class="literalblock">
2343<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512344<pre><code>commit &lt;sha1&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332345Author: &lt;author&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512346Date: &lt;author date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332347</div></div>
2348<div class="literalblock">
2349<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512350<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332351</div></div>
2352<div class="literalblock">
2353<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512354<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332355</div></div>
2356</li>
2357<li>
2358<p>
2359<em>full</em>
2360</p>
2361<div class="literalblock">
2362<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512363<pre><code>commit &lt;sha1&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332364Author: &lt;author&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512365Commit: &lt;committer&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332366</div></div>
2367<div class="literalblock">
2368<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512369<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332370</div></div>
2371<div class="literalblock">
2372<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512373<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332374</div></div>
2375</li>
2376<li>
2377<p>
2378<em>fuller</em>
2379</p>
2380<div class="literalblock">
2381<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512382<pre><code>commit &lt;sha1&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182383Author: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312384AuthorDate: &lt;author date&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182385Commit: &lt;committer&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512386CommitDate: &lt;committer date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332387</div></div>
2388<div class="literalblock">
2389<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512390<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332391</div></div>
2392<div class="literalblock">
2393<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512394<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332395</div></div>
2396</li>
2397<li>
2398<p>
2399<em>email</em>
2400</p>
2401<div class="literalblock">
2402<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512403<pre><code>From &lt;sha1&gt; &lt;date&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332404From: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312405Date: &lt;author date&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512406Subject: [PATCH] &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332407</div></div>
2408<div class="literalblock">
2409<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512410<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332411</div></div>
2412</li>
2413<li>
2414<p>
2415<em>raw</em>
2416</p>
Junio C Hamano68cf15a2010-11-06 01:01:592417<div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
Junio C Hamanoe3f080d2013-04-22 02:27:132418stored in the commit object. Notably, the SHA-1s are
Junio C Hamanoa340aaa2006-11-23 02:47:332419displayed in full, regardless of whether --abbrev or
2420--no-abbrev are used, and <em>parents</em> information show the
Junio C Hamanod75148a2014-04-08 19:48:382421true parent commits, without taking grafts or history
Junio C Hamano85f1fde2015-06-01 20:37:322422simplification into account. Note that this format affects the way
2423commits are displayed, but not the way the diff is shown e.g. with
2424<code>git log --raw</code>. To get full object names in a raw diff format,
2425use <code>--no-abbrev</code>.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:332426</li>
Junio C Hamanoa3fd83c2007-03-02 10:34:362427<li>
2428<p>
Junio C Hamanoe32ec8b2010-06-02 23:32:312429<em>format:&lt;string&gt;</em>
Junio C Hamanoa3fd83c2007-03-02 10:34:362430</p>
Junio C Hamano68cf15a2010-11-06 01:01:592431<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:362432you want to show. It works a little bit like printf format,
2433with the notable exception that you get a newline with <em>%n</em>
Junio C Hamanoba4b9282008-07-06 05:20:312434instead of <em>\n</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592435<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:312436would show something like this:</p></div>
Junio C Hamano0430e3a2007-05-15 03:13:172437<div class="listingblock">
2438<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512439<pre><code>The author of fe6e0ee was Junio C Hamano, 23 hours ago
2440The 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:172441</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592442<div class="paragraph"><p>The placeholders are:</p></div>
2443<div class="ulist"><ul>
Junio C Hamanoa3fd83c2007-03-02 10:34:362444<li>
2445<p>
Junio C Hamano11f15372019-03-07 03:17:002446Placeholders that expand to a single literal character:
2447</p>
2448<div class="dlist"><dl>
2449<dt class="hdlist1">
2450<em>%n</em>
2451</dt>
2452<dd>
2453<p>
2454newline
2455</p>
2456</dd>
2457<dt class="hdlist1">
2458<em>%%</em>
2459</dt>
2460<dd>
2461<p>
2462a raw <em>%</em>
2463</p>
2464</dd>
2465<dt class="hdlist1">
2466<em>%x00</em>
2467</dt>
2468<dd>
2469<p>
2470print a byte from a hex code
2471</p>
2472</dd>
2473</dl></div>
2474</li>
2475<li>
2476<p>
2477Placeholders that affect formatting of later placeholders:
2478</p>
2479<div class="dlist"><dl>
2480<dt class="hdlist1">
2481<em>%Cred</em>
2482</dt>
2483<dd>
2484<p>
2485switch color to red
2486</p>
2487</dd>
2488<dt class="hdlist1">
2489<em>%Cgreen</em>
2490</dt>
2491<dd>
2492<p>
2493switch color to green
2494</p>
2495</dd>
2496<dt class="hdlist1">
2497<em>%Cblue</em>
2498</dt>
2499<dd>
2500<p>
2501switch color to blue
2502</p>
2503</dd>
2504<dt class="hdlist1">
2505<em>%Creset</em>
2506</dt>
2507<dd>
2508<p>
2509reset color
2510</p>
2511</dd>
2512<dt class="hdlist1">
2513<em>%C(&#8230;)</em>
2514</dt>
2515<dd>
2516<p>
2517color specification, as described under Values in the
2518 "CONFIGURATION FILE" section of <a href="git-config.html">git-config(1)</a>. By
2519 default, colors are shown only when enabled for log output
2520 (by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and respecting
2521 the <code>auto</code> settings of the former if we are going to a
2522 terminal). <code>%C(auto,...)</code> is accepted as a historical
2523 synonym for the default (e.g., <code>%C(auto,red)</code>). Specifying
2524 <code>%C(always,...)</code> will show the colors even when color is
2525 not otherwise enabled (though consider just using
2526 <code>--color=always</code> to enable color for the whole output,
2527 including this format and anything else git might color).
2528 <code>auto</code> alone (i.e. <code>%C(auto)</code>) will turn on auto coloring
2529 on the next placeholders until the color is switched
2530 again.
2531</p>
2532</dd>
2533<dt class="hdlist1">
2534<em>%m</em>
2535</dt>
2536<dd>
2537<p>
2538left (<code>&lt;</code>), right (<code>&gt;</code>) or boundary (<code>-</code>) mark
2539</p>
2540</dd>
2541<dt class="hdlist1">
2542<em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>
2543</dt>
2544<dd>
2545<p>
2546switch line wrapping, like the -w option of
2547 <a href="git-shortlog.html">git-shortlog(1)</a>.
2548</p>
2549</dd>
2550<dt class="hdlist1">
2551<em>%&lt;(&lt;N&gt;[,trunc|ltrunc|mtrunc])</em>
2552</dt>
2553<dd>
2554<p>
2555make the next placeholder take at
2556 least N columns, padding spaces on
2557 the right if necessary. Optionally
2558 truncate at the beginning (ltrunc),
2559 the middle (mtrunc) or the end
2560 (trunc) if the output is longer than
2561 N columns. Note that truncating
2562 only works correctly with N &gt;= 2.
2563</p>
2564</dd>
2565<dt class="hdlist1">
2566<em>%&lt;|(&lt;N&gt;)</em>
2567</dt>
2568<dd>
2569<p>
2570make the next placeholder take at least until Nth
2571 columns, padding spaces on the right if necessary
2572</p>
2573</dd>
2574<dt class="hdlist1">
2575<em>%&gt;(&lt;N&gt;)</em>, <em>%&gt;|(&lt;N&gt;)</em>
2576</dt>
2577<dd>
2578<p>
2579similar to <em>%&lt;(&lt;N&gt;)</em>, <em>%&lt;|(&lt;N&gt;)</em> respectively,
2580 but padding spaces on the left
2581</p>
2582</dd>
2583<dt class="hdlist1">
2584<em>%&gt;&gt;(&lt;N&gt;)</em>, <em>%&gt;&gt;|(&lt;N&gt;)</em>
2585</dt>
2586<dd>
2587<p>
2588similar to <em>%&gt;(&lt;N&gt;)</em>, <em>%&gt;|(&lt;N&gt;)</em>
2589 respectively, except that if the next
2590 placeholder takes more spaces than given and
2591 there are spaces on its left, use those
2592 spaces
2593</p>
2594</dd>
2595<dt class="hdlist1">
2596<em>%&gt;&lt;(&lt;N&gt;)</em>, <em>%&gt;&lt;|(&lt;N&gt;)</em>
2597</dt>
2598<dd>
2599<p>
2600similar to <em>%&lt;(&lt;N&gt;)</em>, <em>%&lt;|(&lt;N&gt;)</em>
2601 respectively, but padding both sides
2602 (i.e. the text is centered)
2603</p>
2604</dd>
2605</dl></div>
2606</li>
2607<li>
2608<p>
2609Placeholders that expand to information extracted from the commit:
2610</p>
2611<div class="dlist"><dl>
2612<dt class="hdlist1">
2613<em>%H</em>
2614</dt>
2615<dd>
2616<p>
2617commit hash
2618</p>
2619</dd>
2620<dt class="hdlist1">
2621<em>%h</em>
2622</dt>
2623<dd>
2624<p>
2625abbreviated commit hash
2626</p>
2627</dd>
2628<dt class="hdlist1">
2629<em>%T</em>
2630</dt>
2631<dd>
2632<p>
2633tree hash
2634</p>
2635</dd>
2636<dt class="hdlist1">
2637<em>%t</em>
2638</dt>
2639<dd>
2640<p>
2641abbreviated tree hash
2642</p>
2643</dd>
2644<dt class="hdlist1">
2645<em>%P</em>
2646</dt>
2647<dd>
2648<p>
2649parent hashes
2650</p>
2651</dd>
2652<dt class="hdlist1">
2653<em>%p</em>
2654</dt>
2655<dd>
2656<p>
2657abbreviated parent hashes
2658</p>
2659</dd>
2660<dt class="hdlist1">
2661<em>%an</em>
2662</dt>
2663<dd>
2664<p>
2665author name
2666</p>
2667</dd>
2668<dt class="hdlist1">
2669<em>%aN</em>
2670</dt>
2671<dd>
2672<p>
2673author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2674 or <a href="git-blame.html">git-blame(1)</a>)
2675</p>
2676</dd>
2677<dt class="hdlist1">
2678<em>%ae</em>
2679</dt>
2680<dd>
2681<p>
2682author email
2683</p>
2684</dd>
2685<dt class="hdlist1">
2686<em>%aE</em>
2687</dt>
2688<dd>
2689<p>
2690author email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2691 or <a href="git-blame.html">git-blame(1)</a>)
2692</p>
2693</dd>
2694<dt class="hdlist1">
Junio C Hamano8ac8a3d2019-11-11 04:33:462695<em>%al</em>
2696</dt>
2697<dd>
2698<p>
2699author email local-part (the part before the <em>@</em> sign)
2700</p>
2701</dd>
2702<dt class="hdlist1">
2703<em>%aL</em>
2704</dt>
2705<dd>
2706<p>
2707author local-part (see <em>%al</em>) respecting .mailmap, see
2708 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2709</p>
2710</dd>
2711<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:002712<em>%ad</em>
2713</dt>
2714<dd>
2715<p>
2716author date (format respects --date= option)
2717</p>
2718</dd>
2719<dt class="hdlist1">
2720<em>%aD</em>
2721</dt>
2722<dd>
2723<p>
2724author date, RFC2822 style
2725</p>
2726</dd>
2727<dt class="hdlist1">
2728<em>%ar</em>
2729</dt>
2730<dd>
2731<p>
2732author date, relative
2733</p>
2734</dd>
2735<dt class="hdlist1">
2736<em>%at</em>
2737</dt>
2738<dd>
2739<p>
2740author date, UNIX timestamp
2741</p>
2742</dd>
2743<dt class="hdlist1">
2744<em>%ai</em>
2745</dt>
2746<dd>
2747<p>
2748author date, ISO 8601-like format
2749</p>
2750</dd>
2751<dt class="hdlist1">
2752<em>%aI</em>
2753</dt>
2754<dd>
2755<p>
2756author date, strict ISO 8601 format
2757</p>
2758</dd>
2759<dt class="hdlist1">
2760<em>%cn</em>
2761</dt>
2762<dd>
2763<p>
2764committer name
2765</p>
2766</dd>
2767<dt class="hdlist1">
2768<em>%cN</em>
2769</dt>
2770<dd>
2771<p>
2772committer name (respecting .mailmap, see
2773 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2774</p>
2775</dd>
2776<dt class="hdlist1">
2777<em>%ce</em>
2778</dt>
2779<dd>
2780<p>
2781committer email
2782</p>
2783</dd>
2784<dt class="hdlist1">
2785<em>%cE</em>
2786</dt>
2787<dd>
2788<p>
2789committer email (respecting .mailmap, see
2790 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2791</p>
2792</dd>
2793<dt class="hdlist1">
Junio C Hamano8ac8a3d2019-11-11 04:33:462794<em>%cl</em>
2795</dt>
2796<dd>
2797<p>
2798author email local-part (the part before the <em>@</em> sign)
2799</p>
2800</dd>
2801<dt class="hdlist1">
2802<em>%cL</em>
2803</dt>
2804<dd>
2805<p>
2806author local-part (see <em>%cl</em>) respecting .mailmap, see
2807 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2808</p>
2809</dd>
2810<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:002811<em>%cd</em>
2812</dt>
2813<dd>
2814<p>
2815committer date (format respects --date= option)
2816</p>
2817</dd>
2818<dt class="hdlist1">
2819<em>%cD</em>
2820</dt>
2821<dd>
2822<p>
2823committer date, RFC2822 style
2824</p>
2825</dd>
2826<dt class="hdlist1">
2827<em>%cr</em>
2828</dt>
2829<dd>
2830<p>
2831committer date, relative
2832</p>
2833</dd>
2834<dt class="hdlist1">
2835<em>%ct</em>
2836</dt>
2837<dd>
2838<p>
2839committer date, UNIX timestamp
2840</p>
2841</dd>
2842<dt class="hdlist1">
2843<em>%ci</em>
2844</dt>
2845<dd>
2846<p>
2847committer date, ISO 8601-like format
2848</p>
2849</dd>
2850<dt class="hdlist1">
2851<em>%cI</em>
2852</dt>
2853<dd>
2854<p>
2855committer date, strict ISO 8601 format
2856</p>
2857</dd>
2858<dt class="hdlist1">
2859<em>%d</em>
2860</dt>
2861<dd>
2862<p>
2863ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
2864</p>
2865</dd>
2866<dt class="hdlist1">
2867<em>%D</em>
2868</dt>
2869<dd>
2870<p>
2871ref names without the " (", ")" wrapping.
2872</p>
2873</dd>
2874<dt class="hdlist1">
2875<em>%S</em>
2876</dt>
2877<dd>
2878<p>
2879ref name given on the command line by which the commit was reached
2880 (like <code>git log --source</code>), only works with <code>git log</code>
2881</p>
2882</dd>
2883<dt class="hdlist1">
2884<em>%e</em>
2885</dt>
2886<dd>
2887<p>
2888encoding
2889</p>
2890</dd>
2891<dt class="hdlist1">
2892<em>%s</em>
2893</dt>
2894<dd>
2895<p>
2896subject
2897</p>
2898</dd>
2899<dt class="hdlist1">
2900<em>%f</em>
2901</dt>
2902<dd>
2903<p>
2904sanitized subject line, suitable for a filename
2905</p>
2906</dd>
2907<dt class="hdlist1">
2908<em>%b</em>
2909</dt>
2910<dd>
2911<p>
2912body
2913</p>
2914</dd>
2915<dt class="hdlist1">
2916<em>%B</em>
2917</dt>
2918<dd>
2919<p>
2920raw body (unwrapped subject and body)
2921</p>
2922</dd>
2923<dt class="hdlist1">
2924<em>%N</em>
2925</dt>
2926<dd>
2927<p>
2928commit notes
2929</p>
2930</dd>
2931<dt class="hdlist1">
2932<em>%GG</em>
2933</dt>
2934<dd>
2935<p>
2936raw verification message from GPG for a signed commit
2937</p>
2938</dd>
2939<dt class="hdlist1">
2940<em>%G?</em>
2941</dt>
2942<dd>
2943<p>
2944show "G" for a good (valid) signature,
2945 "B" for a bad signature,
2946 "U" for a good signature with unknown validity,
2947 "X" for a good signature that has expired,
2948 "Y" for a good signature made by an expired key,
2949 "R" for a good signature made by a revoked key,
2950 "E" if the signature cannot be checked (e.g. missing key)
2951 and "N" for no signature
2952</p>
2953</dd>
2954<dt class="hdlist1">
2955<em>%GS</em>
2956</dt>
2957<dd>
2958<p>
2959show the name of the signer for a signed commit
2960</p>
2961</dd>
2962<dt class="hdlist1">
2963<em>%GK</em>
2964</dt>
2965<dd>
2966<p>
2967show the key used to sign a signed commit
2968</p>
2969</dd>
2970<dt class="hdlist1">
2971<em>%GF</em>
2972</dt>
2973<dd>
2974<p>
2975show the fingerprint of the key used to sign a signed commit
2976</p>
2977</dd>
2978<dt class="hdlist1">
2979<em>%GP</em>
2980</dt>
2981<dd>
2982<p>
2983show the fingerprint of the primary key whose subkey was used
2984 to sign a signed commit
2985</p>
2986</dd>
2987<dt class="hdlist1">
2988<em>%gD</em>
2989</dt>
2990<dd>
2991<p>
2992reflog selector, e.g., <code>refs/stash@{1}</code> or <code>refs/stash@{2
Junio C Hamano48cd3f12019-10-09 05:55:302993 minutes ago}</code>; the format follows the rules described for the
Junio C Hamano11f15372019-03-07 03:17:002994 <code>-g</code> option. The portion before the <code>@</code> is the refname as
2995 given on the command line (so <code>git log -g refs/heads/master</code>
2996 would yield <code>refs/heads/master@{0}</code>).
2997</p>
2998</dd>
2999<dt class="hdlist1">
3000<em>%gd</em>
3001</dt>
3002<dd>
3003<p>
3004shortened reflog selector; same as <code>%gD</code>, but the refname
3005 portion is shortened for human readability (so
3006 <code>refs/heads/master</code> becomes just <code>master</code>).
3007</p>
3008</dd>
3009<dt class="hdlist1">
3010<em>%gn</em>
3011</dt>
3012<dd>
3013<p>
3014reflog identity name
3015</p>
3016</dd>
3017<dt class="hdlist1">
3018<em>%gN</em>
3019</dt>
3020<dd>
3021<p>
3022reflog identity name (respecting .mailmap, see
3023 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
3024</p>
3025</dd>
3026<dt class="hdlist1">
3027<em>%ge</em>
3028</dt>
3029<dd>
3030<p>
3031reflog identity email
3032</p>
3033</dd>
3034<dt class="hdlist1">
3035<em>%gE</em>
3036</dt>
3037<dd>
3038<p>
3039reflog identity email (respecting .mailmap, see
3040 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
3041</p>
3042</dd>
3043<dt class="hdlist1">
3044<em>%gs</em>
3045</dt>
3046<dd>
3047<p>
3048reflog subject
3049</p>
3050</dd>
3051<dt class="hdlist1">
3052<em>%(trailers[:options])</em>
3053</dt>
3054<dd>
3055<p>
3056display the trailers of the body as
3057 interpreted by
3058 <a href="git-interpret-trailers.html">git-interpret-trailers(1)</a>. The
3059 <code>trailers</code> string may be followed by a colon
3060 and zero or more comma-separated options:
3061</p>
3062<div class="ulist"><ul>
3063<li>
3064<p>
3065<em>key=&lt;K&gt;</em>: only show trailers with specified key. Matching is done
3066 case-insensitively and trailing colon is optional. If option is
3067 given multiple times trailer lines matching any of the keys are
3068 shown. This option automatically enables the <code>only</code> option so that
3069 non-trailer lines in the trailer block are hidden. If that is not
3070 desired it can be disabled with <code>only=false</code>. E.g.,
3071 <code>%(trailers:key=Reviewed-by)</code> shows trailer lines with key
3072 <code>Reviewed-by</code>.
Junio C Hamanoa3fd83c2007-03-02 10:34:363073</p>
3074</li>
3075<li>
3076<p>
Junio C Hamano11f15372019-03-07 03:17:003077<em>only[=val]</em>: select whether non-trailer lines from the trailer
3078 block should be included. The <code>only</code> keyword may optionally be
3079 followed by an equal sign and one of <code>true</code>, <code>on</code>, <code>yes</code> to omit or
3080 <code>false</code>, <code>off</code>, <code>no</code> to show the non-trailer lines. If option is
3081 given without value it is enabled. If given multiple times the last
3082 value is used.
Junio C Hamanoa3fd83c2007-03-02 10:34:363083</p>
3084</li>
3085<li>
3086<p>
Junio C Hamano11f15372019-03-07 03:17:003087<em>separator=&lt;SEP&gt;</em>: specify a separator inserted between trailer
3088 lines. When this option is not given each trailer line is
3089 terminated with a line feed character. The string SEP may contain
3090 the literal formatting codes described above. To use comma as
3091 separator one must use <code>%x2C</code> as it would otherwise be parsed as
3092 next option. If separator option is given multiple times only the
3093 last one is used. E.g., <code>%(trailers:key=Ticket,separator=%x2C )</code>
3094 shows all trailer lines whose key is "Ticket" separated by a comma
3095 and a space.
Junio C Hamanoa3fd83c2007-03-02 10:34:363096</p>
3097</li>
3098<li>
3099<p>
Junio C Hamano11f15372019-03-07 03:17:003100<em>unfold[=val]</em>: make it behave as if interpret-trailer&#8217;s <code>--unfold</code>
3101 option was given. In same way as to for <code>only</code> it can be followed
3102 by an equal sign and explicit value. E.g.,
3103 <code>%(trailers:only,unfold=true)</code> unfolds and shows all trailer lines.
Junio C Hamanoa3fd83c2007-03-02 10:34:363104</p>
3105</li>
3106<li>
3107<p>
Junio C Hamano11f15372019-03-07 03:17:003108<em>valueonly[=val]</em>: skip over the key part of the trailer line and only
3109 show the value part. Also this optionally allows explicit value.
Junio C Hamanoa3fd83c2007-03-02 10:34:363110</p>
3111</li>
Junio C Hamano11f15372019-03-07 03:17:003112</ul></div>
3113</dd>
3114</dl></div>
Junio C Hamano04e768d2013-04-23 19:19:263115</li>
Junio C Hamanoba4b9282008-07-06 05:20:313116</ul></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:363117</li>
Junio C Hamanoc21ab052009-10-31 04:03:553118</ul></div>
3119<div class="admonitionblock">
3120<table><tr>
3121<td class="icon">
3122<div class="title">Note</div>
3123</td>
3124<td class="content">Some placeholders may depend on other options given to the
Junio C Hamanoac12f0e2014-09-19 22:32:513125revision traversal engine. For example, the <code>%g*</code> reflog options will
Junio C Hamanoc21ab052009-10-31 04:03:553126insert an empty string unless we are traversing reflog entries (e.g., by
Junio C Hamano00b9f1a2014-09-29 23:11:283127<code>git log -g</code>). The <code>%d</code> and <code>%D</code> placeholders will use the "short"
3128decoration format if <code>--decorate</code> was not already provided on the command
3129line.</td>
Junio C Hamanoc21ab052009-10-31 04:03:553130</tr></table>
3131</div>
Junio C Hamanoac12f0e2014-09-19 22:32:513132<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:593133is inserted immediately before the expansion if and only if the
3134placeholder expands to a non-empty string.</p></div>
Junio C Hamano535c65c2017-06-24 22:51:583135<div class="paragraph"><p>If you add a <code>-</code> (minus sign) after <em>%</em> of a placeholder, all consecutive
3136line-feeds immediately preceding the expansion are deleted if and only if the
Junio C Hamano2bd8a742009-12-01 21:16:593137placeholder expands to an empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593138<div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
Junio C Hamano89a57342010-06-22 23:22:553139is inserted immediately before the expansion if and only if the
3140placeholder expands to a non-empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593141<div class="ulist"><ul>
Junio C Hamano6fb124c2008-06-13 10:04:013142<li>
3143<p>
3144<em>tformat:</em>
3145</p>
Junio C Hamano68cf15a2010-11-06 01:01:593146<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:013147provides "terminator" semantics instead of "separator" semantics. In
3148other words, each commit has the message terminator character (usually a
3149newline) appended, rather than a separator placed between entries.
3150This means that the final entry of a single-line format will be properly
3151terminated with a new line, just as the "oneline" format does.
Junio C Hamanoba4b9282008-07-06 05:20:313152For example:</p></div>
Junio C Hamano6fb124c2008-06-13 10:04:013153<div class="listingblock">
3154<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513155<pre><code>$ git log -2 --pretty=format:%h 4da45bef \
Junio C Hamano6fb124c2008-06-13 10:04:013156 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
31574da45be
31587134973 -- NO NEWLINE
3159
3160$ git log -2 --pretty=tformat:%h 4da45bef \
3161 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
31624da45be
Junio C Hamanoac12f0e2014-09-19 22:32:5131637134973</code></pre>
Junio C Hamano6fb124c2008-06-13 10:04:013164</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513165<div class="paragraph"><p>In addition, any unrecognized string that has a <code>%</code> in it is interpreted
3166as if it has <code>tformat:</code> in front of it. For example, these two are
Junio C Hamano0a235222009-03-06 08:21:093167equivalent:</p></div>
3168<div class="listingblock">
3169<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513170<pre><code>$ git log -2 --pretty=tformat:%h 4da45bef
3171$ git log -2 --pretty=%h 4da45bef</code></pre>
Junio C Hamano0a235222009-03-06 08:21:093172</div></div>
Junio C Hamano6fb124c2008-06-13 10:04:013173</li>
Junio C Hamanoba4b9282008-07-06 05:20:313174</ul></div>
Junio C Hamano1a4e8412005-12-27 08:17:233175</div>
Junio C Hamano9629d4f2012-12-19 00:28:273176</div>
3177<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:593178<h2 id="_common_diff_options">COMMON DIFF OPTIONS</h2>
Junio C Hamanod2c978f2011-03-20 19:42:223179<div class="sectionbody">
3180<div class="dlist"><dl>
3181<dt class="hdlist1">
3182-p
3183</dt>
3184<dt class="hdlist1">
3185-u
3186</dt>
3187<dt class="hdlist1">
3188--patch
3189</dt>
3190<dd>
3191<p>
3192 Generate patch (see section on generating patches).
Junio C Hamanod2c978f2011-03-20 19:42:223193</p>
3194</dd>
3195<dt class="hdlist1">
Junio C Hamano58f587a2013-07-22 19:20:593196-s
3197</dt>
3198<dt class="hdlist1">
3199--no-patch
3200</dt>
3201<dd>
3202<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513203 Suppress diff output. Useful for commands like <code>git show</code> that
3204 show the patch by default, or to cancel the effect of <code>--patch</code>.
Junio C Hamano58f587a2013-07-22 19:20:593205</p>
3206</dd>
3207<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223208-U&lt;n&gt;
3209</dt>
3210<dt class="hdlist1">
3211--unified=&lt;n&gt;
3212</dt>
3213<dd>
3214<p>
3215 Generate diffs with &lt;n&gt; lines of context instead of
Junio C Hamano11f15372019-03-07 03:17:003216 the usual three. Implies <code>--patch</code>.
Junio C Hamanoac12f0e2014-09-19 22:32:513217 Implies <code>-p</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223218</p>
3219</dd>
3220<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:003221--output=&lt;file&gt;
3222</dt>
3223<dd>
3224<p>
3225 Output to a specific file instead of stdout.
3226</p>
3227</dd>
3228<dt class="hdlist1">
3229--output-indicator-new=&lt;char&gt;
3230</dt>
3231<dt class="hdlist1">
3232--output-indicator-old=&lt;char&gt;
3233</dt>
3234<dt class="hdlist1">
3235--output-indicator-context=&lt;char&gt;
3236</dt>
3237<dd>
3238<p>
3239 Specify the character used to indicate new, old or context
3240 lines in the generated patch. Normally they are <em>+</em>, <em>-</em> and
3241 ' ' respectively.
3242</p>
3243</dd>
3244<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223245--raw
3246</dt>
3247<dd>
3248<p>
Junio C Hamano85f1fde2015-06-01 20:37:323249 For each commit, show a summary of changes using the raw diff
3250 format. See the "RAW OUTPUT FORMAT" section of
3251 <a href="git-diff.html">git-diff(1)</a>. This is different from showing the log
3252 itself in raw format, which you can achieve with
3253 <code>--format=raw</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223254</p>
3255</dd>
3256<dt class="hdlist1">
3257--patch-with-raw
3258</dt>
3259<dd>
3260<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513261 Synonym for <code>-p --raw</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223262</p>
3263</dd>
3264<dt class="hdlist1">
Junio C Hamanoad70bf02016-09-26 23:44:273265--indent-heuristic
3266</dt>
Junio C Hamanoa65b6762017-11-06 04:45:423267<dd>
3268<p>
Junio C Hamano14e66832018-06-18 18:32:193269 Enable the heuristic that shifts diff hunk boundaries to make patches
Junio C Hamanoa65b6762017-11-06 04:45:423270 easier to read. This is the default.
3271</p>
3272</dd>
Junio C Hamanoad70bf02016-09-26 23:44:273273<dt class="hdlist1">
3274--no-indent-heuristic
3275</dt>
Junio C Hamano5f888332016-06-13 19:28:313276<dd>
3277<p>
Junio C Hamanoa65b6762017-11-06 04:45:423278 Disable the indent heuristic.
Junio C Hamano5f888332016-06-13 19:28:313279</p>
3280</dd>
3281<dt class="hdlist1">
Junio C Hamano5a73f302011-10-14 05:58:343282--minimal
3283</dt>
3284<dd>
3285<p>
3286 Spend extra time to make sure the smallest possible
3287 diff is produced.
3288</p>
3289</dd>
3290<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223291--patience
3292</dt>
3293<dd>
3294<p>
3295 Generate a diff using the "patience diff" algorithm.
3296</p>
3297</dd>
3298<dt class="hdlist1">
Junio C Hamanoaea9e6b2012-03-07 00:17:113299--histogram
3300</dt>
3301<dd>
3302<p>
3303 Generate a diff using the "histogram diff" algorithm.
3304</p>
3305</dd>
3306<dt class="hdlist1">
Junio C Hamano047135e2017-12-19 21:57:543307--anchored=&lt;text&gt;
3308</dt>
3309<dd>
3310<p>
3311 Generate a diff using the "anchored diff" algorithm.
3312</p>
3313<div class="paragraph"><p>This option may be specified more than once.</p></div>
3314<div class="paragraph"><p>If a line exists in both the source and destination, exists only once,
3315and starts with this text, this algorithm attempts to prevent it from
3316appearing as a deletion or addition in the output. It uses the "patience
3317diff" algorithm internally.</p></div>
3318</dd>
3319<dt class="hdlist1">
Junio C Hamano80ad00d2013-02-18 00:19:033320--diff-algorithm={patience|minimal|histogram|myers}
3321</dt>
3322<dd>
3323<p>
3324 Choose a diff algorithm. The variants are as follows:
3325</p>
3326<div class="openblock">
3327<div class="content">
3328<div class="dlist"><dl>
3329<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513330<code>default</code>, <code>myers</code>
Junio C Hamano80ad00d2013-02-18 00:19:033331</dt>
3332<dd>
3333<p>
3334 The basic greedy diff algorithm. Currently, this is the default.
3335</p>
3336</dd>
3337<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513338<code>minimal</code>
Junio C Hamano80ad00d2013-02-18 00:19:033339</dt>
3340<dd>
3341<p>
3342 Spend extra time to make sure the smallest possible diff is
3343 produced.
3344</p>
3345</dd>
3346<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513347<code>patience</code>
Junio C Hamano80ad00d2013-02-18 00:19:033348</dt>
3349<dd>
3350<p>
3351 Use "patience diff" algorithm when generating patches.
3352</p>
3353</dd>
3354<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513355<code>histogram</code>
Junio C Hamano80ad00d2013-02-18 00:19:033356</dt>
3357<dd>
3358<p>
3359 This algorithm extends the patience algorithm to "support
3360 low-occurrence common elements".
3361</p>
3362</dd>
3363</dl></div>
3364</div></div>
Junio C Hamano14e66832018-06-18 18:32:193365<div class="paragraph"><p>For instance, if you configured the <code>diff.algorithm</code> variable to a
Junio C Hamano80ad00d2013-02-18 00:19:033366non-default value and want to use the default one, then you
Junio C Hamanoac12f0e2014-09-19 22:32:513367have to use <code>--diff-algorithm=default</code> option.</p></div>
Junio C Hamano80ad00d2013-02-18 00:19:033368</dd>
3369<dt class="hdlist1">
Junio C Hamano4c4b0122011-06-30 01:19:323370--stat[=&lt;width&gt;[,&lt;name-width&gt;[,&lt;count&gt;]]]
Junio C Hamanod2c978f2011-03-20 19:42:223371</dt>
3372<dd>
3373<p>
Junio C Hamanoaea9e6b2012-03-07 00:17:113374 Generate a diffstat. By default, as much space as necessary
3375 will be used for the filename part, and the rest for the graph
3376 part. Maximum width defaults to terminal width, or 80 columns
Junio C Hamano7f2b3cb2012-06-22 22:42:393377 if not connected to a terminal, and can be overridden by
Junio C Hamanoac12f0e2014-09-19 22:32:513378 <code>&lt;width&gt;</code>. The width of the filename part can be limited by
3379 giving another width <code>&lt;name-width&gt;</code> after a comma. The width
Junio C Hamanoaea9e6b2012-03-07 00:17:113380 of the graph part can be limited by using
Junio C Hamanoac12f0e2014-09-19 22:32:513381 <code>--stat-graph-width=&lt;width&gt;</code> (affects all commands generating
3382 a stat graph) or by setting <code>diff.statGraphWidth=&lt;width&gt;</code>
3383 (does not affect <code>git format-patch</code>).
3384 By giving a third parameter <code>&lt;count&gt;</code>, you can limit the
3385 output to the first <code>&lt;count&gt;</code> lines, followed by <code>...</code> if
Junio C Hamanoaea9e6b2012-03-07 00:17:113386 there are more.
Junio C Hamanod2c978f2011-03-20 19:42:223387</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513388<div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=&lt;width&gt;</code>,
3389<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:223390</dd>
3391<dt class="hdlist1">
Junio C Hamano45badf02018-03-14 21:56:413392--compact-summary
3393</dt>
3394<dd>
3395<p>
3396 Output a condensed summary of extended header information such
3397 as file creations or deletions ("new" or "gone", optionally "+l"
3398 if it&#8217;s a symlink) and mode changes ("+x" or "-x" for adding
3399 or removing executable bit respectively) in diffstat. The
Junio C Hamanofa2915c2018-06-19 19:50:183400 information is put between the filename part and the graph
Junio C Hamano45badf02018-03-14 21:56:413401 part. Implies <code>--stat</code>.
3402</p>
3403</dd>
3404<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223405--numstat
3406</dt>
3407<dd>
3408<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513409 Similar to <code>--stat</code>, but shows number of added and
Junio C Hamanod2c978f2011-03-20 19:42:223410 deleted lines in decimal notation and pathname without
3411 abbreviation, to make it more machine friendly. For
Junio C Hamanoac12f0e2014-09-19 22:32:513412 binary files, outputs two <code>-</code> instead of saying
3413 <code>0 0</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223414</p>
3415</dd>
3416<dt class="hdlist1">
3417--shortstat
3418</dt>
3419<dd>
3420<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513421 Output only the last line of the <code>--stat</code> format containing total
Junio C Hamanod2c978f2011-03-20 19:42:223422 number of modified files, as well as number of added and deleted
3423 lines.
3424</p>
3425</dd>
3426<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:003427-X[&lt;param1,param2,&#8230;&gt;]
3428</dt>
3429<dt class="hdlist1">
Junio C Hamano1c222c52011-05-13 19:55:323430--dirstat[=&lt;param1,param2,&#8230;&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:223431</dt>
3432<dd>
3433<p>
Junio C Hamano1c222c52011-05-13 19:55:323434 Output the distribution of relative amount of changes for each
Junio C Hamanoac12f0e2014-09-19 22:32:513435 sub-directory. The behavior of <code>--dirstat</code> can be customized by
Junio C Hamano1c222c52011-05-13 19:55:323436 passing it a comma separated list of parameters.
Junio C Hamanoac12f0e2014-09-19 22:32:513437 The defaults are controlled by the <code>diff.dirstat</code> configuration
Junio C Hamanoa28a9202012-06-21 07:08:233438 variable (see <a href="git-config.html">git-config(1)</a>).
Junio C Hamano1c222c52011-05-13 19:55:323439 The following parameters are available:
Junio C Hamanod2c978f2011-03-20 19:42:223440</p>
Junio C Hamano9629d4f2012-12-19 00:28:273441<div class="openblock">
3442<div class="content">
Junio C Hamano1c222c52011-05-13 19:55:323443<div class="dlist"><dl>
3444<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513445<code>changes</code>
Junio C Hamano1c222c52011-05-13 19:55:323446</dt>
3447<dd>
3448<p>
3449 Compute the dirstat numbers by counting the lines that have been
3450 removed from the source, or added to the destination. This ignores
3451 the amount of pure code movements within a file. In other words,
3452 rearranging lines in a file is not counted as much as other changes.
3453 This is the default behavior when no parameter is given.
3454</p>
Junio C Hamanod2c978f2011-03-20 19:42:223455</dd>
3456<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513457<code>lines</code>
Junio C Hamanod2c978f2011-03-20 19:42:223458</dt>
3459<dd>
3460<p>
Junio C Hamano1c222c52011-05-13 19:55:323461 Compute the dirstat numbers by doing the regular line-based diff
3462 analysis, and summing the removed/added line counts. (For binary
3463 files, count 64-byte chunks instead, since binary files have no
Junio C Hamanoac12f0e2014-09-19 22:32:513464 natural concept of lines). This is a more expensive <code>--dirstat</code>
3465 behavior than the <code>changes</code> behavior, but it does count rearranged
Junio C Hamano1c222c52011-05-13 19:55:323466 lines within a file as much as other changes. The resulting output
Junio C Hamanoac12f0e2014-09-19 22:32:513467 is consistent with what you get from the other <code>--*stat</code> options.
Junio C Hamanod2c978f2011-03-20 19:42:223468</p>
3469</dd>
3470<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513471<code>files</code>
Junio C Hamano1c222c52011-05-13 19:55:323472</dt>
3473<dd>
3474<p>
3475 Compute the dirstat numbers by counting the number of files changed.
3476 Each changed file counts equally in the dirstat analysis. This is
Junio C Hamanoac12f0e2014-09-19 22:32:513477 the computationally cheapest <code>--dirstat</code> behavior, since it does
Junio C Hamano1c222c52011-05-13 19:55:323478 not have to look at the file contents at all.
3479</p>
3480</dd>
3481<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513482<code>cumulative</code>
Junio C Hamano1c222c52011-05-13 19:55:323483</dt>
3484<dd>
3485<p>
3486 Count changes in a child directory for the parent directory as well.
Junio C Hamanoac12f0e2014-09-19 22:32:513487 Note that when using <code>cumulative</code>, the sum of the percentages
Junio C Hamano1c222c52011-05-13 19:55:323488 reported may exceed 100%. The default (non-cumulative) behavior can
Junio C Hamanoac12f0e2014-09-19 22:32:513489 be specified with the <code>noncumulative</code> parameter.
Junio C Hamano1c222c52011-05-13 19:55:323490</p>
3491</dd>
3492<dt class="hdlist1">
3493&lt;limit&gt;
3494</dt>
3495<dd>
3496<p>
3497 An integer parameter specifies a cut-off percent (3% by default).
3498 Directories contributing less than this percentage of the changes
3499 are not shown in the output.
3500</p>
3501</dd>
3502</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:273503</div></div>
Junio C Hamano1c222c52011-05-13 19:55:323504<div class="paragraph"><p>Example: The following will count changed files, while ignoring
3505directories with less than 10% of the total amount of changed files,
3506and accumulating child directory counts in the parent directories:
Junio C Hamanoac12f0e2014-09-19 22:32:513507<code>--dirstat=files,10,cumulative</code>.</p></div>
Junio C Hamano1c222c52011-05-13 19:55:323508</dd>
3509<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:003510--cumulative
3511</dt>
3512<dd>
3513<p>
3514 Synonym for --dirstat=cumulative
3515</p>
3516</dd>
3517<dt class="hdlist1">
3518--dirstat-by-file[=&lt;param1,param2&gt;&#8230;]
3519</dt>
3520<dd>
3521<p>
3522 Synonym for --dirstat=files,param1,param2&#8230;
3523</p>
3524</dd>
3525<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223526--summary
3527</dt>
3528<dd>
3529<p>
3530 Output a condensed summary of extended header information
3531 such as creations, renames and mode changes.
3532</p>
3533</dd>
3534<dt class="hdlist1">
3535--patch-with-stat
3536</dt>
3537<dd>
3538<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513539 Synonym for <code>-p --stat</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223540</p>
3541</dd>
3542<dt class="hdlist1">
3543-z
3544</dt>
3545<dd>
3546<p>
3547 Separate the commits with NULs instead of with new newlines.
3548</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513549<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:223550pathnames and use NULs as output field terminators.</p></div>
Junio C Hamano0f6f3bf2017-03-13 07:01:533551<div class="paragraph"><p>Without this option, pathnames with "unusual" characters are quoted as
3552explained for the configuration variable <code>core.quotePath</code> (see
3553<a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223554</dd>
3555<dt class="hdlist1">
3556--name-only
3557</dt>
3558<dd>
3559<p>
3560 Show only names of changed files.
3561</p>
3562</dd>
3563<dt class="hdlist1">
3564--name-status
3565</dt>
3566<dd>
3567<p>
3568 Show only names and status of changed files. See the description
Junio C Hamanoac12f0e2014-09-19 22:32:513569 of the <code>--diff-filter</code> option on what the status letters mean.
Junio C Hamanod2c978f2011-03-20 19:42:223570</p>
3571</dd>
3572<dt class="hdlist1">
3573--submodule[=&lt;format&gt;]
3574</dt>
3575<dd>
3576<p>
Junio C Hamanocd451662016-09-13 00:54:093577 Specify how differences in submodules are shown. When specifying
3578 <code>--submodule=short</code> the <em>short</em> format is used. This format just
3579 shows the names of the commits at the beginning and end of the range.
3580 When <code>--submodule</code> or <code>--submodule=log</code> is specified, the <em>log</em>
3581 format is used. This format lists the commits in the range like
3582 <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does. When <code>--submodule=diff</code>
3583 is specified, the <em>diff</em> format is used. This format shows an
3584 inline diff of the changes in the submodule contents between the
3585 commit range. Defaults to <code>diff.submodule</code> or the <em>short</em> format
3586 if the config option is unset.
Junio C Hamanod2c978f2011-03-20 19:42:223587</p>
3588</dd>
3589<dt class="hdlist1">
3590--color[=&lt;when&gt;]
3591</dt>
3592<dd>
3593<p>
3594 Show colored diff.
Junio C Hamanoac12f0e2014-09-19 22:32:513595 <code>--color</code> (i.e. without <em>=&lt;when&gt;</em>) is the same as <code>--color=always</code>.
3596 <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:223597</p>
3598</dd>
3599<dt class="hdlist1">
3600--no-color
3601</dt>
3602<dd>
3603<p>
Junio C Hamano5f2627d2011-05-06 20:23:483604 Turn off colored diff.
Junio C Hamanoac12f0e2014-09-19 22:32:513605 It is the same as <code>--color=never</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223606</p>
3607</dd>
3608<dt class="hdlist1">
Junio C Hamanofb1fdf12017-08-27 06:14:593609--color-moved[=&lt;mode&gt;]
3610</dt>
3611<dd>
3612<p>
3613 Moved lines of code are colored differently.
3614 The &lt;mode&gt; defaults to <em>no</em> if the option is not given
3615 and to <em>zebra</em> if the option with no mode is given.
3616 The mode must be one of:
3617</p>
3618<div class="openblock">
3619<div class="content">
3620<div class="dlist"><dl>
3621<dt class="hdlist1">
3622no
3623</dt>
3624<dd>
3625<p>
3626 Moved lines are not highlighted.
3627</p>
3628</dd>
3629<dt class="hdlist1">
3630default
3631</dt>
3632<dd>
3633<p>
3634 Is a synonym for <code>zebra</code>. This may change to a more sensible mode
3635 in the future.
3636</p>
3637</dd>
3638<dt class="hdlist1">
3639plain
3640</dt>
3641<dd>
3642<p>
3643 Any line that is added in one location and was removed
3644 in another location will be colored with <em>color.diff.newMoved</em>.
3645 Similarly <em>color.diff.oldMoved</em> will be used for removed lines
3646 that are added somewhere else in the diff. This mode picks up any
3647 moved line, but it is not very useful in a review to determine
3648 if a block of code was moved without permutation.
3649</p>
3650</dd>
3651<dt class="hdlist1">
Junio C Hamanof09b7cd2018-08-02 23:01:453652blocks
Junio C Hamanofb1fdf12017-08-27 06:14:593653</dt>
3654<dd>
3655<p>
3656 Blocks of moved text of at least 20 alphanumeric characters
3657 are detected greedily. The detected blocks are
Junio C Hamanof09b7cd2018-08-02 23:01:453658 painted using either the <em>color.diff.{old,new}Moved</em> color.
3659 Adjacent blocks cannot be told apart.
3660</p>
3661</dd>
3662<dt class="hdlist1">
3663zebra
3664</dt>
3665<dd>
3666<p>
3667 Blocks of moved text are detected as in <em>blocks</em> mode. The blocks
3668 are painted using either the <em>color.diff.{old,new}Moved</em> color or
Junio C Hamanofb1fdf12017-08-27 06:14:593669 <em>color.diff.{old,new}MovedAlternative</em>. The change between
3670 the two colors indicates that a new block was detected.
3671</p>
3672</dd>
3673<dt class="hdlist1">
Junio C Hamanobfd91f42018-08-17 22:21:163674dimmed-zebra
Junio C Hamanofb1fdf12017-08-27 06:14:593675</dt>
3676<dd>
3677<p>
3678 Similar to <em>zebra</em>, but additional dimming of uninteresting parts
3679 of moved code is performed. The bordering lines of two adjacent
3680 blocks are considered interesting, the rest is uninteresting.
Junio C Hamanobfd91f42018-08-17 22:21:163681 <code>dimmed_zebra</code> is a deprecated synonym.
Junio C Hamanofb1fdf12017-08-27 06:14:593682</p>
3683</dd>
3684</dl></div>
3685</div></div>
3686</dd>
3687<dt class="hdlist1">
Junio C Hamanoa90214f2019-01-28 22:05:253688--no-color-moved
3689</dt>
3690<dd>
3691<p>
3692 Turn off move detection. This can be used to override configuration
3693 settings. It is the same as <code>--color-moved=no</code>.
3694</p>
3695</dd>
3696<dt class="hdlist1">
Junio C Hamanof09b7cd2018-08-02 23:01:453697--color-moved-ws=&lt;modes&gt;
3698</dt>
3699<dd>
3700<p>
Junio C Hamanoa90214f2019-01-28 22:05:253701 This configures how whitespace is ignored when performing the
Junio C Hamanof09b7cd2018-08-02 23:01:453702 move detection for <code>--color-moved</code>.
3703 These modes can be given as a comma separated list:
3704</p>
3705<div class="openblock">
3706<div class="content">
3707<div class="dlist"><dl>
3708<dt class="hdlist1">
Junio C Hamanoa90214f2019-01-28 22:05:253709no
3710</dt>
3711<dd>
3712<p>
3713 Do not ignore whitespace when performing move detection.
3714</p>
3715</dd>
3716<dt class="hdlist1">
Junio C Hamanof09b7cd2018-08-02 23:01:453717ignore-space-at-eol
3718</dt>
3719<dd>
3720<p>
3721 Ignore changes in whitespace at EOL.
3722</p>
3723</dd>
3724<dt class="hdlist1">
3725ignore-space-change
3726</dt>
3727<dd>
3728<p>
3729 Ignore changes in amount of whitespace. This ignores whitespace
3730 at line end, and considers all other sequences of one or
3731 more whitespace characters to be equivalent.
3732</p>
3733</dd>
3734<dt class="hdlist1">
3735ignore-all-space
3736</dt>
3737<dd>
3738<p>
3739 Ignore whitespace when comparing lines. This ignores differences
3740 even if one line has whitespace where the other line has none.
3741</p>
3742</dd>
3743<dt class="hdlist1">
3744allow-indentation-change
3745</dt>
3746<dd>
3747<p>
Junio C Hamanoa90214f2019-01-28 22:05:253748 Initially ignore any whitespace in the move detection, then
Junio C Hamanof09b7cd2018-08-02 23:01:453749 group the moved code blocks only into a block if the change in
3750 whitespace is the same per line. This is incompatible with the
3751 other modes.
3752</p>
3753</dd>
3754</dl></div>
3755</div></div>
3756</dd>
3757<dt class="hdlist1">
Junio C Hamanoa90214f2019-01-28 22:05:253758--no-color-moved-ws
3759</dt>
3760<dd>
3761<p>
3762 Do not ignore whitespace when performing move detection. This can be
3763 used to override configuration settings. It is the same as
3764 <code>--color-moved-ws=no</code>.
3765</p>
3766</dd>
3767<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223768--word-diff[=&lt;mode&gt;]
3769</dt>
3770<dd>
3771<p>
3772 Show a word diff, using the &lt;mode&gt; to delimit changed words.
3773 By default, words are delimited by whitespace; see
Junio C Hamanoac12f0e2014-09-19 22:32:513774 <code>--word-diff-regex</code> below. The &lt;mode&gt; defaults to <em>plain</em>, and
Junio C Hamanod2c978f2011-03-20 19:42:223775 must be one of:
3776</p>
Junio C Hamano9629d4f2012-12-19 00:28:273777<div class="openblock">
3778<div class="content">
Junio C Hamanod2c978f2011-03-20 19:42:223779<div class="dlist"><dl>
3780<dt class="hdlist1">
3781color
3782</dt>
3783<dd>
3784<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513785 Highlight changed words using only colors. Implies <code>--color</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223786</p>
3787</dd>
3788<dt class="hdlist1">
3789plain
3790</dt>
3791<dd>
3792<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513793 Show words as <code>[-removed-]</code> and <code>{+added+}</code>. Makes no
Junio C Hamanod2c978f2011-03-20 19:42:223794 attempts to escape the delimiters if they appear in the input,
3795 so the output may be ambiguous.
3796</p>
3797</dd>
3798<dt class="hdlist1">
3799porcelain
3800</dt>
3801<dd>
3802<p>
3803 Use a special line-based format intended for script
3804 consumption. Added/removed/unchanged runs are printed in the
Junio C Hamanoac12f0e2014-09-19 22:32:513805 usual unified diff format, starting with a <code>+</code>/<code>-</code>/` `
Junio C Hamanod2c978f2011-03-20 19:42:223806 character at the beginning of the line and extending to the
3807 end of the line. Newlines in the input are represented by a
Junio C Hamanoac12f0e2014-09-19 22:32:513808 tilde <code>~</code> on a line of its own.
Junio C Hamanod2c978f2011-03-20 19:42:223809</p>
3810</dd>
3811<dt class="hdlist1">
3812none
3813</dt>
3814<dd>
3815<p>
3816 Disable word diff again.
3817</p>
3818</dd>
3819</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:273820</div></div>
Junio C Hamanod2c978f2011-03-20 19:42:223821<div class="paragraph"><p>Note that despite the name of the first mode, color is used to
3822highlight the changed parts in all modes if enabled.</p></div>
3823</dd>
3824<dt class="hdlist1">
3825--word-diff-regex=&lt;regex&gt;
3826</dt>
3827<dd>
3828<p>
3829 Use &lt;regex&gt; to decide what a word is, instead of considering
3830 runs of non-whitespace to be a word. Also implies
Junio C Hamanoac12f0e2014-09-19 22:32:513831 <code>--word-diff</code> unless it was already enabled.
Junio C Hamanod2c978f2011-03-20 19:42:223832</p>
3833<div class="paragraph"><p>Every non-overlapping match of the
3834&lt;regex&gt; is considered a word. Anything between these matches is
3835considered whitespace and ignored(!) for the purposes of finding
Junio C Hamanoac12f0e2014-09-19 22:32:513836differences. You may want to append <code>|[^[:space:]]</code> to your regular
Junio C Hamanod2c978f2011-03-20 19:42:223837expression to make sure that it matches all non-whitespace characters.
3838A match that contains a newline is silently truncated(!) at the
3839newline.</p></div>
Junio C Hamano713eded2015-12-03 00:24:023840<div class="paragraph"><p>For example, <code>--word-diff-regex=.</code> will treat each character as a word
3841and, correspondingly, show differences character by character.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223842<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:243843<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:223844overrides any diff driver or configuration setting. Diff drivers
3845override configuration settings.</p></div>
3846</dd>
3847<dt class="hdlist1">
3848--color-words[=&lt;regex&gt;]
3849</dt>
3850<dd>
3851<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513852 Equivalent to <code>--word-diff=color</code> plus (if a regex was
3853 specified) <code>--word-diff-regex=&lt;regex&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223854</p>
3855</dd>
3856<dt class="hdlist1">
3857--no-renames
3858</dt>
3859<dd>
3860<p>
3861 Turn off rename detection, even when the configuration
3862 file gives the default to do so.
3863</p>
3864</dd>
3865<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:003866--[no-]rename-empty
3867</dt>
3868<dd>
3869<p>
3870 Whether to use empty blobs as rename source.
3871</p>
3872</dd>
3873<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223874--check
3875</dt>
3876<dd>
3877<p>
Junio C Hamano84ea1e42016-04-08 21:53:483878 Warn if changes introduce conflict markers or whitespace errors.
3879 What are considered whitespace errors is controlled by <code>core.whitespace</code>
Junio C Hamano6005bfa2011-06-23 00:51:223880 configuration. By default, trailing whitespaces (including
Junio C Hamano14e66832018-06-18 18:32:193881 lines that consist solely of whitespaces) and a space character
Junio C Hamano6005bfa2011-06-23 00:51:223882 that is immediately followed by a tab character inside the
3883 initial indent of the line are considered whitespace errors.
3884 Exits with non-zero status if problems are found. Not compatible
3885 with --exit-code.
Junio C Hamanod2c978f2011-03-20 19:42:223886</p>
3887</dd>
3888<dt class="hdlist1">
Junio C Hamano8c5d5942015-06-11 19:37:483889--ws-error-highlight=&lt;kind&gt;
3890</dt>
3891<dd>
3892<p>
Junio C Hamano4b2a6c12017-08-22 18:32:373893 Highlight whitespace errors in the <code>context</code>, <code>old</code> or <code>new</code>
3894 lines of the diff. Multiple values are separated by comma,
3895 <code>none</code> resets previous values, <code>default</code> reset the list to
3896 <code>new</code> and <code>all</code> is a shorthand for <code>old,new,context</code>. When
3897 this option is not given, and the configuration variable
3898 <code>diff.wsErrorHighlight</code> is not set, only whitespace errors in
3899 <code>new</code> lines are highlighted. The whitespace errors are colored
Junio C Hamano14e66832018-06-18 18:32:193900 with <code>color.diff.whitespace</code>.
Junio C Hamano8c5d5942015-06-11 19:37:483901</p>
3902</dd>
3903<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223904--full-index
3905</dt>
3906<dd>
3907<p>
3908 Instead of the first handful of characters, show the full
3909 pre- and post-image blob object names on the "index"
3910 line when generating patch format output.
3911</p>
3912</dd>
3913<dt class="hdlist1">
3914--binary
3915</dt>
3916<dd>
3917<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513918 In addition to <code>--full-index</code>, output a binary diff that
Junio C Hamano6b7d2152019-04-16 12:51:153919 can be applied with <code>git-apply</code>. Implies <code>--patch</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223920</p>
3921</dd>
3922<dt class="hdlist1">
3923--abbrev[=&lt;n&gt;]
3924</dt>
3925<dd>
3926<p>
3927 Instead of showing the full 40-byte hexadecimal object
3928 name in diff-raw format output and diff-tree header
3929 lines, show only a partial prefix. This is
Junio C Hamanoac12f0e2014-09-19 22:32:513930 independent of the <code>--full-index</code> option above, which controls
Junio C Hamanod2c978f2011-03-20 19:42:223931 the diff-patch output format. Non default number of
Junio C Hamanoac12f0e2014-09-19 22:32:513932 digits can be specified with <code>--abbrev=&lt;n&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223933</p>
3934</dd>
3935<dt class="hdlist1">
3936-B[&lt;n&gt;][/&lt;m&gt;]
3937</dt>
3938<dt class="hdlist1">
3939--break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]
3940</dt>
3941<dd>
3942<p>
3943 Break complete rewrite changes into pairs of delete and
3944 create. This serves two purposes:
3945</p>
3946<div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file
3947not as a series of deletion and insertion mixed together with a very
3948few lines that happen to match textually as the context, but as a
3949single deletion of everything old followed by a single insertion of
Junio C Hamanoac12f0e2014-09-19 22:32:513950everything new, and the number <code>m</code> controls this aspect of the -B
3951option (defaults to 60%). <code>-B/70%</code> specifies that less than 30% of the
Junio C Hamano076ffcc2013-02-06 05:13:213952original should remain in the result for Git to consider it a total
Junio C Hamanod2c978f2011-03-20 19:42:223953rewrite (i.e. otherwise the resulting patch will be a series of
3954deletion and insertion mixed together with context lines).</p></div>
3955<div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
3956source of a rename (usually -M only considers a file that disappeared
Junio C Hamanoac12f0e2014-09-19 22:32:513957as the source of a rename), and the number <code>n</code> controls this aspect of
3958the -B option (defaults to 50%). <code>-B20%</code> specifies that a change with
Junio C Hamanod2c978f2011-03-20 19:42:223959addition and deletion compared to 20% or more of the file&#8217;s size are
3960eligible for being picked up as a possible source of a rename to
3961another file.</p></div>
3962</dd>
3963<dt class="hdlist1">
3964-M[&lt;n&gt;]
3965</dt>
3966<dt class="hdlist1">
3967--find-renames[=&lt;n&gt;]
3968</dt>
3969<dd>
3970<p>
3971 If generating diffs, detect and report renames for each commit.
3972 For following files across renames while traversing history, see
Junio C Hamanoac12f0e2014-09-19 22:32:513973 <code>--follow</code>.
3974 If <code>n</code> is specified, it is a threshold on the similarity
Junio C Hamanod2c978f2011-03-20 19:42:223975 index (i.e. amount of addition/deletions compared to the
Junio C Hamanoac12f0e2014-09-19 22:32:513976 file&#8217;s size). For example, <code>-M90%</code> means Git should consider a
Junio C Hamanod2c978f2011-03-20 19:42:223977 delete/add pair to be a rename if more than 90% of the file
Junio C Hamanoac12f0e2014-09-19 22:32:513978 hasn&#8217;t changed. Without a <code>%</code> sign, the number is to be read as
3979 a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes
3980 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is
3981 the same as <code>-M5%</code>. To limit detection to exact renames, use
3982 <code>-M100%</code>. The default similarity index is 50%.
Junio C Hamanod2c978f2011-03-20 19:42:223983</p>
3984</dd>
3985<dt class="hdlist1">
3986-C[&lt;n&gt;]
3987</dt>
3988<dt class="hdlist1">
3989--find-copies[=&lt;n&gt;]
3990</dt>
3991<dd>
3992<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513993 Detect copies as well as renames. See also <code>--find-copies-harder</code>.
3994 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:223995</p>
3996</dd>
3997<dt class="hdlist1">
3998--find-copies-harder
3999</dt>
4000<dd>
4001<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514002 For performance reasons, by default, <code>-C</code> option finds copies only
Junio C Hamanod2c978f2011-03-20 19:42:224003 if the original file of the copy was modified in the same
4004 changeset. This flag makes the command
4005 inspect unmodified files as candidates for the source of
4006 copy. This is a very expensive operation for large
4007 projects, so use it with caution. Giving more than one
Junio C Hamanoac12f0e2014-09-19 22:32:514008 <code>-C</code> option has the same effect.
Junio C Hamanod2c978f2011-03-20 19:42:224009</p>
4010</dd>
4011<dt class="hdlist1">
Junio C Hamanob02377c2011-04-28 22:26:024012-D
4013</dt>
4014<dt class="hdlist1">
4015--irreversible-delete
4016</dt>
4017<dd>
4018<p>
4019 Omit the preimage for deletes, i.e. print only the header but not
Junio C Hamanoac12f0e2014-09-19 22:32:514020 the diff between the preimage and <code>/dev/null</code>. The resulting patch
4021 is not meant to be applied with <code>patch</code> or <code>git apply</code>; this is
Junio C Hamanob02377c2011-04-28 22:26:024022 solely for people who want to just concentrate on reviewing the
Junio C Hamanod16fd1b2017-08-04 16:41:514023 text after the change. In addition, the output obviously lacks
Junio C Hamanob02377c2011-04-28 22:26:024024 enough information to apply such a patch in reverse, even manually,
4025 hence the name of the option.
4026</p>
Junio C Hamanoac12f0e2014-09-19 22:32:514027<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:024028of a delete/create pair.</p></div>
4029</dd>
4030<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224031-l&lt;num&gt;
4032</dt>
4033<dd>
4034<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514035 The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n
Junio C Hamanod2c978f2011-03-20 19:42:224036 is the number of potential rename/copy targets. This
4037 option prevents rename/copy detection from running if
4038 the number of rename/copy targets exceeds the specified
4039 number.
4040</p>
4041</dd>
4042<dt class="hdlist1">
4043--diff-filter=[(A|C|D|M|R|T|U|X|B)&#8230;[*]]
4044</dt>
4045<dd>
4046<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514047 Select only files that are Added (<code>A</code>), Copied (<code>C</code>),
4048 Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their
4049 type (i.e. regular file, symlink, submodule, &#8230;) changed (<code>T</code>),
4050 are Unmerged (<code>U</code>), are
4051 Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>).
Junio C Hamanod2c978f2011-03-20 19:42:224052 Any combination of the filter characters (including none) can be used.
Junio C Hamanoac12f0e2014-09-19 22:32:514053 When <code>*</code> (All-or-none) is added to the combination, all
Junio C Hamanod2c978f2011-03-20 19:42:224054 paths are selected if there is any file that matches
4055 other criteria in the comparison; if there is no file
4056 that matches other criteria, nothing is selected.
4057</p>
Junio C Hamanoeed15af2016-07-25 22:49:424058<div class="paragraph"><p>Also, these upper-case letters can be downcased to exclude. E.g.
4059<code>--diff-filter=ad</code> excludes added and deleted paths.</p></div>
Junio C Hamano3a34f152018-01-09 23:09:384060<div class="paragraph"><p>Note that not all diffs can feature all types. For instance, diffs
4061from the index to the working tree can never have Added entries
4062(because the set of paths included in the diff is limited by what is in
4063the index). Similarly, copied and renamed entries cannot appear if
4064detection for those types is disabled.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:224065</dd>
4066<dt class="hdlist1">
4067-S&lt;string&gt;
4068</dt>
4069<dd>
4070<p>
Junio C Hamanof1f5a7b2013-06-11 22:23:524071 Look for differences that change the number of occurrences of
4072 the specified string (i.e. addition/deletion) in a file.
4073 Intended for the scripter&#8217;s use.
Junio C Hamanod2c978f2011-03-20 19:42:224074</p>
Junio C Hamanof1f5a7b2013-06-11 22:23:524075<div class="paragraph"><p>It is useful when you&#8217;re looking for an exact block of code (like a
4076struct), and want to know the history of that block since it first
4077came into being: use the feature iteratively to feed the interesting
Junio C Hamanoac12f0e2014-09-19 22:32:514078block in the preimage back into <code>-S</code>, and keep going until you get the
Junio C Hamanof1f5a7b2013-06-11 22:23:524079very first version of the block.</p></div>
Junio C Hamanoace33e42019-01-18 23:16:054080<div class="paragraph"><p>Binary files are searched as well.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:224081</dd>
4082<dt class="hdlist1">
4083-G&lt;regex&gt;
4084</dt>
4085<dd>
4086<p>
Junio C Hamanof1f5a7b2013-06-11 22:23:524087 Look for differences whose patch text contains added/removed
4088 lines that match &lt;regex&gt;.
Junio C Hamanod2c978f2011-03-20 19:42:224089</p>
Junio C Hamanoac12f0e2014-09-19 22:32:514090<div class="paragraph"><p>To illustrate the difference between <code>-S&lt;regex&gt; --pickaxe-regex</code> and
4091<code>-G&lt;regex&gt;</code>, consider a commit with the following diff in the same
Junio C Hamanof1f5a7b2013-06-11 22:23:524092file:</p></div>
4093<div class="listingblock">
4094<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514095<pre><code>+ return !regexec(regexp, two-&gt;ptr, 1, &amp;regmatch, 0);
Junio C Hamanof1f5a7b2013-06-11 22:23:524096...
Junio C Hamanoac12f0e2014-09-19 22:32:514097- hit = !regexec(regexp, mf2.ptr, 1, &amp;regmatch, 0);</code></pre>
Junio C Hamanof1f5a7b2013-06-11 22:23:524098</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514099<div class="paragraph"><p>While <code>git log -G"regexec\(regexp"</code> will show this commit, <code>git log
4100-S"regexec\(regexp" --pickaxe-regex</code> will not (because the number of
Junio C Hamanof1f5a7b2013-06-11 22:23:524101occurrences of that string did not change).</p></div>
Junio C Hamanoace33e42019-01-18 23:16:054102<div class="paragraph"><p>Unless <code>--text</code> is supplied patches of binary files without a textconv
4103filter will be ignored.</p></div>
Junio C Hamanof1f5a7b2013-06-11 22:23:524104<div class="paragraph"><p>See the <em>pickaxe</em> entry in <a href="gitdiffcore.html">gitdiffcore(7)</a> for more
4105information.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:224106</dd>
4107<dt class="hdlist1">
Junio C Hamano7b9cce92018-01-23 22:34:274108--find-object=&lt;object-id&gt;
4109</dt>
4110<dd>
4111<p>
4112 Look for differences that change the number of occurrences of
4113 the specified object. Similar to <code>-S</code>, just the argument is different
4114 in that it doesn&#8217;t search for a specific string but for a specific
4115 object id.
4116</p>
4117<div class="paragraph"><p>The object can be a blob or a submodule commit. It implies the <code>-t</code> option in
4118<code>git-log</code> to also find trees.</p></div>
4119</dd>
4120<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224121--pickaxe-all
4122</dt>
4123<dd>
4124<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514125 When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that
Junio C Hamanod2c978f2011-03-20 19:42:224126 changeset, not just the files that contain the change
4127 in &lt;string&gt;.
4128</p>
4129</dd>
4130<dt class="hdlist1">
4131--pickaxe-regex
4132</dt>
4133<dd>
4134<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514135 Treat the &lt;string&gt; given to <code>-S</code> as an extended POSIX regular
Junio C Hamanof1f5a7b2013-06-11 22:23:524136 expression to match.
Junio C Hamanod2c978f2011-03-20 19:42:224137</p>
4138</dd>
4139<dt class="hdlist1">
4140-O&lt;orderfile&gt;
4141</dt>
4142<dd>
4143<p>
Junio C Hamanobcd98f42017-01-24 00:12:164144 Control the order in which files appear in the output.
Junio C Hamano322c6242015-03-23 21:32:464145 This overrides the <code>diff.orderFile</code> configuration variable
4146 (see <a href="git-config.html">git-config(1)</a>). To cancel <code>diff.orderFile</code>,
Junio C Hamanoac12f0e2014-09-19 22:32:514147 use <code>-O/dev/null</code>.
Junio C Hamanod2c978f2011-03-20 19:42:224148</p>
Junio C Hamanobcd98f42017-01-24 00:12:164149<div class="paragraph"><p>The output order is determined by the order of glob patterns in
4150&lt;orderfile&gt;.
4151All files with pathnames that match the first pattern are output
4152first, all files with pathnames that match the second pattern (but not
4153the first) are output next, and so on.
4154All files with pathnames that do not match any pattern are output
4155last, as if there was an implicit match-all pattern at the end of the
4156file.
4157If multiple pathnames have the same rank (they match the same pattern
4158but no earlier patterns), their output order relative to each other is
4159the normal order.</p></div>
4160<div class="paragraph"><p>&lt;orderfile&gt; is parsed as follows:</p></div>
4161<div class="openblock">
4162<div class="content">
4163<div class="ulist"><ul>
4164<li>
4165<p>
4166Blank lines are ignored, so they can be used as separators for
4167 readability.
4168</p>
4169</li>
4170<li>
4171<p>
4172Lines starting with a hash ("<code>#</code>") are ignored, so they can be used
4173 for comments. Add a backslash ("<code>\</code>") to the beginning of the
4174 pattern if it starts with a hash.
4175</p>
4176</li>
4177<li>
4178<p>
4179Each other line contains a single pattern.
4180</p>
4181</li>
4182</ul></div>
4183</div></div>
4184<div class="paragraph"><p>Patterns have the same syntax and semantics as patterns used for
Junio C Hamano96153bf2018-04-25 08:25:344185fnmatch(3) without the FNM_PATHNAME flag, except a pathname also
Junio C Hamanobcd98f42017-01-24 00:12:164186matches a pattern if removing any number of the final pathname
4187components matches the pattern. For example, the pattern "<code>foo*bar</code>"
4188matches "<code>fooasdfbar</code>" and "<code>foo/bar/baz/asdf</code>" but not "<code>foobarx</code>".</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:224189</dd>
4190<dt class="hdlist1">
4191-R
4192</dt>
4193<dd>
4194<p>
4195 Swap two inputs; that is, show differences from index or
4196 on-disk file to tree contents.
4197</p>
4198</dd>
4199<dt class="hdlist1">
4200--relative[=&lt;path&gt;]
4201</dt>
4202<dd>
4203<p>
4204 When run from a subdirectory of the project, it can be
4205 told to exclude changes outside the directory and show
4206 pathnames relative to it with this option. When you are
4207 not in a subdirectory (e.g. in a bare repository), you
4208 can name which subdirectory to make the output relative
4209 to by giving a &lt;path&gt; as an argument.
4210</p>
4211</dd>
4212<dt class="hdlist1">
4213-a
4214</dt>
4215<dt class="hdlist1">
4216--text
4217</dt>
4218<dd>
4219<p>
4220 Treat all files as text.
4221</p>
4222</dd>
4223<dt class="hdlist1">
Junio C Hamano4886c772017-11-27 03:33:284224--ignore-cr-at-eol
4225</dt>
4226<dd>
4227<p>
Junio C Hamano96153bf2018-04-25 08:25:344228 Ignore carriage-return at the end of line when doing a comparison.
Junio C Hamano4886c772017-11-27 03:33:284229</p>
4230</dd>
4231<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224232--ignore-space-at-eol
4233</dt>
4234<dd>
4235<p>
4236 Ignore changes in whitespace at EOL.
4237</p>
4238</dd>
4239<dt class="hdlist1">
4240-b
4241</dt>
4242<dt class="hdlist1">
4243--ignore-space-change
4244</dt>
4245<dd>
4246<p>
4247 Ignore changes in amount of whitespace. This ignores whitespace
4248 at line end, and considers all other sequences of one or
4249 more whitespace characters to be equivalent.
4250</p>
4251</dd>
4252<dt class="hdlist1">
4253-w
4254</dt>
4255<dt class="hdlist1">
4256--ignore-all-space
4257</dt>
4258<dd>
4259<p>
4260 Ignore whitespace when comparing lines. This ignores
4261 differences even if one line has whitespace where the other
4262 line has none.
4263</p>
4264</dd>
4265<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:184266--ignore-blank-lines
4267</dt>
4268<dd>
4269<p>
4270 Ignore changes whose lines are all blank.
4271</p>
4272</dd>
4273<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224274--inter-hunk-context=&lt;lines&gt;
4275</dt>
4276<dd>
4277<p>
4278 Show the context between diff hunks, up to the specified number
4279 of lines, thereby fusing hunks that are close to each other.
Junio C Hamanobcd98f42017-01-24 00:12:164280 Defaults to <code>diff.interHunkContext</code> or 0 if the config option
4281 is unset.
Junio C Hamanod2c978f2011-03-20 19:42:224282</p>
4283</dd>
4284<dt class="hdlist1">
Junio C Hamano11821ed2011-10-19 18:42:094285-W
4286</dt>
4287<dt class="hdlist1">
4288--function-context
4289</dt>
4290<dd>
4291<p>
4292 Show whole surrounding functions of changes.
4293</p>
4294</dd>
4295<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224296--ext-diff
4297</dt>
4298<dd>
4299<p>
4300 Allow an external diff helper to be executed. If you set an
Junio C Hamanoa28a9202012-06-21 07:08:234301 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
4302 to use this option with <a href="git-log.html">git-log(1)</a> and friends.
Junio C Hamanod2c978f2011-03-20 19:42:224303</p>
4304</dd>
4305<dt class="hdlist1">
4306--no-ext-diff
4307</dt>
4308<dd>
4309<p>
4310 Disallow external diff drivers.
4311</p>
4312</dd>
4313<dt class="hdlist1">
Junio C Hamanoc652aed2011-07-07 01:14:314314--textconv
4315</dt>
4316<dt class="hdlist1">
4317--no-textconv
4318</dt>
4319<dd>
4320<p>
4321 Allow (or disallow) external text conversion filters to be run
Junio C Hamanoa28a9202012-06-21 07:08:234322 when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for
Junio C Hamanoc652aed2011-07-07 01:14:314323 details. Because textconv filters are typically a one-way
4324 conversion, the resulting diff is suitable for human
4325 consumption, but cannot be applied. For this reason, textconv
Junio C Hamanoa28a9202012-06-21 07:08:234326 filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and
4327 <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:314328 diff plumbing commands.
4329</p>
4330</dd>
4331<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224332--ignore-submodules[=&lt;when&gt;]
4333</dt>
4334<dd>
4335<p>
4336 Ignore changes to submodules in the diff generation. &lt;when&gt; can be
Junio C Hamanoc7102962013-05-29 23:57:174337 either "none", "untracked", "dirty" or "all", which is the default.
Junio C Hamanod2c978f2011-03-20 19:42:224338 Using "none" will consider the submodule modified when it either contains
4339 untracked or modified files or its HEAD differs from the commit recorded
4340 in the superproject and can be used to override any settings of the
Junio C Hamanoa28a9202012-06-21 07:08:234341 <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:224342 "untracked" is used submodules are not considered dirty when they only
4343 contain untracked content (but they are still scanned for modified
4344 content). Using "dirty" ignores all changes to the work tree of submodules,
4345 only changes to the commits stored in the superproject are shown (this was
4346 the behavior until 1.7.0). Using "all" hides all changes to submodules.
4347</p>
4348</dd>
4349<dt class="hdlist1">
4350--src-prefix=&lt;prefix&gt;
4351</dt>
4352<dd>
4353<p>
4354 Show the given source prefix instead of "a/".
4355</p>
4356</dd>
4357<dt class="hdlist1">
4358--dst-prefix=&lt;prefix&gt;
4359</dt>
4360<dd>
4361<p>
4362 Show the given destination prefix instead of "b/".
4363</p>
4364</dd>
4365<dt class="hdlist1">
4366--no-prefix
4367</dt>
4368<dd>
4369<p>
4370 Do not show any source or destination prefix.
4371</p>
4372</dd>
Junio C Hamanocd451662016-09-13 00:54:094373<dt class="hdlist1">
4374--line-prefix=&lt;prefix&gt;
4375</dt>
4376<dd>
4377<p>
4378 Prepend an additional prefix to every line of output.
4379</p>
4380</dd>
Junio C Hamanof7017f12016-10-27 23:31:344381<dt class="hdlist1">
4382--ita-invisible-in-index
4383</dt>
4384<dd>
4385<p>
4386 By default entries added by "git add -N" appear as an existing
4387 empty file in "git diff" and a new file in "git diff --cached".
4388 This option makes the entry appear as a new file in "git diff"
4389 and non-existent in "git diff --cached". This option could be
4390 reverted with <code>--ita-visible-in-index</code>. Both options are
4391 experimental and could be removed in future.
4392</p>
4393</dd>
Junio C Hamanod2c978f2011-03-20 19:42:224394</dl></div>
4395<div class="paragraph"><p>For more detailed explanation on these common options, see also
Junio C Hamanoa28a9202012-06-21 07:08:234396<a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:224397</div>
Junio C Hamano9629d4f2012-12-19 00:28:274398</div>
4399<div class="sect1">
Junio C Hamano48cd3f12019-10-09 05:55:304400<h2 id="_generating_patch_text_with_p">Generating patch text with -p</h2>
Junio C Hamano00b8b632007-12-07 09:50:494401<div class="sectionbody">
Junio C Hamano48cd3f12019-10-09 05:55:304402<div class="paragraph"><p>Running
4403<a href="git-diff.html">git-diff(1)</a>,
4404<a href="git-log.html">git-log(1)</a>,
4405<a href="git-show.html">git-show(1)</a>,
4406<a href="git-diff-index.html">git-diff-index(1)</a>,
4407<a href="git-diff-tree.html">git-diff-tree(1)</a>, or
4408<a href="git-diff-files.html">git-diff-files(1)</a>
4409with the <code>-p</code> option produces patch text.
4410You can customize the creation of patch text via the
Junio C Hamano042f2142016-06-27 18:05:054411<code>GIT_EXTERNAL_DIFF</code> and the <code>GIT_DIFF_OPTS</code> environment variables.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594412<div class="paragraph"><p>What the -p option produces is slightly different from the traditional
Junio C Hamano7f9fa862010-10-19 23:51:144413diff format:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594414<div class="olist arabic"><ol class="arabic">
Junio C Hamano00b8b632007-12-07 09:50:494415<li>
4416<p>
Junio C Hamano7f9fa862010-10-19 23:51:144417It is preceded with a "git diff" header that looks like this:
Junio C Hamano00b8b632007-12-07 09:50:494418</p>
4419<div class="literalblock">
4420<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514421<pre><code>diff --git a/file1 b/file2</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494422</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514423<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:494424involved. Especially, even for a creation or a deletion,
Junio C Hamanoac12f0e2014-09-19 22:32:514425<code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p></div>
4426<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:494427name of the source file of the rename/copy and the name of
Junio C Hamanoba4b9282008-07-06 05:20:314428the file that rename/copy produces, respectively.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494429</li>
4430<li>
4431<p>
4432It is followed by one or more extended header lines:
4433</p>
4434<div class="literalblock">
4435<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514436<pre><code>old mode &lt;mode&gt;
Junio C Hamano00b8b632007-12-07 09:50:494437new mode &lt;mode&gt;
4438deleted file mode &lt;mode&gt;
4439new file mode &lt;mode&gt;
4440copy from &lt;path&gt;
4441copy to &lt;path&gt;
4442rename from &lt;path&gt;
4443rename to &lt;path&gt;
4444similarity index &lt;number&gt;
4445dissimilarity index &lt;number&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:514446index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494447</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594448<div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type
Junio C Hamano7f9fa862010-10-19 23:51:144449and file permission bits.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514450<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:594451<div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and
Junio C Hamano7f9fa862010-10-19 23:51:144452the dissimilarity index is the percentage of changed lines. It
4453is a rounded down integer, followed by a percent sign. The
4454similarity index value of 100% is thus reserved for two equal
4455files, while 100% dissimilarity means that no line from the old
4456file made it into the new one.</p></div>
Junio C Hamano48cd3f12019-10-09 05:55:304457<div class="paragraph"><p>The index line includes the blob object names before and after the change.
Junio C Hamano7f9fa862010-10-19 23:51:144458The &lt;mode&gt; is included if the file mode does not change; otherwise,
4459separate lines indicate the old and the new mode.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494460</li>
4461<li>
4462<p>
Junio C Hamano0f6f3bf2017-03-13 07:01:534463Pathnames with "unusual" characters are quoted as explained for
4464 the configuration variable <code>core.quotePath</code> (see
4465 <a href="git-config.html">git-config(1)</a>).
Junio C Hamano00b8b632007-12-07 09:50:494466</p>
4467</li>
Junio C Hamano7f9fa862010-10-19 23:51:144468<li>
4469<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514470All the <code>file1</code> files in the output refer to files before the
4471 commit, and all the <code>file2</code> files refer to files after the commit.
Junio C Hamano7f9fa862010-10-19 23:51:144472 It is incorrect to apply each change to each file sequentially. For
4473 example, this patch will swap a and b:
4474</p>
4475<div class="literalblock">
4476<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514477<pre><code>diff --git a/a b/b
Junio C Hamano7f9fa862010-10-19 23:51:144478rename from a
4479rename to b
4480diff --git a/b b/a
4481rename from b
Junio C Hamanoac12f0e2014-09-19 22:32:514482rename to a</code></pre>
Junio C Hamano7f9fa862010-10-19 23:51:144483</div></div>
4484</li>
Junio C Hamanoba4b9282008-07-06 05:20:314485</ol></div>
Junio C Hamano00b8b632007-12-07 09:50:494486</div>
Junio C Hamano9629d4f2012-12-19 00:28:274487</div>
4488<div class="sect1">
Junio C Hamano48cd3f12019-10-09 05:55:304489<h2 id="_combined_diff_format">Combined diff format</h2>
Junio C Hamano00b8b632007-12-07 09:50:494490<div class="sectionbody">
Junio C Hamano1dbca522015-05-22 20:48:554491<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:434492produce a <em>combined diff</em> when showing a merge. This is the default
Junio C Hamanoa28a9202012-06-21 07:08:234493format when showing merges with <a href="git-diff.html">git-diff(1)</a> or
Junio C Hamano1dbca522015-05-22 20:48:554494<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:434495of these commands to force generation of diffs with individual parents
4496of a merge.</p></div>
Junio C Hamano48cd3f12019-10-09 05:55:304497<div class="paragraph"><p>A "combined diff" format looks like this:</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494498<div class="listingblock">
4499<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514500<pre><code>diff --combined describe.c
Junio C Hamano00b8b632007-12-07 09:50:494501index fabadb8,cc95eb0..4866510
4502--- a/describe.c
4503+++ b/describe.c
4504@@@ -98,20 -98,12 +98,20 @@@
4505 return (a_date &gt; b_date) ? -1 : (a_date == b_date) ? 0 : 1;
4506 }
4507
4508- static void describe(char *arg)
4509 -static void describe(struct commit *cmit, int last_one)
4510++static void describe(char *arg, int last_one)
4511 {
4512 + unsigned char sha1[20];
4513 + struct commit *cmit;
4514 struct commit_list *list;
4515 static int initialized = 0;
4516 struct commit_name *n;
4517
4518 + if (get_sha1(arg, sha1) &lt; 0)
4519 + usage(describe_usage);
4520 + cmit = lookup_commit_reference(sha1);
4521 + if (!cmit)
4522 + usage(describe_usage);
4523 +
4524 if (!initialized) {
4525 initialized = 1;
Junio C Hamanoac12f0e2014-09-19 22:32:514526 for_each_ref(get_name);</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494527</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594528<div class="olist arabic"><ol class="arabic">
Junio C Hamano00b8b632007-12-07 09:50:494529<li>
4530<p>
4531It is preceded with a "git diff" header, that looks like
Junio C Hamano48cd3f12019-10-09 05:55:304532 this (when the <code>-c</code> option is used):
Junio C Hamano00b8b632007-12-07 09:50:494533</p>
4534<div class="literalblock">
4535<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514536<pre><code>diff --combined file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494537</div></div>
Junio C Hamano48cd3f12019-10-09 05:55:304538<div class="paragraph"><p>or like this (when the <code>--cc</code> option is used):</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494539<div class="literalblock">
4540<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514541<pre><code>diff --cc file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494542</div></div>
4543</li>
4544<li>
4545<p>
4546It is followed by one or more extended header lines
4547 (this example shows a merge with two parents):
4548</p>
4549<div class="literalblock">
4550<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514551<pre><code>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
Junio C Hamano00b8b632007-12-07 09:50:494552mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;
4553new file mode &lt;mode&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:514554deleted file mode &lt;mode&gt;,&lt;mode&gt;</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494555</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514556<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:494557the &lt;mode&gt; is different from the rest. Extended headers with
4558information about detected contents movement (renames and
4559copying detection) are designed to work with diff of two
Junio C Hamanoba4b9282008-07-06 05:20:314560&lt;tree-ish&gt; and are not used by combined diff format.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494561</li>
4562<li>
4563<p>
4564It is followed by two-line from-file/to-file header
4565</p>
4566<div class="literalblock">
4567<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514568<pre><code>--- a/file
4569+++ b/file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494570</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594571<div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff
Junio C Hamanoac12f0e2014-09-19 22:32:514572format, <code>/dev/null</code> is used to signal created or deleted
Junio C Hamanoba4b9282008-07-06 05:20:314573files.</p></div>
Junio C Hamano11f15372019-03-07 03:17:004574<div class="paragraph"><p>However, if the --combined-all-paths option is provided, instead of a
4575two-line from-file/to-file you get a N+1 line from-file/to-file header,
4576where N is the number of parents in the merge commit</p></div>
4577<div class="literalblock">
4578<div class="content">
4579<pre><code>--- a/file
4580--- a/file
4581--- a/file
4582+++ b/file</code></pre>
4583</div></div>
4584<div class="paragraph"><p>This extended format can be useful if rename or copy detection is
4585active, to allow you to see the original name of the file in different
4586parents.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494587</li>
4588<li>
4589<p>
4590Chunk header format is modified to prevent people from
Junio C Hamanoac12f0e2014-09-19 22:32:514591 accidentally feeding it to <code>patch -p1</code>. Combined diff format
Junio C Hamano00b8b632007-12-07 09:50:494592 was created for review of merge commit changes, and was not
Junio C Hamano48cd3f12019-10-09 05:55:304593 meant to be applied. The change is similar to the change in the
Junio C Hamano00b8b632007-12-07 09:50:494594 extended <em>index</em> header:
4595</p>
4596<div class="literalblock">
4597<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514598<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:494599</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514600<div class="paragraph"><p>There are (number of parents + 1) <code>@</code> characters in the chunk
Junio C Hamanoba4b9282008-07-06 05:20:314601header for combined diff format.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494602</li>
Junio C Hamanoba4b9282008-07-06 05:20:314603</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:594604<div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two
Junio C Hamanoac12f0e2014-09-19 22:32:514605files 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
4606added to B), or <code>" "</code> (space&#8201;&#8212;&#8201;unchanged) prefix, this format
Junio C Hamano00b8b632007-12-07 09:50:494607compares two or more files file1, file2,&#8230; with one file X, and
4608shows how X differs from each of fileN. One column for each of
Junio C Hamano68cf15a2010-11-06 01:01:594609fileN is prepended to the output line to note how X&#8217;s line is
Junio C Hamanoba4b9282008-07-06 05:20:314610different from it.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514611<div class="paragraph"><p>A <code>-</code> character in the column N means that the line appears in
4612fileN but it does not appear in the result. A <code>+</code> character
Junio C Hamano54bf1e22008-12-20 06:30:114613in the column N means that the line appears in the result,
Junio C Hamano00b8b632007-12-07 09:50:494614and fileN does not have that line (in other words, the line was
Junio C Hamanoba4b9282008-07-06 05:20:314615added, from the point of view of that parent).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594616<div class="paragraph"><p>In the above example output, the function signature was changed
Junio C Hamanoac12f0e2014-09-19 22:32:514617from both files (hence two <code>-</code> removals from both file1 and
4618file2, plus <code>++</code> to mean one line that was added does not appear
Junio C Hamanod75148a2014-04-08 19:48:384619in either file1 or file2). Also eight other lines are the same
Junio C Hamanoac12f0e2014-09-19 22:32:514620from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p></div>
4621<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:494622merge commit with the merge result (i.e. file1..fileN are the
Junio C Hamanoac12f0e2014-09-19 22:32:514623parents). When shown by <code>git diff-files -c</code>, it compares the
Junio C Hamano00b8b632007-12-07 09:50:494624two unresolved merge parents with the working tree file
4625(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
Junio C Hamanoba4b9282008-07-06 05:20:314626"their version").</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494627</div>
Junio C Hamano9629d4f2012-12-19 00:28:274628</div>
4629<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594630<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:234631<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:594632<div class="dlist"><dl>
4633<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514634<code>git log --no-merges</code>
Junio C Hamano1a4e8412005-12-27 08:17:234635</dt>
4636<dd>
4637<p>
4638 Show the whole commit history, but skip any merges
4639</p>
4640</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594641<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514642<code>git log v2.6.12.. include/scsi drivers/scsi</code>
Junio C Hamano1a4e8412005-12-27 08:17:234643</dt>
4644<dd>
4645<p>
4646 Show all commits since version <em>v2.6.12</em> that changed any file
Junio C Hamanoac12f0e2014-09-19 22:32:514647 in the <code>include/scsi</code> or <code>drivers/scsi</code> subdirectories
Junio C Hamano1a4e8412005-12-27 08:17:234648</p>
4649</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594650<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514651<code>git log --since="2 weeks ago" -- gitk</code>
Junio C Hamano1a4e8412005-12-27 08:17:234652</dt>
4653<dd>
4654<p>
4655 Show the changes during the last two weeks to the file <em>gitk</em>.
Junio C Hamanoccb82522018-05-08 07:52:094656 The <code>--</code> is necessary to avoid confusion with the <strong>branch</strong> named
Junio C Hamano1a4e8412005-12-27 08:17:234657 <em>gitk</em>
4658</p>
4659</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594660<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514661<code>git log --name-status release..test</code>
Junio C Hamanoba7c8d82006-04-15 06:17:424662</dt>
4663<dd>
4664<p>
4665 Show the commits that are in the "test" branch but not yet
4666 in the "release" branch, along with the list of paths
4667 each commit modifies.
4668</p>
4669</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594670<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514671<code>git log --follow builtin/rev-list.c</code>
Junio C Hamano235d53f2007-07-13 00:25:154672</dt>
4673<dd>
4674<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514675 Shows the commits that changed <code>builtin/rev-list.c</code>, including
Junio C Hamano235d53f2007-07-13 00:25:154676 those commits that occurred before the file was given its
4677 present name.
4678</p>
4679</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594680<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514681<code>git log --branches --not --remotes=origin</code>
Junio C Hamano57827fb2010-01-23 03:02:504682</dt>
4683<dd>
4684<p>
4685 Shows all commits that are in any of local branches but not in
Junio C Hamano97bcb482010-11-25 03:16:074686 any of remote-tracking branches for <em>origin</em> (what you have that
Junio C Hamano68cf15a2010-11-06 01:01:594687 origin doesn&#8217;t).
Junio C Hamano57827fb2010-01-23 03:02:504688</p>
4689</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594690<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514691<code>git log master --not --remotes=*/master</code>
Junio C Hamano57827fb2010-01-23 03:02:504692</dt>
4693<dd>
4694<p>
4695 Shows all commits that are in local master but not in any remote
4696 repository master branches.
4697</p>
4698</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594699<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514700<code>git log -p -m --first-parent</code>
Junio C Hamano31667362010-03-25 00:38:534701</dt>
4702<dd>
4703<p>
4704 Shows the history including change diffs, but only from the
Junio C Hamanob73af6c2013-12-03 22:07:114705 &#8220;main branch&#8221; perspective, skipping commits that come from merged
Junio C Hamano31667362010-03-25 00:38:534706 branches, and showing full diffs of changes introduced by the merges.
4707 This makes sense only when following a strict policy of merging all
4708 topic branches when staying on a single integration branch.
4709</p>
4710</dd>
Junio C Hamano693e7092012-09-12 22:56:534711<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514712<code>git log -L '/int main/',/^}/:main.c</code>
Junio C Hamano7e590a12013-06-02 23:46:524713</dt>
4714<dd>
4715<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514716 Shows how the function <code>main()</code> in the file <code>main.c</code> evolved
Junio C Hamano7e590a12013-06-02 23:46:524717 over time.
4718</p>
4719</dd>
4720<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514721<code>git log -3</code>
Junio C Hamano693e7092012-09-12 22:56:534722</dt>
4723<dd>
4724<p>
4725 Limits the number of commits to show to 3.
4726</p>
4727</dd>
Junio C Hamanoba4b9282008-07-06 05:20:314728</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:234729</div>
Junio C Hamano9629d4f2012-12-19 00:28:274730</div>
4731<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594732<h2 id="_discussion">DISCUSSION</h2>
Junio C Hamano775a0f42006-12-31 01:19:144733<div class="sectionbody">
Junio C Hamanod7ed4042015-08-03 19:43:004734<div class="paragraph"><p>Git is to some extent character encoding agnostic.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594735<div class="ulist"><ul>
Junio C Hamano775a0f42006-12-31 01:19:144736<li>
4737<p>
Junio C Hamano54bf1e22008-12-20 06:30:114738The contents of the blob objects are uninterpreted sequences
Junio C Hamano775a0f42006-12-31 01:19:144739 of bytes. There is no encoding translation at the core
4740 level.
4741</p>
4742</li>
4743<li>
4744<p>
Junio C Hamanod7ed4042015-08-03 19:43:004745Path names are encoded in UTF-8 normalization form C. This
4746 applies to tree objects, the index file, ref names, as well as
4747 path names in command line arguments, environment variables
4748 and config files (<code>.git/config</code> (see <a href="git-config.html">git-config(1)</a>),
4749 <a href="gitignore.html">gitignore(5)</a>, <a href="gitattributes.html">gitattributes(5)</a> and
4750 <a href="gitmodules.html">gitmodules(5)</a>).
4751</p>
4752<div class="paragraph"><p>Note that Git at the core level treats path names simply as
4753sequences of non-NUL bytes, there are no path name encoding
4754conversions (except on Mac and Windows). Therefore, using
4755non-ASCII path names will mostly work even on platforms and file
4756systems that use legacy extended ASCII encodings. However,
4757repositories created on such systems will not work properly on
4758UTF-8-based systems (e.g. Linux, Mac, Windows) and vice versa.
4759Additionally, many Git-based tools simply assume path names to
4760be UTF-8 and will fail to display other encodings correctly.</p></div>
4761</li>
4762<li>
4763<p>
4764Commit log messages are typically encoded in UTF-8, but other
4765 extended ASCII encodings are also supported. This includes
4766 ISO-8859-x, CP125x and many others, but <em>not</em> UTF-16/32,
4767 EBCDIC and CJK multi-byte encodings (GBK, Shift-JIS, Big5,
4768 EUC-x, CP9xx etc.).
Junio C Hamano775a0f42006-12-31 01:19:144769</p>
4770</li>
Junio C Hamanoba4b9282008-07-06 05:20:314771</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:594772<div class="paragraph"><p>Although we encourage that the commit log messages are encoded
Junio C Hamano076ffcc2013-02-06 05:13:214773in UTF-8, both the core and Git Porcelain are designed not to
Junio C Hamano775a0f42006-12-31 01:19:144774force UTF-8 on projects. If all participants of a particular
Junio C Hamano076ffcc2013-02-06 05:13:214775project find it more convenient to use legacy encodings, Git
Junio C Hamano775a0f42006-12-31 01:19:144776does not forbid it. However, there are a few things to keep in
Junio C Hamanoba4b9282008-07-06 05:20:314777mind.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594778<div class="olist arabic"><ol class="arabic">
Junio C Hamano775a0f42006-12-31 01:19:144779<li>
4780<p>
Junio C Hamano1aa40d22010-01-21 17:46:434781<em>git commit</em> and <em>git commit-tree</em> issues
Junio C Hamano14b76482008-01-05 10:32:264782 a warning if the commit log message given to it does not look
Junio C Hamano775a0f42006-12-31 01:19:144783 like a valid UTF-8 string, unless you explicitly say your
4784 project uses a legacy encoding. The way to say this is to
Junio C Hamanoac12f0e2014-09-19 22:32:514785 have i18n.commitencoding in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:144786</p>
4787<div class="listingblock">
4788<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514789<pre><code>[i18n]
Junio C Hamanobb34c102017-07-21 22:42:284790 commitEncoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:144791</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594792<div class="paragraph"><p>Commit objects created with the above setting record the value
Junio C Hamanobb34c102017-07-21 22:42:284793of <code>i18n.commitEncoding</code> in its <code>encoding</code> header. This is to
Junio C Hamano775a0f42006-12-31 01:19:144794help other people who look at them later. Lack of this header
Junio C Hamanoba4b9282008-07-06 05:20:314795implies that the commit log message is encoded in UTF-8.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144796</li>
4797<li>
4798<p>
Junio C Hamano1aa40d22010-01-21 17:46:434799<em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
Junio C Hamanoac12f0e2014-09-19 22:32:514800 <code>encoding</code> header of a commit object, and try to re-code the
Junio C Hamanoaa17c7c2008-11-03 04:36:584801 log message into UTF-8 unless otherwise specified. You can
Junio C Hamano775a0f42006-12-31 01:19:144802 specify the desired output encoding with
Junio C Hamanobb34c102017-07-21 22:42:284803 <code>i18n.logOutputEncoding</code> in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:144804</p>
4805<div class="listingblock">
4806<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514807<pre><code>[i18n]
Junio C Hamanobb34c102017-07-21 22:42:284808 logOutputEncoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:144809</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594810<div class="paragraph"><p>If you do not have this configuration variable, the value of
Junio C Hamanobb34c102017-07-21 22:42:284811<code>i18n.commitEncoding</code> is used instead.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144812</li>
Junio C Hamanoba4b9282008-07-06 05:20:314813</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:594814<div class="paragraph"><p>Note that we deliberately chose not to re-code the commit log
Junio C Hamano775a0f42006-12-31 01:19:144815message when a commit is made to force UTF-8 at the commit
4816object level, because re-coding to UTF-8 is not necessarily a
Junio C Hamanoba4b9282008-07-06 05:20:314817reversible operation.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144818</div>
Junio C Hamano9629d4f2012-12-19 00:28:274819</div>
4820<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594821<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamanoa574a092010-06-13 19:57:104822<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:234823<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:104824for settings related to diff generation.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594825<div class="dlist"><dl>
4826<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104827format.pretty
4828</dt>
4829<dd>
4830<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514831 Default for the <code>--format</code> option. (See <em>Pretty Formats</em> above.)
4832 Defaults to <code>medium</code>.
Junio C Hamanoa574a092010-06-13 19:57:104833</p>
4834</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594835<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104836i18n.logOutputEncoding
4837</dt>
4838<dd>
4839<p>
Junio C Hamanob73af6c2013-12-03 22:07:114840 Encoding to use when displaying logs. (See <em>Discussion</em> above.)
Junio C Hamanoac12f0e2014-09-19 22:32:514841 Defaults to the value of <code>i18n.commitEncoding</code> if set, and UTF-8
Junio C Hamanoa574a092010-06-13 19:57:104842 otherwise.
4843</p>
4844</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594845<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104846log.date
4847</dt>
4848<dd>
4849<p>
4850 Default format for human-readable dates. (Compare the
Junio C Hamanoac12f0e2014-09-19 22:32:514851 <code>--date</code> option.) Defaults to "default", which means to write
4852 dates like <code>Sat May 8 19:35:34 2010 -0500</code>.
Junio C Hamanoa574a092010-06-13 19:57:104853</p>
Junio C Hamano23168ef2019-02-07 07:20:474854<div class="paragraph"><p>If the format is set to "auto:foo" and the pager is in use, format
4855"foo" will be the used for the date format. Otherwise "default" will
4856be used.</p></div>
Junio C Hamanoa574a092010-06-13 19:57:104857</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594858<dt class="hdlist1">
Junio C Hamanod7ed4042015-08-03 19:43:004859log.follow
4860</dt>
4861<dd>
4862<p>
Junio C Hamanob0a1e832015-10-15 23:08:314863 If <code>true</code>, <code>git log</code> will act as if the <code>--follow</code> option was used when
4864 a single &lt;path&gt; is given. This has the same limitations as <code>--follow</code>,
4865 i.e. it cannot be used to follow multiple files and does not work well
4866 on non-linear history.
Junio C Hamanod7ed4042015-08-03 19:43:004867</p>
4868</dd>
4869<dt class="hdlist1">
Junio C Hamano322c6242015-03-23 21:32:464870log.showRoot
Junio C Hamanoa574a092010-06-13 19:57:104871</dt>
4872<dd>
4873<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514874 If <code>false</code>, <code>git log</code> and related commands will not treat the
Junio C Hamanoa574a092010-06-13 19:57:104875 initial commit as a big creation event. Any root commits in
Junio C Hamanoac12f0e2014-09-19 22:32:514876 <code>git log -p</code> output would be shown without a diff attached.
4877 The default is <code>true</code>.
Junio C Hamanoa574a092010-06-13 19:57:104878</p>
4879</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594880<dt class="hdlist1">
Junio C Hamano48931e22016-07-11 20:08:474881log.showSignature
4882</dt>
4883<dd>
4884<p>
4885 If <code>true</code>, <code>git log</code> and related commands will act as if the
4886 <code>--show-signature</code> option was passed to them.
4887</p>
4888</dd>
4889<dt class="hdlist1">
Junio C Hamanoabad6da2013-01-06 09:06:324890mailmap.*
Junio C Hamanoa574a092010-06-13 19:57:104891</dt>
4892<dd>
4893<p>
Junio C Hamanoa28a9202012-06-21 07:08:234894 See <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanoa574a092010-06-13 19:57:104895</p>
4896</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594897<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104898notes.displayRef
4899</dt>
4900<dd>
4901<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514902 Which refs, in addition to the default set by <code>core.notesRef</code>
Junio C Hamano042f2142016-06-27 18:05:054903 or <code>GIT_NOTES_REF</code>, to read notes from when showing commit
Junio C Hamanoac12f0e2014-09-19 22:32:514904 messages with the <code>log</code> family of commands. See
Junio C Hamanoa28a9202012-06-21 07:08:234905 <a href="git-notes.html">git-notes(1)</a>.
Junio C Hamanoa574a092010-06-13 19:57:104906</p>
Junio C Hamano68cf15a2010-11-06 01:01:594907<div class="paragraph"><p>May be an unabbreviated ref name or a glob and may be specified
Junio C Hamanoa574a092010-06-13 19:57:104908multiple times. A warning will be issued for refs that do not exist,
4909but a glob that does not match any refs is silently ignored.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514910<div class="paragraph"><p>This setting can be disabled by the <code>--no-notes</code> option,
Junio C Hamano042f2142016-06-27 18:05:054911overridden by the <code>GIT_NOTES_DISPLAY_REF</code> environment variable,
Junio C Hamanoac12f0e2014-09-19 22:32:514912and overridden by the <code>--notes=&lt;ref&gt;</code> option.</p></div>
Junio C Hamanoa574a092010-06-13 19:57:104913</dd>
4914</dl></div>
4915</div>
Junio C Hamano9629d4f2012-12-19 00:28:274916</div>
4917<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:314918<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:234919<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:234920<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:234921</div>
Junio C Hamano7bd050f2011-09-22 06:32:224922</div>
Junio C Hamano9629d4f2012-12-19 00:28:274923</div>
Junio C Hamano7bd050f2011-09-22 06:32:224924<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:234925<div id="footer">
4926<div id="footer-text">
Junio C Hamano2ef0ba32018-01-26 23:13:534927Last updated
Junio C Hamano8ef91f32019-12-01 22:58:274928 2019-07-25 15:23:52 PDT
Junio C Hamano1a4e8412005-12-27 08:17:234929</div>
4930</div>
4931</body>
4932</html>