blob: 6edf97b58942fd4e2b6d8136479151d331318965 [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}
Junio C Hamano725b0da2020-01-22 22:02:40439/* Because the table frame attribute is overridden by CSS in most browsers. */
Junio C Hamano9629d4f2012-12-19 00:28:27440div.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
Junio C Hamano68793842020-01-06 23:07:09867 give zero or one positive revision arguments, and
868 &lt;start&gt; and &lt;end&gt; (or &lt;funcname&gt;) must exist in the starting revision.
869 You can specify this option more than once. Implies <code>--patch</code>.
870 Patch output can be suppressed using <code>--no-patch</code>, but other diff formats
871 (namely <code>--raw</code>, <code>--numstat</code>, <code>--shortstat</code>, <code>--dirstat</code>, <code>--summary</code>,
872 <code>--name-only</code>, <code>--name-status</code>, <code>--check</code>) are not currently implemented.
Junio C Hamano7e590a12013-06-02 23:46:52873</p>
874<div class="paragraph"><p>&lt;start&gt; and &lt;end&gt; can take one of these forms:</p></div>
875<div class="ulist"><ul>
876<li>
877<p>
878number
879</p>
880<div class="paragraph"><p>If &lt;start&gt; or &lt;end&gt; is a number, it specifies an
881absolute line number (lines count from 1).</p></div>
882</li>
883<li>
884<p>
885/regex/
886</p>
887<div class="paragraph"><p>This form will use the first line matching the given
Junio C Hamano8eac2682013-09-09 22:35:20888POSIX regex. If &lt;start&gt; is a regex, it will search from the end of
Junio C Hamanoac12f0e2014-09-19 22:32:51889the previous <code>-L</code> range, if any, otherwise from the start of file.
Junio C Hamano8eac2682013-09-09 22:35:20890If &lt;start&gt; is &#8220;^/regex/&#8221;, it will search from the start of file.
891If &lt;end&gt; is a regex, it will search
Junio C Hamano7e590a12013-06-02 23:46:52892starting at the line given by &lt;start&gt;.</p></div>
893</li>
894<li>
895<p>
896+offset or -offset
897</p>
898<div class="paragraph"><p>This is only valid for &lt;end&gt; and will specify a number
899of lines before or after the line given by &lt;start&gt;.</p></div>
900</li>
Junio C Hamano7e590a12013-06-02 23:46:52901</ul></div>
Junio C Hamanodd5004a2015-05-06 19:33:32902<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
903regular expression that denotes the range from the first funcname line
904that matches &lt;funcname&gt;, up to the next funcname line. &#8220;:&lt;funcname&gt;&#8221;
905searches from the end of the previous <code>-L</code> range, if any, otherwise
906from the start of file. &#8220;^:&lt;funcname&gt;&#8221; searches from the start of
907file.</p></div>
Junio C Hamano7e590a12013-06-02 23:46:52908</dd>
909<dt class="hdlist1">
Junio C Hamanof26c77e2013-04-27 00:06:04910&lt;revision range&gt;
911</dt>
912<dd>
913<p>
914 Show only commits in the specified revision range. When no
Junio C Hamanoac12f0e2014-09-19 22:32:51915 &lt;revision range&gt; is specified, it defaults to <code>HEAD</code> (i.e. the
916 whole history leading to the current commit). <code>origin..HEAD</code>
Junio C Hamanof26c77e2013-04-27 00:06:04917 specifies all the commits reachable from the current commit
Junio C Hamanoac12f0e2014-09-19 22:32:51918 (i.e. <code>HEAD</code>), but not from <code>origin</code>. For a complete list of
Junio C Hamanob73af6c2013-12-03 22:07:11919 ways to spell &lt;revision range&gt;, see the <em>Specifying Ranges</em>
Junio C Hamanof26c77e2013-04-27 00:06:04920 section of <a href="gitrevisions.html">gitrevisions(7)</a>.
921</p>
922</dd>
923<dt class="hdlist1">
Junio C Hamano78e3a782010-07-15 22:24:45924[--] &lt;path&gt;&#8230;
925</dt>
926<dd>
927<p>
Junio C Hamano5723afa2011-08-31 00:49:23928 Show only commits that are enough to explain how the files
Junio C Hamanob73af6c2013-12-03 22:07:11929 that match the specified paths came to be. See <em>History
930 Simplification</em> below for details and other simplification
Junio C Hamano5723afa2011-08-31 00:49:23931 modes.
Junio C Hamano78e3a782010-07-15 22:24:45932</p>
Junio C Hamanoccb82522018-05-08 07:52:09933<div class="paragraph"><p>Paths may need to be prefixed with <code>--</code> to separate them from
Junio C Hamanof26c77e2013-04-27 00:06:04934options or the revision range, when confusion arises.</p></div>
Junio C Hamano78e3a782010-07-15 22:24:45935</dd>
936</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:27937<div class="sect2">
938<h3 id="_commit_limiting">Commit Limiting</h3>
Junio C Hamano68cf15a2010-11-06 01:01:59939<div class="paragraph"><p>Besides specifying a range of commits that should be listed using the
Junio C Hamanob0e02952008-01-19 08:02:00940special notations explained in the description, additional commit
Junio C Hamano8ce35d72012-09-18 22:30:42941limiting may be applied.</p></div>
942<div class="paragraph"><p>Using more options generally further limits the output (e.g.
Junio C Hamanoac12f0e2014-09-19 22:32:51943<code>--since=&lt;date1&gt;</code> limits to commits newer than <code>&lt;date1&gt;</code>, and using it
944with <code>--grep=&lt;pattern&gt;</code> further limits to commits whose log message
945has a line that matches <code>&lt;pattern&gt;</code>), unless otherwise noted.</p></div>
Junio C Hamano8ce35d72012-09-18 22:30:42946<div class="paragraph"><p>Note that these are applied before commit
Junio C Hamanoac12f0e2014-09-19 22:32:51947ordering and formatting options, such as <code>--reverse</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59948<div class="dlist"><dl>
949<dt class="hdlist1">
Junio C Hamano693e7092012-09-12 22:56:53950-&lt;number&gt;
951</dt>
952<dt class="hdlist1">
953-n &lt;number&gt;
Junio C Hamanoeb415992008-06-08 22:49:47954</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59955<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32956--max-count=&lt;number&gt;
Junio C Hamanob0e02952008-01-19 08:02:00957</dt>
958<dd>
959<p>
Junio C Hamanoc5be4cc2011-03-09 07:20:43960 Limit the number of commits to output.
Junio C Hamanob0e02952008-01-19 08:02:00961</p>
962</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59963<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32964--skip=&lt;number&gt;
Junio C Hamanob0e02952008-01-19 08:02:00965</dt>
966<dd>
967<p>
968 Skip <em>number</em> commits before starting to show the commit output.
969</p>
970</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59971<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32972--since=&lt;date&gt;
Junio C Hamanoeb415992008-06-08 22:49:47973</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59974<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32975--after=&lt;date&gt;
Junio C Hamanob0e02952008-01-19 08:02:00976</dt>
977<dd>
978<p>
979 Show commits more recent than a specific date.
980</p>
981</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59982<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32983--until=&lt;date&gt;
Junio C Hamanoeb415992008-06-08 22:49:47984</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59985<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32986--before=&lt;date&gt;
Junio C Hamanob0e02952008-01-19 08:02:00987</dt>
988<dd>
989<p>
990 Show commits older than a specific date.
991</p>
992</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59993<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32994--author=&lt;pattern&gt;
Junio C Hamanoeb415992008-06-08 22:49:47995</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59996<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32997--committer=&lt;pattern&gt;
Junio C Hamanob0e02952008-01-19 08:02:00998</dt>
999<dd>
1000<p>
1001 Limit the commits output to ones with author/committer
Junio C Hamano8ce35d72012-09-18 22:30:421002 header lines that match the specified pattern (regular
Junio C Hamanoac12f0e2014-09-19 22:32:511003 expression). With more than one <code>--author=&lt;pattern&gt;</code>,
Junio C Hamano8ce35d72012-09-18 22:30:421004 commits whose author matches any of the given patterns are
Junio C Hamanoac12f0e2014-09-19 22:32:511005 chosen (similarly for multiple <code>--committer=&lt;pattern&gt;</code>).
Junio C Hamanob0e02952008-01-19 08:02:001006</p>
1007</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591008<dt class="hdlist1">
Junio C Hamano9954ed72012-10-03 04:54:001009--grep-reflog=&lt;pattern&gt;
1010</dt>
1011<dd>
1012<p>
1013 Limit the commits output to ones with reflog entries that
1014 match the specified pattern (regular expression). With
Junio C Hamanoac12f0e2014-09-19 22:32:511015 more than one <code>--grep-reflog</code>, commits whose reflog message
Junio C Hamano9954ed72012-10-03 04:54:001016 matches any of the given patterns are chosen. It is an
Junio C Hamanoac12f0e2014-09-19 22:32:511017 error to use this option unless <code>--walk-reflogs</code> is in use.
Junio C Hamano9954ed72012-10-03 04:54:001018</p>
1019</dd>
1020<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:321021--grep=&lt;pattern&gt;
Junio C Hamanob0e02952008-01-19 08:02:001022</dt>
1023<dd>
1024<p>
1025 Limit the commits output to ones with log message that
Junio C Hamano8ce35d72012-09-18 22:30:421026 matches the specified pattern (regular expression). With
Junio C Hamanoac12f0e2014-09-19 22:32:511027 more than one <code>--grep=&lt;pattern&gt;</code>, commits whose message
Junio C Hamano8ce35d72012-09-18 22:30:421028 matches any of the given patterns are chosen (but see
Junio C Hamanoac12f0e2014-09-19 22:32:511029 <code>--all-match</code>).
Junio C Hamanob0e02952008-01-19 08:02:001030</p>
Junio C Hamanob3f862c2019-12-05 22:22:001031<div class="paragraph"><p>When <code>--notes</code> is in effect, the message from the notes is
Junio C Hamano8152abf2015-04-28 22:48:021032matched as if it were part of the log message.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001033</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591034<dt class="hdlist1">
Junio C Hamanoaa17c7c2008-11-03 04:36:581035--all-match
1036</dt>
1037<dd>
1038<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511039 Limit the commits output to ones that match all given <code>--grep</code>,
Junio C Hamano8ce35d72012-09-18 22:30:421040 instead of ones that match at least one.
Junio C Hamanoaa17c7c2008-11-03 04:36:581041</p>
1042</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591043<dt class="hdlist1">
Junio C Hamano6bb32e62015-02-17 22:11:261044--invert-grep
1045</dt>
1046<dd>
1047<p>
1048 Limit the commits output to ones with log message that do not
1049 match the pattern specified with <code>--grep=&lt;pattern&gt;</code>.
1050</p>
1051</dd>
1052<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471053-i
1054</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591055<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471056--regexp-ignore-case
Junio C Hamanob0e02952008-01-19 08:02:001057</dt>
1058<dd>
1059<p>
Junio C Hamanob73af6c2013-12-03 22:07:111060 Match the regular expression limiting patterns without regard to letter
1061 case.
Junio C Hamanob0e02952008-01-19 08:02:001062</p>
1063</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591064<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:041065--basic-regexp
1066</dt>
1067<dd>
1068<p>
1069 Consider the limiting patterns to be basic regular expressions;
1070 this is the default.
1071</p>
1072</dd>
1073<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471074-E
1075</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591076<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471077--extended-regexp
Junio C Hamanob0e02952008-01-19 08:02:001078</dt>
1079<dd>
1080<p>
1081 Consider the limiting patterns to be extended regular expressions
1082 instead of the default basic regular expressions.
1083</p>
1084</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591085<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471086-F
1087</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591088<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471089--fixed-strings
Junio C Hamano24bc09a2008-02-28 00:27:441090</dt>
1091<dd>
1092<p>
Junio C Hamano68cf15a2010-11-06 01:01:591093 Consider the limiting patterns to be fixed strings (don&#8217;t interpret
Junio C Hamano24bc09a2008-02-28 00:27:441094 pattern as a regular expression).
1095</p>
1096</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591097<dt class="hdlist1">
Junio C Hamanoa275c1f2017-06-19 20:10:121098-P
1099</dt>
1100<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:041101--perl-regexp
1102</dt>
1103<dd>
1104<p>
Junio C Hamano222ed822017-06-02 06:24:061105 Consider the limiting patterns to be Perl-compatible regular
1106 expressions.
Junio C Hamanoa1295452012-11-13 22:32:041107</p>
Junio C Hamano222ed822017-06-02 06:24:061108<div class="paragraph"><p>Support for these types of regular expressions is an optional
1109compile-time dependency. If Git wasn&#8217;t compiled with support for them
1110providing this option will cause it to die.</p></div>
Junio C Hamanoa1295452012-11-13 22:32:041111</dd>
1112<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001113--remove-empty
1114</dt>
1115<dd>
1116<p>
1117 Stop when a given path disappears from the tree.
1118</p>
1119</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591120<dt class="hdlist1">
Junio C Hamano934e1782009-07-16 06:59:151121--merges
1122</dt>
1123<dd>
1124<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511125 Print only merge commits. This is exactly the same as <code>--min-parents=2</code>.
Junio C Hamano934e1782009-07-16 06:59:151126</p>
1127</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591128<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001129--no-merges
1130</dt>
1131<dd>
1132<p>
Junio C Hamanof32ce262011-03-27 07:35:111133 Do not print commits with more than one parent. This is
Junio C Hamanoac12f0e2014-09-19 22:32:511134 exactly the same as <code>--max-parents=1</code>.
Junio C Hamanob0e02952008-01-19 08:02:001135</p>
1136</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591137<dt class="hdlist1">
Junio C Hamanof32ce262011-03-27 07:35:111138--min-parents=&lt;number&gt;
1139</dt>
1140<dt class="hdlist1">
1141--max-parents=&lt;number&gt;
1142</dt>
1143<dt class="hdlist1">
1144--no-min-parents
1145</dt>
1146<dt class="hdlist1">
1147--no-max-parents
1148</dt>
1149<dd>
1150<p>
Junio C Hamanoc5bb3b32013-08-05 22:43:361151 Show only commits which have at least (or at most) that many parent
Junio C Hamanoac12f0e2014-09-19 22:32:511152 commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>,
1153 <code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code>
1154 gives all root commits and <code>--min-parents=3</code> all octopus merges.
Junio C Hamanof32ce262011-03-27 07:35:111155</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511156<div class="paragraph"><p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit)
1157again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more
1158parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p></div>
Junio C Hamanof32ce262011-03-27 07:35:111159</dd>
1160<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001161--first-parent
1162</dt>
1163<dd>
1164<p>
1165 Follow only the first parent commit upon seeing a merge
1166 commit. This option can give a better overview when
1167 viewing the evolution of a particular topic branch,
1168 because merges into a topic branch tend to be only about
1169 adjusting to updated upstream from time to time, and
1170 this option allows you to ignore the individual commits
Junio C Hamanoef57d1e2015-03-25 21:23:001171 brought in to your history by such a merge. Cannot be
1172 combined with --bisect.
Junio C Hamanob0e02952008-01-19 08:02:001173</p>
1174</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591175<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001176--not
1177</dt>
1178<dd>
1179<p>
1180 Reverses the meaning of the <em>&#94;</em> prefix (or lack thereof)
Junio C Hamanoac12f0e2014-09-19 22:32:511181 for all following revision specifiers, up to the next <code>--not</code>.
Junio C Hamanob0e02952008-01-19 08:02:001182</p>
1183</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591184<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001185--all
1186</dt>
1187<dd>
1188<p>
Junio C Hamanoe89102f2017-02-15 23:18:151189 Pretend as if all the refs in <code>refs/</code>, along with <code>HEAD</code>, are
1190 listed on the command line as <em>&lt;commit&gt;</em>.
Junio C Hamanob0e02952008-01-19 08:02:001191</p>
1192</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591193<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171194--branches[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561195</dt>
1196<dd>
1197<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511198 Pretend as if all the refs in <code>refs/heads</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171199 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:501200 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
Junio C Hamano81d540a2012-03-02 19:52:471201 <em>&#42;</em>, or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561202</p>
1203</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591204<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171205--tags[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561206</dt>
1207<dd>
1208<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511209 Pretend as if all the refs in <code>refs/tags</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171210 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:471211 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>&#42;</em>,
1212 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561213</p>
1214</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591215<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171216--remotes[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561217</dt>
1218<dd>
1219<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511220 Pretend as if all the refs in <code>refs/remotes</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171221 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:071222 remote-tracking branches to ones matching given shell glob.
Junio C Hamano81d540a2012-03-02 19:52:471223 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:501224</p>
1225</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591226<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171227--glob=&lt;glob-pattern&gt;
Junio C Hamano57827fb2010-01-23 03:02:501228</dt>
1229<dd>
1230<p>
Junio C Hamanod2179ef2010-10-22 04:12:171231 Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
Junio C Hamano57827fb2010-01-23 03:02:501232 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
Junio C Hamano81d540a2012-03-02 19:52:471233 is automatically prepended if missing. If pattern lacks <em>?</em>, <em>&#42;</em>,
1234 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561235</p>
1236</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591237<dt class="hdlist1">
Junio C Hamanof079f702013-12-06 23:43:181238--exclude=&lt;glob-pattern&gt;
1239</dt>
1240<dd>
1241<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511242 Do not include refs matching <em>&lt;glob-pattern&gt;</em> that the next <code>--all</code>,
1243 <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or <code>--glob</code> would otherwise
Junio C Hamanof079f702013-12-06 23:43:181244 consider. Repetitions of this option accumulate exclusion patterns
Junio C Hamanoac12f0e2014-09-19 22:32:511245 up to the next <code>--all</code>, <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or
1246 <code>--glob</code> option (other options or arguments do not clear
Junio C Hamanofb5ffde2014-11-04 22:38:561247 accumulated patterns).
Junio C Hamanof079f702013-12-06 23:43:181248</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511249<div class="paragraph"><p>The patterns given should not begin with <code>refs/heads</code>, <code>refs/tags</code>, or
1250<code>refs/remotes</code> when applied to <code>--branches</code>, <code>--tags</code>, or <code>--remotes</code>,
1251respectively, and they must begin with <code>refs/</code> when applied to <code>--glob</code>
1252or <code>--all</code>. If a trailing <em>/&#42;</em> is intended, it must be given
Junio C Hamanof079f702013-12-06 23:43:181253explicitly.</p></div>
1254</dd>
1255<dt class="hdlist1">
Junio C Hamano2a4bcbc2014-10-29 20:07:391256--reflog
1257</dt>
1258<dd>
1259<p>
1260 Pretend as if all objects mentioned by reflogs are listed on the
1261 command line as <code>&lt;commit&gt;</code>.
1262</p>
1263</dd>
1264<dt class="hdlist1">
Junio C Hamanoa42e0332019-07-19 19:49:371265--alternate-refs
1266</dt>
1267<dd>
1268<p>
1269 Pretend as if all objects mentioned as ref tips of alternate
1270 repositories were listed on the command line. An alternate
1271 repository is any repository whose object directory is specified
1272 in <code>objects/info/alternates</code>. The set of included objects may
1273 be modified by <code>core.alternateRefsCommand</code>, etc. See
1274 <a href="git-config.html">git-config(1)</a>.
1275</p>
1276</dd>
1277<dt class="hdlist1">
Junio C Hamano8d57fa92017-09-19 05:01:081278--single-worktree
1279</dt>
1280<dd>
1281<p>
1282 By default, all working trees will be examined by the
1283 following options when there are more than one (see
1284 <a href="git-worktree.html">git-worktree(1)</a>): <code>--all</code>, <code>--reflog</code> and
1285 <code>--indexed-objects</code>.
1286 This option forces them to examine the current working tree
1287 only.
1288</p>
1289</dd>
1290<dt class="hdlist1">
Junio C Hamano084228c2011-05-30 08:13:521291--ignore-missing
1292</dt>
1293<dd>
1294<p>
1295 Upon seeing an invalid object name in the input, pretend as if
1296 the bad input was not given.
1297</p>
1298</dd>
1299<dt class="hdlist1">
Junio C Hamano5706e0b2009-11-24 10:54:161300--bisect
1301</dt>
1302<dd>
1303<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511304 Pretend as if the bad bisection ref <code>refs/bisect/bad</code>
1305 was listed and as if it was followed by <code>--not</code> and the good
1306 bisection refs <code>refs/bisect/good-*</code> on the command
Junio C Hamanoef57d1e2015-03-25 21:23:001307 line. Cannot be combined with --first-parent.
Junio C Hamano5706e0b2009-11-24 10:54:161308</p>
1309</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591310<dt class="hdlist1">
Junio C Hamano5706e0b2009-11-24 10:54:161311--stdin
1312</dt>
1313<dd>
1314<p>
1315 In addition to the <em>&lt;commit&gt;</em> listed on the command
Junio C Hamano92d80372016-07-13 22:00:051316 line, read them from the standard input. If a <code>--</code> separator is
Junio C Hamano5706e0b2009-11-24 10:54:161317 seen, stop reading commits and start reading paths to limit the
1318 result.
1319</p>
1320</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591321<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151322--cherry-mark
1323</dt>
1324<dd>
1325<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511326 Like <code>--cherry-pick</code> (see below) but mark equivalent commits
1327 with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151328</p>
1329</dd>
1330<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001331--cherry-pick
1332</dt>
1333<dd>
1334<p>
1335 Omit any commit that introduces the same change as
Junio C Hamanob73af6c2013-12-03 22:07:111336 another commit on the &#8220;other side&#8221; when the set of
Junio C Hamano68cf15a2010-11-06 01:01:591337 commits are limited with symmetric difference.
1338</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511339<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:001340to list all commits on only one side of them is with
Junio C Hamanoac12f0e2014-09-19 22:32:511341<code>--left-right</code> (see the example below in the description of
1342the <code>--left-right</code> option). However, it shows the commits that were
Junio C Hamanob73af6c2013-12-03 22:07:111343cherry-picked from the other branch (for example, &#8220;3rd on b&#8221; may be
1344cherry-picked from branch A). With this option, such pairs of commits are
Junio C Hamano68cf15a2010-11-06 01:01:591345excluded from the output.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001346</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591347<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151348--left-only
1349</dt>
1350<dt class="hdlist1">
1351--right-only
1352</dt>
1353<dd>
1354<p>
Junio C Hamanocd451662016-09-13 00:54:091355 List only commits on the respective side of a symmetric difference,
Junio C Hamanoac12f0e2014-09-19 22:32:511356 i.e. only those which would be marked <code>&lt;</code> resp. <code>&gt;</code> by
1357 <code>--left-right</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151358</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511359<div class="paragraph"><p>For example, <code>--cherry-pick --right-only A...B</code> omits those
1360commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in
1361<code>A</code>. In other words, this lists the <code>+</code> commits from <code>git cherry A B</code>.
1362More precisely, <code>--cherry-pick --right-only --no-merges</code> gives the exact
Junio C Hamano9a2fb2d2011-03-23 05:40:151363list.</p></div>
1364</dd>
1365<dt class="hdlist1">
1366--cherry
1367</dt>
1368<dd>
1369<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511370 A synonym for <code>--right-only --cherry-mark --no-merges</code>; useful to
Junio C Hamano9a2fb2d2011-03-23 05:40:151371 limit the output to the commits on our side and mark those that
1372 have been applied to the other side of a forked history with
Junio C Hamanoac12f0e2014-09-19 22:32:511373 <code>git log --cherry upstream...mybranch</code>, similar to
1374 <code>git cherry upstream mybranch</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151375</p>
1376</dd>
1377<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471378-g
1379</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591380<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471381--walk-reflogs
Junio C Hamanob0e02952008-01-19 08:02:001382</dt>
1383<dd>
1384<p>
1385 Instead of walking the commit ancestry chain, walk
1386 reflog entries from the most recent one to older ones.
1387 When this option is used you cannot specify commits to
1388 exclude (that is, <em>&#94;commit</em>, <em>commit1..commit2</em>,
Junio C Hamanod75148a2014-04-08 19:48:381389 and <em>commit1...commit2</em> notations cannot be used).
Junio C Hamano68cf15a2010-11-06 01:01:591390</p>
Junio C Hamanob4896852019-12-10 23:15:091391<div class="paragraph"><p>With <code>--pretty</code> format other than <code>oneline</code> and <code>reference</code> (for obvious reasons),
Junio C Hamanob0e02952008-01-19 08:02:001392this causes the output to have two extra lines of information
Junio C Hamanoe548d1b2016-08-08 22:26:491393taken from the reflog. The reflog designator in the output may be shown
1394as <code>ref@{Nth}</code> (where <code>Nth</code> is the reverse-chronological index in the
1395reflog) or as <code>ref@{timestamp}</code> (with the timestamp for that entry),
1396depending on a few rules:</p></div>
1397<div class="openblock">
1398<div class="content">
1399<div class="olist arabic"><ol class="arabic">
1400<li>
1401<p>
1402If the starting point is specified as <code>ref@{Nth}</code>, show the index
Junio C Hamano2567b322019-02-05 23:33:561403 format.
Junio C Hamanoe548d1b2016-08-08 22:26:491404</p>
1405</li>
1406<li>
1407<p>
1408If the starting point was specified as <code>ref@{now}</code>, show the
Junio C Hamano2567b322019-02-05 23:33:561409 timestamp format.
Junio C Hamanoe548d1b2016-08-08 22:26:491410</p>
1411</li>
1412<li>
1413<p>
1414If neither was used, but <code>--date</code> was given on the command line, show
Junio C Hamano2567b322019-02-05 23:33:561415 the timestamp in the format requested by <code>--date</code>.
Junio C Hamanoe548d1b2016-08-08 22:26:491416</p>
1417</li>
1418<li>
1419<p>
1420Otherwise, show the index format.
1421</p>
1422</li>
1423</ol></div>
1424</div></div>
1425<div class="paragraph"><p>Under <code>--pretty=oneline</code>, the commit message is
Junio C Hamanob0e02952008-01-19 08:02:001426prefixed with this information on the same line.
Junio C Hamanoac12f0e2014-09-19 22:32:511427This option cannot be combined with <code>--reverse</code>.
Junio C Hamanoa28a9202012-06-21 07:08:231428See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div>
Junio C Hamanob4896852019-12-10 23:15:091429<div class="paragraph"><p>Under <code>--pretty=reference</code>, this information will not be shown at all.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001430</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591431<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001432--merge
1433</dt>
1434<dd>
1435<p>
1436 After a failed merge, show refs that touch files having a
Junio C Hamano68cf15a2010-11-06 01:01:591437 conflict and don&#8217;t exist on all heads to merge.
Junio C Hamanob0e02952008-01-19 08:02:001438</p>
1439</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591440<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001441--boundary
1442</dt>
1443<dd>
1444<p>
Junio C Hamano27159f82013-06-14 17:19:221445 Output excluded boundary commits. Boundary commits are
Junio C Hamanoac12f0e2014-09-19 22:32:511446 prefixed with <code>-</code>.
Junio C Hamanob0e02952008-01-19 08:02:001447</p>
1448</dd>
Junio C Hamanoa76cb0d2008-08-13 20:04:101449</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271450</div>
1451<div class="sect2">
1452<h3 id="_history_simplification">History Simplification</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591453<div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the
Junio C Hamano28363492008-11-14 08:26:311454commits modifying a particular &lt;path&gt;. But there are two parts of
1455<em>History Simplification</em>, one part is selecting the commits and the other
1456is how to do it, as there are various strategies to simplify the history.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591457<div class="paragraph"><p>The following options select the commits to be shown:</p></div>
1458<div class="dlist"><dl>
1459<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311460&lt;paths&gt;
1461</dt>
1462<dd>
1463<p>
1464 Commits modifying the given &lt;paths&gt; are selected.
1465</p>
1466</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591467<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311468--simplify-by-decoration
1469</dt>
1470<dd>
1471<p>
1472 Commits that are referred by some branch or tag are selected.
1473</p>
1474</dd>
1475</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591476<div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div>
1477<div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div>
1478<div class="dlist"><dl>
1479<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311480Default mode
1481</dt>
1482<dd>
1483<p>
1484 Simplifies the history to the simplest history explaining the
1485 final state of the tree. Simplest because it prunes some side
1486 branches if the end result is the same (i.e. merging branches
1487 with the same content)
1488</p>
1489</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591490<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311491--full-history
1492</dt>
1493<dd>
1494<p>
Junio C Hamano15567bc2011-07-23 00:51:591495 Same as the default mode, but does not prune some history.
Junio C Hamano28363492008-11-14 08:26:311496</p>
1497</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591498<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311499--dense
1500</dt>
1501<dd>
1502<p>
1503 Only the selected commits are shown, plus some to have a
1504 meaningful history.
1505</p>
1506</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591507<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311508--sparse
1509</dt>
1510<dd>
1511<p>
1512 All commits in the simplified history are shown.
1513</p>
1514</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591515<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311516--simplify-merges
1517</dt>
1518<dd>
1519<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511520 Additional option to <code>--full-history</code> to remove some needless
Junio C Hamano28363492008-11-14 08:26:311521 merges from the resulting history, as there are no selected
1522 commits contributing to this merge.
1523</p>
1524</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591525<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551526--ancestry-path
1527</dt>
1528<dd>
1529<p>
1530 When given a range of commits to display (e.g. <em>commit1..commit2</em>
1531 or <em>commit2 &#94;commit1</em>), only display commits that exist
1532 directly on the ancestry chain between the <em>commit1</em> and
1533 <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>,
1534 and ancestors of <em>commit2</em>.
1535</p>
1536</dd>
Junio C Hamano28363492008-11-14 08:26:311537</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591538<div class="paragraph"><p>A more detailed explanation follows.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511539<div class="paragraph"><p>Suppose you specified <code>foo</code> as the &lt;paths&gt;. We shall call commits
1540that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff
1541filtered for <code>foo</code>, they look different and equal, respectively.)</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591542<div class="paragraph"><p>In the following, we will always refer to the same example history to
Junio C Hamanoa76cb0d2008-08-13 20:04:101543illustrate the differences between simplification settings. We assume
Junio C Hamanoac12f0e2014-09-19 22:32:511544that you are filtering for a file <code>foo</code> in this commit graph:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101545<div class="listingblock">
1546<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511547<pre><code> .-A---M---N---O---P---Q
Junio C Hamano27159f82013-06-14 17:19:221548 / / / / / /
1549 I B C D E Y
1550 \ / / / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511551 `-------------' X</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101552</div></div>
Junio C Hamano27159f82013-06-14 17:19:221553<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:101554each merge. The commits are:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591555<div class="ulist"><ul>
Junio C Hamanoa76cb0d2008-08-13 20:04:101556<li>
1557<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511558<code>I</code> is the initial commit, in which <code>foo</code> exists with contents
1559 &#8220;asdf&#8221;, and a file <code>quux</code> exists with contents &#8220;quux&#8221;. Initial
1560 commits are compared to an empty tree, so <code>I</code> is !TREESAME.
Junio C Hamanoa76cb0d2008-08-13 20:04:101561</p>
1562</li>
1563<li>
1564<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511565In <code>A</code>, <code>foo</code> contains just &#8220;foo&#8221;.
Junio C Hamanoa76cb0d2008-08-13 20:04:101566</p>
1567</li>
1568<li>
1569<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511570<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:101571 hence TREESAME to all parents.
1572</p>
1573</li>
1574<li>
1575<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511576<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:101577 so it is not TREESAME to any parent.
1578</p>
1579</li>
1580<li>
1581<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511582<code>D</code> sets <code>foo</code> to &#8220;baz&#8221;. Its merge <code>O</code> combines the strings from
1583 <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:101584</p>
1585</li>
1586<li>
1587<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511588<code>E</code> changes <code>quux</code> to &#8220;xyzzy&#8221;, and its merge <code>P</code> combines the
1589 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:221590</p>
1591</li>
1592<li>
1593<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511594<code>X</code> is an independent root commit that added a new file <code>side</code>, and <code>Y</code>
1595 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
1596 <code>Q</code> is TREESAME to <code>P</code>, but not to <code>Y</code>.
Junio C Hamanoa76cb0d2008-08-13 20:04:101597</p>
1598</li>
1599</ul></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511600<div class="paragraph"><p><code>rev-list</code> walks backwards through history, including or excluding
1601commits based on whether <code>--full-history</code> and/or parent rewriting
1602(via <code>--parents</code> or <code>--children</code>) are used. The following settings
Junio C Hamanoa76cb0d2008-08-13 20:04:101603are available.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591604<div class="dlist"><dl>
1605<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101606Default mode
1607</dt>
1608<dd>
1609<p>
1610 Commits are included if they are not TREESAME to any parent
Junio C Hamanoac12f0e2014-09-19 22:32:511611 (though this can be changed, see <code>--sparse</code> below). If the
Junio C Hamanoa76cb0d2008-08-13 20:04:101612 commit was a merge, and it was TREESAME to one parent, follow
1613 only that parent. (Even if there are several TREESAME
1614 parents, follow only one of them.) Otherwise, follow all
1615 parents.
1616</p>
Junio C Hamano68cf15a2010-11-06 01:01:591617<div class="paragraph"><p>This results in:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101618<div class="listingblock">
1619<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511620<pre><code> .-A---N---O
Junio C Hamano89a57342010-06-22 23:22:551621 / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511622 I---------D</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101623</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591624<div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is
Junio C Hamanoac12f0e2014-09-19 22:32:511625available, removed <code>B</code> from consideration entirely. <code>C</code> was
1626considered via <code>N</code>, but is TREESAME. Root commits are compared to an
1627empty tree, so <code>I</code> is !TREESAME.</p></div>
1628<div class="paragraph"><p>Parent/child relations are only visible with <code>--parents</code>, but that does
Junio C Hamanoa76cb0d2008-08-13 20:04:101629not affect the commits selected in default mode, so we have shown the
1630parent lines.</p></div>
1631</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591632<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101633--full-history without parent rewriting
1634</dt>
1635<dd>
1636<p>
1637 This mode differs from the default in one point: always follow
1638 all parents of a merge, even if it is TREESAME to one of them.
1639 Even if more than one side of the merge has commits that are
1640 included, this does not imply that the merge itself is! In
1641 the example, we get
1642</p>
1643<div class="listingblock">
1644<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511645<pre><code> I A B N D O P Q</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101646</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511647<div class="paragraph"><p><code>M</code> was excluded because it is TREESAME to both parents. <code>E</code>,
1648<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:101649do not appear.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591650<div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk
Junio C Hamanoa76cb0d2008-08-13 20:04:101651about the parent/child relationships between the commits, so we show
1652them disconnected.</p></div>
1653</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591654<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101655--full-history with parent rewriting
1656</dt>
1657<dd>
1658<p>
1659 Ordinary commits are only included if they are !TREESAME
Junio C Hamanoac12f0e2014-09-19 22:32:511660 (though this can be changed, see <code>--sparse</code> below).
Junio C Hamanoa76cb0d2008-08-13 20:04:101661</p>
Junio C Hamano68cf15a2010-11-06 01:01:591662<div class="paragraph"><p>Merges are always included. However, their parent list is rewritten:
Junio C Hamanoa76cb0d2008-08-13 20:04:101663Along each parent, prune away commits that are not included
1664themselves. This results in</p></div>
1665<div class="listingblock">
1666<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511667<pre><code> .-A---M---N---O---P---Q
Junio C Hamanoa76cb0d2008-08-13 20:04:101668 / / / / /
1669 I B / D /
1670 \ / / / /
Junio C Hamanoac12f0e2014-09-19 22:32:511671 `-------------'</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101672</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511673<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:101674was pruned away because it is TREESAME, but the parent list of P was
Junio C Hamanoac12f0e2014-09-19 22:32:511675rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and
1676<code>N</code>, and <code>X</code>, <code>Y</code> and <code>Q</code>.</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101677</dd>
1678</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591679<div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME
Junio C Hamanoa76cb0d2008-08-13 20:04:101680affects inclusion:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591681<div class="dlist"><dl>
1682<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471683--dense
1684</dt>
Junio C Hamanoa76cb0d2008-08-13 20:04:101685<dd>
1686<p>
1687 Commits that are walked are included if they are not TREESAME
1688 to any parent.
1689</p>
1690</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591691<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471692--sparse
Junio C Hamanob0e02952008-01-19 08:02:001693</dt>
1694<dd>
1695<p>
Junio C Hamanoa76cb0d2008-08-13 20:04:101696 All commits that are walked are included.
Junio C Hamanob0e02952008-01-19 08:02:001697</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511698<div class="paragraph"><p>Note that without <code>--full-history</code>, this still simplifies merges: if
Junio C Hamanoa76cb0d2008-08-13 20:04:101699one of the parents is TREESAME, we follow only that one, so the other
1700sides of the merge are never walked.</p></div>
Junio C Hamanob0e02952008-01-19 08:02:001701</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591702<dt class="hdlist1">
Junio C Hamanoa2f46622008-09-03 05:20:311703--simplify-merges
1704</dt>
1705<dd>
1706<p>
1707 First, build a history graph in the same way that
Junio C Hamanoac12f0e2014-09-19 22:32:511708 <code>--full-history</code> with parent rewriting does (see above).
Junio C Hamanoa2f46622008-09-03 05:20:311709</p>
Junio C Hamanoac12f0e2014-09-19 22:32:511710<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:311711history according to the following rules:</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271712<div class="openblock">
1713<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591714<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311715<li>
1716<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511717Set <code>C'</code> to <code>C</code>.
Junio C Hamanoa2f46622008-09-03 05:20:311718</p>
1719</li>
1720<li>
1721<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511722Replace each parent <code>P</code> of <code>C'</code> with its simplification <code>P'</code>. In
Junio C Hamano27159f82013-06-14 17:19:221723 the process, drop parents that are ancestors of other parents or that are
1724 root commits TREESAME to an empty tree, and remove duplicates, but take care
1725 to never drop all parents that we are TREESAME to.
Junio C Hamanoa2f46622008-09-03 05:20:311726</p>
1727</li>
1728<li>
1729<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511730If after this parent rewriting, <code>C'</code> is a root or merge commit (has
Junio C Hamanoa2f46622008-09-03 05:20:311731 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1732 Otherwise, it is replaced with its only parent.
1733</p>
1734</li>
1735</ul></div>
Junio C Hamano9629d4f2012-12-19 00:28:271736</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591737<div class="paragraph"><p>The effect of this is best shown by way of comparing to
Junio C Hamanoac12f0e2014-09-19 22:32:511738<code>--full-history</code> with parent rewriting. The example turns into:</p></div>
Junio C Hamanoa2f46622008-09-03 05:20:311739<div class="listingblock">
1740<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511741<pre><code> .-A---M---N---O
Junio C Hamanoa2f46622008-09-03 05:20:311742 / / /
1743 I B D
1744 \ / /
Junio C Hamanoac12f0e2014-09-19 22:32:511745 `---------'</code></pre>
Junio C Hamanoa2f46622008-09-03 05:20:311746</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511747<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:271748<div class="openblock">
1749<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591750<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311751<li>
1752<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511753<code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the
1754 other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME.
Junio C Hamanoa2f46622008-09-03 05:20:311755</p>
1756</li>
1757<li>
1758<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511759<code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then
Junio C Hamanoa2f46622008-09-03 05:20:311760 removed completely, because it had one parent and is TREESAME.
1761</p>
1762</li>
Junio C Hamano27159f82013-06-14 17:19:221763<li>
1764<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511765<code>Q</code>'s parent list had <code>Y</code> simplified to <code>X</code>. <code>X</code> was then removed, because it
1766 was a TREESAME root. <code>Q</code> was then removed completely, because it had one
Junio C Hamano27159f82013-06-14 17:19:221767 parent and is TREESAME.
1768</p>
1769</li>
Junio C Hamanoa2f46622008-09-03 05:20:311770</ul></div>
Junio C Hamano9629d4f2012-12-19 00:28:271771</div></div>
Junio C Hamanoa2f46622008-09-03 05:20:311772</dd>
1773</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591774<div class="paragraph"><p>Finally, there is a fifth simplification mode available:</p></div>
1775<div class="dlist"><dl>
1776<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551777--ancestry-path
1778</dt>
1779<dd>
1780<p>
1781 Limit the displayed commits to those directly on the ancestry
Junio C Hamanob73af6c2013-12-03 22:07:111782 chain between the &#8220;from&#8221; and &#8220;to&#8221; commits in the given commit
1783 range. I.e. only display commits that are ancestor of the &#8220;to&#8221;
1784 commit and descendants of the &#8220;from&#8221; commit.
Junio C Hamano89a57342010-06-22 23:22:551785</p>
Junio C Hamano68cf15a2010-11-06 01:01:591786<div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
Junio C Hamano89a57342010-06-22 23:22:551787<div class="listingblock">
1788<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511789<pre><code> D---E-------F
Junio C Hamano89a57342010-06-22 23:22:551790 / \ \
1791 B---C---G---H---I---J
1792 / \
Junio C Hamanoac12f0e2014-09-19 22:32:511793 A-------K---------------L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551794</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511795<div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>,
1796but excludes the ones that are ancestors of <code>D</code>. This is useful to see
1797what happened to the history leading to <code>M</code> since <code>D</code>, in the sense
1798that &#8220;what does <code>M</code> have that did not exist in <code>D</code>&#8221;. The result in this
1799example 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:551800of course).</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511801<div class="paragraph"><p>When we want to find out what commits in <code>M</code> are contaminated with the
1802bug introduced by <code>D</code> and need fixing, however, we might want to view
1803only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e.
1804excluding <code>C</code> and <code>K</code>. This is exactly what the <code>--ancestry-path</code>
Junio C Hamano89a57342010-06-22 23:22:551805option does. Applied to the <em>D..M</em> range, it results in:</p></div>
1806<div class="listingblock">
1807<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511808<pre><code> E-------F
Junio C Hamano89a57342010-06-22 23:22:551809 \ \
1810 G---H---I---J
1811 \
Junio C Hamanoac12f0e2014-09-19 22:32:511812 L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551813</div></div>
1814</dd>
1815</dl></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511816<div class="paragraph"><p>The <code>--simplify-by-decoration</code> option allows you to view only the
Junio C Hamano28363492008-11-14 08:26:311817big picture of the topology of the history, by omitting commits
1818that are not referenced by tags. Commits are marked as !TREESAME
1819(in other words, kept after history simplification rules described
1820above) if (1) they are referenced by tags, or (2) they change the
1821contents of the paths given on the command line. All other
1822commits are marked as TREESAME (subject to be simplified away).</p></div>
Junio C Hamano9629d4f2012-12-19 00:28:271823</div>
1824<div class="sect2">
1825<h3 id="_commit_ordering">Commit Ordering</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591826<div class="paragraph"><p>By default, the commits are shown in reverse chronological order.</p></div>
1827<div class="dlist"><dl>
1828<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001829--date-order
1830</dt>
1831<dd>
1832<p>
Junio C Hamanod0316112012-08-22 19:55:291833 Show no parents before all of its children are shown, but
1834 otherwise show commits in the commit timestamp order.
Junio C Hamanob0e02952008-01-19 08:02:001835</p>
1836</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591837<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:181838--author-date-order
1839</dt>
1840<dd>
1841<p>
1842 Show no parents before all of its children are shown, but
1843 otherwise show commits in the author timestamp order.
1844</p>
1845</dd>
1846<dt class="hdlist1">
Junio C Hamanod0316112012-08-22 19:55:291847--topo-order
1848</dt>
1849<dd>
1850<p>
1851 Show no parents before all of its children are shown, and
1852 avoid showing commits on multiple lines of history
1853 intermixed.
1854</p>
1855<div class="paragraph"><p>For example, in a commit history like this:</p></div>
1856<div class="listingblock">
1857<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:511858<pre><code> ---1----2----4----7
Junio C Hamanod0316112012-08-22 19:55:291859 \ \
Junio C Hamanoac12f0e2014-09-19 22:32:511860 3----5----6----8---</code></pre>
Junio C Hamanod0316112012-08-22 19:55:291861</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511862<div class="paragraph"><p>where the numbers denote the order of commit timestamps, <code>git
1863rev-list</code> and friends with <code>--date-order</code> show the commits in the
Junio C Hamanod0316112012-08-22 19:55:291864timestamp order: 8 7 6 5 4 3 2 1.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:511865<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:2918663 1); some older commits are shown before newer ones in order to
1867avoid showing the commits from two parallel development track mixed
1868together.</p></div>
1869</dd>
1870<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001871--reverse
1872</dt>
1873<dd>
1874<p>
Junio C Hamanof3ca7b82016-10-03 22:27:021875 Output the commits chosen to be shown (see Commit Limiting
1876 section above) in reverse order. Cannot be combined with
1877 <code>--walk-reflogs</code>.
Junio C Hamanob0e02952008-01-19 08:02:001878</p>
1879</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311880</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271881</div>
1882<div class="sect2">
1883<h3 id="_object_traversal">Object Traversal</h3>
Junio C Hamano076ffcc2013-02-06 05:13:211884<div class="paragraph"><p>These options are mostly targeted for packing of Git repositories.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591885<div class="dlist"><dl>
1886<dt class="hdlist1">
Junio C Hamanoeccdd4a2012-09-10 23:28:171887--no-walk[=(sorted|unsorted)]
Junio C Hamanob0e02952008-01-19 08:02:001888</dt>
1889<dd>
1890<p>
Junio C Hamanoeccdd4a2012-09-10 23:28:171891 Only show the given commits, but do not traverse their ancestors.
1892 This has no effect if a range is specified. If the argument
Junio C Hamanoac12f0e2014-09-19 22:32:511893 <code>unsorted</code> is given, the commits are shown in the order they were
1894 given on the command line. Otherwise (if <code>sorted</code> or no argument
Junio C Hamanob73af6c2013-12-03 22:07:111895 was given), the commits are shown in reverse chronological order
Junio C Hamanoeccdd4a2012-09-10 23:28:171896 by commit time.
Junio C Hamanoef57d1e2015-03-25 21:23:001897 Cannot be combined with <code>--graph</code>.
Junio C Hamanob0e02952008-01-19 08:02:001898</p>
1899</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591900<dt class="hdlist1">
Junio C Hamanob0e02952008-01-19 08:02:001901--do-walk
1902</dt>
1903<dd>
1904<p>
Junio C Hamanoac12f0e2014-09-19 22:32:511905 Overrides a previous <code>--no-walk</code>.
Junio C Hamanob0e02952008-01-19 08:02:001906</p>
1907</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311908</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:271909</div>
1910<div class="sect2">
1911<h3 id="_commit_formatting">Commit Formatting</h3>
Junio C Hamanod2c978f2011-03-20 19:42:221912<div class="dlist"><dl>
1913<dt class="hdlist1">
1914--pretty[=&lt;format&gt;]
1915</dt>
1916<dt class="hdlist1">
1917--format=&lt;format&gt;
1918</dt>
1919<dd>
1920<p>
1921 Pretty-print the contents of the commit logs in a given format,
1922 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
Junio C Hamanob4896852019-12-10 23:15:091923 <em>full</em>, <em>fuller</em>, <em>reference</em>, <em>email</em>, <em>raw</em>, <em>format:&lt;string&gt;</em>
Junio C Hamano6bb32e62015-02-17 22:11:261924 and <em>tformat:&lt;string&gt;</em>. When <em>&lt;format&gt;</em> is none of the above,
1925 and has <em>%placeholder</em> in it, it acts as if
1926 <em>--pretty=tformat:&lt;format&gt;</em> were given.
Junio C Hamanod2c978f2011-03-20 19:42:221927</p>
Junio C Hamano6bb32e62015-02-17 22:11:261928<div class="paragraph"><p>See the "PRETTY FORMATS" section for some additional details for each
1929format. When <em>=&lt;format&gt;</em> part is omitted, it defaults to <em>medium</em>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221930<div class="paragraph"><p>Note: you can specify the default pretty format in the repository
Junio C Hamanoa28a9202012-06-21 07:08:231931configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221932</dd>
1933<dt class="hdlist1">
1934--abbrev-commit
1935</dt>
1936<dd>
1937<p>
1938 Instead of showing the full 40-byte hexadecimal commit object
1939 name, show only a partial prefix. Non default number of
1940 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
1941 diff output, if it is displayed).
1942</p>
1943<div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
1944people using 80-column terminals.</p></div>
1945</dd>
1946<dt class="hdlist1">
Junio C Hamanof93530e2011-05-25 23:59:591947--no-abbrev-commit
1948</dt>
1949<dd>
1950<p>
1951 Show the full 40-byte hexadecimal commit object name. This negates
Junio C Hamanoac12f0e2014-09-19 22:32:511952 <code>--abbrev-commit</code> and those options which imply it such as
Junio C Hamano042f2142016-06-27 18:05:051953 "--oneline". It also overrides the <code>log.abbrevCommit</code> variable.
Junio C Hamanof93530e2011-05-25 23:59:591954</p>
1955</dd>
1956<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221957--oneline
1958</dt>
1959<dd>
1960<p>
1961 This is a shorthand for "--pretty=oneline --abbrev-commit"
1962 used together.
1963</p>
1964</dd>
1965<dt class="hdlist1">
Junio C Hamanoc5bb3b32013-08-05 22:43:361966--encoding=&lt;encoding&gt;
Junio C Hamanod2c978f2011-03-20 19:42:221967</dt>
1968<dd>
1969<p>
1970 The commit objects record the encoding used for the log message
1971 in their encoding header; this option can be used to tell the
1972 command to re-code the commit log message in the encoding
1973 preferred by the user. For non plumbing commands this
Junio C Hamano823eebb2015-07-10 22:29:341974 defaults to UTF-8. Note that if an object claims to be encoded
1975 in <code>X</code> and we are outputting in <code>X</code>, we will output the object
1976 verbatim; this means that invalid sequences in the original
1977 commit may be copied to the output.
Junio C Hamanod2c978f2011-03-20 19:42:221978</p>
1979</dd>
1980<dt class="hdlist1">
Junio C Hamano5996b672016-04-13 22:01:411981--expand-tabs=&lt;n&gt;
1982</dt>
1983<dt class="hdlist1">
1984--expand-tabs
1985</dt>
1986<dt class="hdlist1">
1987--no-expand-tabs
1988</dt>
1989<dd>
1990<p>
1991 Perform a tab expansion (replace each tab with enough spaces
1992 to fill to the next display column that is multiple of <em>&lt;n&gt;</em>)
1993 in the log message before showing it in the output.
1994 <code>--expand-tabs</code> is a short-hand for <code>--expand-tabs=8</code>, and
1995 <code>--no-expand-tabs</code> is a short-hand for <code>--expand-tabs=0</code>,
1996 which disables tab expansion.
1997</p>
1998<div class="paragraph"><p>By default, tabs are expanded in pretty formats that indent the log
1999message by 4 spaces (i.e. <em>medium</em>, which is the default, <em>full</em>,
2000and <em>fuller</em>).</p></div>
2001</dd>
2002<dt class="hdlist1">
Junio C Hamanob3f862c2019-12-05 22:22:002003--notes[=&lt;ref&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:222004</dt>
2005<dd>
2006<p>
Junio C Hamanoa28a9202012-06-21 07:08:232007 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
Junio C Hamanod2c978f2011-03-20 19:42:222008 commit, when showing the commit log message. This is the default
Junio C Hamanoac12f0e2014-09-19 22:32:512009 for <code>git log</code>, <code>git show</code> and <code>git whatchanged</code> commands when
2010 there is no <code>--pretty</code>, <code>--format</code>, or <code>--oneline</code> option given
Junio C Hamano60033462011-05-03 00:48:432011 on the command line.
Junio C Hamanod2c978f2011-03-20 19:42:222012</p>
Junio C Hamano60033462011-05-03 00:48:432013<div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the
Junio C Hamano042f2142016-06-27 18:05:052014<code>core.notesRef</code> and <code>notes.displayRef</code> variables (or corresponding
Junio C Hamanoa28a9202012-06-21 07:08:232015environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div>
Junio C Hamanob3f862c2019-12-05 22:22:002016<div class="paragraph"><p>With an optional <em>&lt;ref&gt;</em> argument, use the ref to find the notes
2017to display. The ref can specify the full refname when it begins
Junio C Hamano1f7c4a52015-10-14 22:15:512018with <code>refs/notes/</code>; when it begins with <code>notes/</code>, <code>refs/</code> and otherwise
2019<code>refs/notes/</code> is prefixed to form a full name of the ref.</p></div>
Junio C Hamano60033462011-05-03 00:48:432020<div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
2021being displayed. Examples: "--notes=foo" will show only notes from
2022"refs/notes/foo"; "--notes=foo --notes" will show both notes from
2023"refs/notes/foo" and from the default notes ref(s).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:222024</dd>
2025<dt class="hdlist1">
Junio C Hamano60033462011-05-03 00:48:432026--no-notes
2027</dt>
2028<dd>
2029<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512030 Do not show notes. This negates the above <code>--notes</code> option, by
Junio C Hamano60033462011-05-03 00:48:432031 resetting the list of notes refs from which notes are shown.
2032 Options are parsed in the order given on the command line, so e.g.
2033 "--notes --notes=foo --no-notes --notes=bar" will only show notes
2034 from "refs/notes/bar".
2035</p>
2036</dd>
2037<dt class="hdlist1">
Junio C Hamanob3f862c2019-12-05 22:22:002038--show-notes[=&lt;ref&gt;]
Junio C Hamano60033462011-05-03 00:48:432039</dt>
2040<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222041--[no-]standard-notes
2042</dt>
2043<dd>
2044<p>
Junio C Hamano60033462011-05-03 00:48:432045 These options are deprecated. Use the above --notes/--no-notes
2046 options instead.
Junio C Hamanod2c978f2011-03-20 19:42:222047</p>
2048</dd>
2049<dt class="hdlist1">
Junio C Hamano0acb1ae2012-09-24 21:28:132050--show-signature
2051</dt>
2052<dd>
2053<p>
2054 Check the validity of a signed commit object by passing the signature
Junio C Hamanoac12f0e2014-09-19 22:32:512055 to <code>gpg --verify</code> and show the output.
Junio C Hamano0acb1ae2012-09-24 21:28:132056</p>
2057</dd>
2058<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222059--relative-date
2060</dt>
2061<dd>
2062<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512063 Synonym for <code>--date=relative</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222064</p>
2065</dd>
2066<dt class="hdlist1">
Junio C Hamano1eb56092015-10-05 20:39:532067--date=&lt;format&gt;
Junio C Hamanod2c978f2011-03-20 19:42:222068</dt>
2069<dd>
2070<p>
2071 Only takes effect for dates shown in human-readable format, such
Junio C Hamanoac12f0e2014-09-19 22:32:512072 as when using <code>--pretty</code>. <code>log.date</code> config variable sets a default
Junio C Hamano1eb56092015-10-05 20:39:532073 value for the log command&#8217;s <code>--date</code> option. By default, dates
2074 are shown in the original time zone (either committer&#8217;s or
2075 author&#8217;s). If <code>-local</code> is appended to the format (e.g.,
2076 <code>iso-local</code>), the user&#8217;s local time zone is used instead.
Junio C Hamanod2c978f2011-03-20 19:42:222077</p>
Junio C Hamanob5513772019-04-22 03:38:392078<div class="openblock">
2079<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512080<div class="paragraph"><p><code>--date=relative</code> shows dates relative to the current time,
Junio C Hamanoe548d1b2016-08-08 22:26:492081e.g. &#8220;2 hours ago&#8221;. The <code>-local</code> option has no effect for
2082<code>--date=relative</code>.</p></div>
Junio C Hamano1eb56092015-10-05 20:39:532083<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:512084<div class="paragraph"><p><code>--date=iso</code> (or <code>--date=iso8601</code>) shows timestamps in a ISO 8601-like format.
2085The differences to the strict ISO 8601 format are:</p></div>
2086<div class="ulist"><ul>
2087<li>
2088<p>
2089a space instead of the <code>T</code> date/time delimiter
2090</p>
2091</li>
2092<li>
2093<p>
2094a space between time and time zone
2095</p>
2096</li>
2097<li>
2098<p>
2099no colon between hours and minutes of the time zone
2100</p>
2101</li>
2102</ul></div>
2103<div class="paragraph"><p><code>--date=iso-strict</code> (or <code>--date=iso8601-strict</code>) shows timestamps in strict
2104ISO 8601 format.</p></div>
2105<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:112106format, often found in email messages.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512107<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:492108<div class="paragraph"><p><code>--date=raw</code> shows the date as seconds since the epoch (1970-01-01
210900:00:00 UTC), followed by a space, and then the timezone as an offset
2110from UTC (a <code>+</code> or <code>-</code> with four digits; the first two are hours, and
2111the second two are minutes). I.e., as if the timestamp were formatted
2112with <code>strftime("%s %z")</code>).
2113Note that the <code>-local</code> option does not affect the seconds-since-epoch
2114value (which is always measured in UTC), but does switch the accompanying
2115timezone value.</p></div>
Junio C Hamano23168ef2019-02-07 07:20:472116<div class="paragraph"><p><code>--date=human</code> shows the timezone if the timezone does not match the
2117current time-zone, and doesn&#8217;t print the whole date if that matches
2118(ie skip printing year for dates that are "this year", but also skip
2119the whole date itself if it&#8217;s in the last few days and we can just say
2120what weekday it was). For older dates the hour and minute is also
2121omitted.</p></div>
Junio C Hamanoe548d1b2016-08-08 22:26:492122<div class="paragraph"><p><code>--date=unix</code> shows the date as a Unix epoch timestamp (seconds since
21231970). As with <code>--raw</code>, this is always in UTC and therefore <code>-local</code>
2124has no effect.</p></div>
Junio C Hamano55d91912017-06-22 22:32:462125<div class="paragraph"><p><code>--date=format:...</code> feeds the format <code>...</code> to your system <code>strftime</code>,
2126except for %z and %Z, which are handled internally.
Junio C Hamanod7ed4042015-08-03 19:43:002127Use <code>--date=format:%c</code> to show the date in your system locale&#8217;s
2128preferred format. See the <code>strftime</code> manual for a complete list of
Junio C Hamano1eb56092015-10-05 20:39:532129format placeholders. When using <code>-local</code>, the correct syntax is
2130<code>--date=format-local:...</code>.</p></div>
2131<div class="paragraph"><p><code>--date=default</code> is the default format, and is similar to
2132<code>--date=rfc2822</code>, with a few exceptions:</p></div>
Junio C Hamanob5513772019-04-22 03:38:392133</div></div>
Junio C Hamano1eb56092015-10-05 20:39:532134<div class="ulist"><ul>
2135<li>
2136<p>
2137there is no comma after the day-of-week
2138</p>
2139</li>
2140<li>
2141<p>
2142the time zone is omitted when the local time zone is used
2143</p>
2144</li>
2145</ul></div>
Junio C Hamanod2c978f2011-03-20 19:42:222146</dd>
2147<dt class="hdlist1">
2148--parents
2149</dt>
2150<dd>
2151<p>
2152 Print also the parents of the commit (in the form "commit parent&#8230;").
Junio C Hamanoce019c02017-10-30 05:57:462153 Also enables parent rewriting, see <em>History Simplification</em> above.
Junio C Hamanod2c978f2011-03-20 19:42:222154</p>
2155</dd>
2156<dt class="hdlist1">
2157--children
2158</dt>
2159<dd>
2160<p>
2161 Print also the children of the commit (in the form "commit child&#8230;").
Junio C Hamanoce019c02017-10-30 05:57:462162 Also enables parent rewriting, see <em>History Simplification</em> above.
Junio C Hamanod2c978f2011-03-20 19:42:222163</p>
2164</dd>
2165<dt class="hdlist1">
2166--left-right
2167</dt>
2168<dd>
2169<p>
Junio C Hamanocd451662016-09-13 00:54:092170 Mark which side of a symmetric difference a commit is reachable from.
Junio C Hamanoac12f0e2014-09-19 22:32:512171 Commits from the left side are prefixed with <code>&lt;</code> and those from
2172 the right with <code>&gt;</code>. If combined with <code>--boundary</code>, those
2173 commits are prefixed with <code>-</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222174</p>
2175<div class="paragraph"><p>For example, if you have this topology:</p></div>
2176<div class="listingblock">
2177<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512178<pre><code> y---b---b branch B
Junio C Hamanod2c978f2011-03-20 19:42:222179 / \ /
2180 / .
2181 / / \
Junio C Hamanoac12f0e2014-09-19 22:32:512182 o---x---a---a branch A</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222183</div></div>
2184<div class="paragraph"><p>you would get an output like this:</p></div>
2185<div class="listingblock">
2186<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512187<pre><code> $ git rev-list --left-right --boundary --pretty=oneline A...B
Junio C Hamanod2c978f2011-03-20 19:42:222188
2189 &gt;bbbbbbb... 3rd on b
2190 &gt;bbbbbbb... 2nd on b
2191 &lt;aaaaaaa... 3rd on a
2192 &lt;aaaaaaa... 2nd on a
2193 -yyyyyyy... 1st on b
Junio C Hamanoac12f0e2014-09-19 22:32:512194 -xxxxxxx... 1st on a</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222195</div></div>
2196</dd>
2197<dt class="hdlist1">
2198--graph
2199</dt>
2200<dd>
2201<p>
2202 Draw a text-based graphical representation of the commit history
2203 on the left hand side of the output. This may cause extra lines
2204 to be printed in between commits, in order for the graph history
2205 to be drawn properly.
Junio C Hamanoef57d1e2015-03-25 21:23:002206 Cannot be combined with <code>--no-walk</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222207</p>
Junio C Hamanoce019c02017-10-30 05:57:462208<div class="paragraph"><p>This enables parent rewriting, see <em>History Simplification</em> above.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:512209<div class="paragraph"><p>This implies the <code>--topo-order</code> option by default, but the
2210<code>--date-order</code> option may also be specified.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:222211</dd>
Junio C Hamano624dd4c2014-04-03 21:56:302212<dt class="hdlist1">
2213--show-linear-break[=&lt;barrier&gt;]
2214</dt>
2215<dd>
2216<p>
2217 When --graph is not used, all history branches are flattened
2218 which can make it hard to see that the two consecutive commits
2219 do not belong to a linear branch. This option puts a barrier
Junio C Hamanoac12f0e2014-09-19 22:32:512220 in between them in that case. If <code>&lt;barrier&gt;</code> is specified, it
Junio C Hamano624dd4c2014-04-03 21:56:302221 is the string that will be shown instead of the default one.
2222</p>
2223</dd>
Junio C Hamanod2c978f2011-03-20 19:42:222224</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:272225</div>
2226<div class="sect2">
2227<h3 id="_diff_formatting">Diff Formatting</h3>
Junio C Hamanob73af6c2013-12-03 22:07:112228<div class="paragraph"><p>Listed below are options that control the formatting of diff output.
Junio C Hamanoa28a9202012-06-21 07:08:232229Some of them are specific to <a href="git-rev-list.html">git-rev-list(1)</a>, however other diff
2230options 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:222231<div class="dlist"><dl>
2232<dt class="hdlist1">
2233-c
2234</dt>
2235<dd>
2236<p>
2237 With this option, diff output for a merge commit
2238 shows the differences from each of the parents to the merge result
2239 simultaneously instead of showing pairwise diff between a parent
2240 and the result one at a time. Furthermore, it lists only files
2241 which were modified from all parents.
2242</p>
2243</dd>
2244<dt class="hdlist1">
2245--cc
2246</dt>
2247<dd>
2248<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512249 This flag implies the <code>-c</code> option and further compresses the
Junio C Hamanod2c978f2011-03-20 19:42:222250 patch output by omitting uninteresting hunks whose contents in
2251 the parents have only two variants and the merge result picks
2252 one of them without modification.
2253</p>
2254</dd>
2255<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:002256--combined-all-paths
2257</dt>
2258<dd>
2259<p>
2260 This flag causes combined diffs (used for merge commits) to
2261 list the name of the file from all parents. It thus only has
2262 effect when -c or --cc are specified, and is likely only
2263 useful if filename changes are detected (i.e. when either
2264 rename or copy detection have been requested).
2265</p>
2266</dd>
2267<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:222268-m
2269</dt>
2270<dd>
2271<p>
2272 This flag makes the merge commits show the full diff like
2273 regular commits; for each merge parent, a separate log entry
2274 and diff is generated. An exception is that only diff against
Junio C Hamanoac12f0e2014-09-19 22:32:512275 the first parent is shown when <code>--first-parent</code> option is given;
Junio C Hamanod2c978f2011-03-20 19:42:222276 in that case, the output represents the changes the merge
2277 brought <em>into</em> the then-current branch.
2278</p>
2279</dd>
2280<dt class="hdlist1">
2281-r
2282</dt>
2283<dd>
2284<p>
2285 Show recursive diffs.
2286</p>
2287</dd>
2288<dt class="hdlist1">
2289-t
2290</dt>
2291<dd>
2292<p>
Junio C Hamanoac12f0e2014-09-19 22:32:512293 Show the tree objects in the diff output. This implies <code>-r</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222294</p>
2295</dd>
Junio C Hamanod2c978f2011-03-20 19:42:222296</dl></div>
Junio C Hamano0430e3a2007-05-15 03:13:172297</div>
Junio C Hamano9629d4f2012-12-19 00:28:272298</div>
2299</div>
2300<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312301<h2 id="_pretty_formats">PRETTY FORMATS</h2>
Junio C Hamano0430e3a2007-05-15 03:13:172302<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592303<div class="paragraph"><p>If the commit is a merge, and if the pretty-format
Junio C Hamano0430e3a2007-05-15 03:13:172304is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
2305inserted before the <em>Author:</em> line. This line begins with
Junio C Hamanob4896852019-12-10 23:15:092306"Merge: " and the hashes of ancestral commits are printed,
Junio C Hamano0430e3a2007-05-15 03:13:172307separated by spaces. Note that the listed commits may not
2308necessarily be the list of the <strong>direct</strong> parent commits if you
2309have limited your view of history: for example, if you are
2310only interested in changes related to a certain directory or
Junio C Hamanoba4b9282008-07-06 05:20:312311file.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592312<div class="paragraph"><p>There are several built-in formats, and you can define
Junio C Hamanoa574a092010-06-13 19:57:102313additional formats by setting a pretty.&lt;name&gt;
2314config option to either another format name, or a
2315<em>format:</em> string, as described below (see
Junio C Hamanoa28a9202012-06-21 07:08:232316<a href="git-config.html">git-config(1)</a>). Here are the details of the
Junio C Hamanoa574a092010-06-13 19:57:102317built-in formats:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592318<div class="ulist"><ul>
Junio C Hamanoa340aaa2006-11-23 02:47:332319<li>
2320<p>
2321<em>oneline</em>
2322</p>
2323<div class="literalblock">
2324<div class="content">
Junio C Hamanob4896852019-12-10 23:15:092325<pre><code>&lt;hash&gt; &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332326</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592327<div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:332328</li>
2329<li>
2330<p>
2331<em>short</em>
2332</p>
2333<div class="literalblock">
2334<div class="content">
Junio C Hamanob4896852019-12-10 23:15:092335<pre><code>commit &lt;hash&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512336Author: &lt;author&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332337</div></div>
2338<div class="literalblock">
2339<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512340<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332341</div></div>
2342</li>
2343<li>
2344<p>
2345<em>medium</em>
2346</p>
2347<div class="literalblock">
2348<div class="content">
Junio C Hamanob4896852019-12-10 23:15:092349<pre><code>commit &lt;hash&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332350Author: &lt;author&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512351Date: &lt;author date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332352</div></div>
2353<div class="literalblock">
2354<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512355<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332356</div></div>
2357<div class="literalblock">
2358<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512359<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332360</div></div>
2361</li>
2362<li>
2363<p>
2364<em>full</em>
2365</p>
2366<div class="literalblock">
2367<div class="content">
Junio C Hamanob4896852019-12-10 23:15:092368<pre><code>commit &lt;hash&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332369Author: &lt;author&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512370Commit: &lt;committer&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332371</div></div>
2372<div class="literalblock">
2373<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512374<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332375</div></div>
2376<div class="literalblock">
2377<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512378<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332379</div></div>
2380</li>
2381<li>
2382<p>
2383<em>fuller</em>
2384</p>
2385<div class="literalblock">
2386<div class="content">
Junio C Hamanob4896852019-12-10 23:15:092387<pre><code>commit &lt;hash&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182388Author: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312389AuthorDate: &lt;author date&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182390Commit: &lt;committer&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512391CommitDate: &lt;committer date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332392</div></div>
2393<div class="literalblock">
2394<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512395<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332396</div></div>
2397<div class="literalblock">
2398<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512399<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332400</div></div>
2401</li>
2402<li>
2403<p>
Junio C Hamanob4896852019-12-10 23:15:092404<em>reference</em>
2405</p>
2406<div class="literalblock">
2407<div class="content">
2408<pre><code>&lt;abbrev hash&gt; (&lt;title line&gt;, &lt;short author date&gt;)</code></pre>
2409</div></div>
2410<div class="paragraph"><p>This format is used to refer to another commit in a commit message and
2411is the same as <code>--pretty='format:%C(auto)%h (%s, %ad)'</code>. By default,
2412the date is formatted with <code>--date=short</code> unless another <code>--date</code> option
2413is explicitly specified. As with any <code>format:</code> with format
2414placeholders, its output is not affected by other options like
2415<code>--decorate</code> and <code>--walk-reflogs</code>.</p></div>
2416</li>
2417<li>
2418<p>
Junio C Hamanoa340aaa2006-11-23 02:47:332419<em>email</em>
2420</p>
2421<div class="literalblock">
2422<div class="content">
Junio C Hamanob4896852019-12-10 23:15:092423<pre><code>From &lt;hash&gt; &lt;date&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:332424From: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312425Date: &lt;author date&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:512426Subject: [PATCH] &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332427</div></div>
2428<div class="literalblock">
2429<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512430<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:332431</div></div>
2432</li>
2433<li>
2434<p>
2435<em>raw</em>
2436</p>
Junio C Hamano68cf15a2010-11-06 01:01:592437<div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
Junio C Hamanob4896852019-12-10 23:15:092438stored in the commit object. Notably, the hashes are
Junio C Hamanoa340aaa2006-11-23 02:47:332439displayed in full, regardless of whether --abbrev or
2440--no-abbrev are used, and <em>parents</em> information show the
Junio C Hamanod75148a2014-04-08 19:48:382441true parent commits, without taking grafts or history
Junio C Hamano85f1fde2015-06-01 20:37:322442simplification into account. Note that this format affects the way
2443commits are displayed, but not the way the diff is shown e.g. with
2444<code>git log --raw</code>. To get full object names in a raw diff format,
2445use <code>--no-abbrev</code>.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:332446</li>
Junio C Hamanoa3fd83c2007-03-02 10:34:362447<li>
2448<p>
Junio C Hamanoe32ec8b2010-06-02 23:32:312449<em>format:&lt;string&gt;</em>
Junio C Hamanoa3fd83c2007-03-02 10:34:362450</p>
Junio C Hamano68cf15a2010-11-06 01:01:592451<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:362452you want to show. It works a little bit like printf format,
2453with the notable exception that you get a newline with <em>%n</em>
Junio C Hamanoba4b9282008-07-06 05:20:312454instead of <em>\n</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592455<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:312456would show something like this:</p></div>
Junio C Hamano0430e3a2007-05-15 03:13:172457<div class="listingblock">
2458<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:512459<pre><code>The author of fe6e0ee was Junio C Hamano, 23 hours ago
2460The 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:172461</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592462<div class="paragraph"><p>The placeholders are:</p></div>
2463<div class="ulist"><ul>
Junio C Hamanoa3fd83c2007-03-02 10:34:362464<li>
2465<p>
Junio C Hamano11f15372019-03-07 03:17:002466Placeholders that expand to a single literal character:
2467</p>
2468<div class="dlist"><dl>
2469<dt class="hdlist1">
2470<em>%n</em>
2471</dt>
2472<dd>
2473<p>
2474newline
2475</p>
2476</dd>
2477<dt class="hdlist1">
2478<em>%%</em>
2479</dt>
2480<dd>
2481<p>
2482a raw <em>%</em>
2483</p>
2484</dd>
2485<dt class="hdlist1">
2486<em>%x00</em>
2487</dt>
2488<dd>
2489<p>
2490print a byte from a hex code
2491</p>
2492</dd>
2493</dl></div>
2494</li>
2495<li>
2496<p>
2497Placeholders that affect formatting of later placeholders:
2498</p>
2499<div class="dlist"><dl>
2500<dt class="hdlist1">
2501<em>%Cred</em>
2502</dt>
2503<dd>
2504<p>
2505switch color to red
2506</p>
2507</dd>
2508<dt class="hdlist1">
2509<em>%Cgreen</em>
2510</dt>
2511<dd>
2512<p>
2513switch color to green
2514</p>
2515</dd>
2516<dt class="hdlist1">
2517<em>%Cblue</em>
2518</dt>
2519<dd>
2520<p>
2521switch color to blue
2522</p>
2523</dd>
2524<dt class="hdlist1">
2525<em>%Creset</em>
2526</dt>
2527<dd>
2528<p>
2529reset color
2530</p>
2531</dd>
2532<dt class="hdlist1">
2533<em>%C(&#8230;)</em>
2534</dt>
2535<dd>
2536<p>
2537color specification, as described under Values in the
2538 "CONFIGURATION FILE" section of <a href="git-config.html">git-config(1)</a>. By
2539 default, colors are shown only when enabled for log output
2540 (by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and respecting
2541 the <code>auto</code> settings of the former if we are going to a
2542 terminal). <code>%C(auto,...)</code> is accepted as a historical
2543 synonym for the default (e.g., <code>%C(auto,red)</code>). Specifying
2544 <code>%C(always,...)</code> will show the colors even when color is
2545 not otherwise enabled (though consider just using
2546 <code>--color=always</code> to enable color for the whole output,
2547 including this format and anything else git might color).
2548 <code>auto</code> alone (i.e. <code>%C(auto)</code>) will turn on auto coloring
2549 on the next placeholders until the color is switched
2550 again.
2551</p>
2552</dd>
2553<dt class="hdlist1">
2554<em>%m</em>
2555</dt>
2556<dd>
2557<p>
2558left (<code>&lt;</code>), right (<code>&gt;</code>) or boundary (<code>-</code>) mark
2559</p>
2560</dd>
2561<dt class="hdlist1">
2562<em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>
2563</dt>
2564<dd>
2565<p>
2566switch line wrapping, like the -w option of
2567 <a href="git-shortlog.html">git-shortlog(1)</a>.
2568</p>
2569</dd>
2570<dt class="hdlist1">
2571<em>%&lt;(&lt;N&gt;[,trunc|ltrunc|mtrunc])</em>
2572</dt>
2573<dd>
2574<p>
2575make the next placeholder take at
2576 least N columns, padding spaces on
2577 the right if necessary. Optionally
2578 truncate at the beginning (ltrunc),
2579 the middle (mtrunc) or the end
2580 (trunc) if the output is longer than
2581 N columns. Note that truncating
2582 only works correctly with N &gt;= 2.
2583</p>
2584</dd>
2585<dt class="hdlist1">
2586<em>%&lt;|(&lt;N&gt;)</em>
2587</dt>
2588<dd>
2589<p>
2590make the next placeholder take at least until Nth
2591 columns, padding spaces on the right if necessary
2592</p>
2593</dd>
2594<dt class="hdlist1">
2595<em>%&gt;(&lt;N&gt;)</em>, <em>%&gt;|(&lt;N&gt;)</em>
2596</dt>
2597<dd>
2598<p>
2599similar to <em>%&lt;(&lt;N&gt;)</em>, <em>%&lt;|(&lt;N&gt;)</em> respectively,
2600 but padding spaces on the left
2601</p>
2602</dd>
2603<dt class="hdlist1">
2604<em>%&gt;&gt;(&lt;N&gt;)</em>, <em>%&gt;&gt;|(&lt;N&gt;)</em>
2605</dt>
2606<dd>
2607<p>
2608similar to <em>%&gt;(&lt;N&gt;)</em>, <em>%&gt;|(&lt;N&gt;)</em>
2609 respectively, except that if the next
2610 placeholder takes more spaces than given and
2611 there are spaces on its left, use those
2612 spaces
2613</p>
2614</dd>
2615<dt class="hdlist1">
2616<em>%&gt;&lt;(&lt;N&gt;)</em>, <em>%&gt;&lt;|(&lt;N&gt;)</em>
2617</dt>
2618<dd>
2619<p>
2620similar to <em>%&lt;(&lt;N&gt;)</em>, <em>%&lt;|(&lt;N&gt;)</em>
2621 respectively, but padding both sides
2622 (i.e. the text is centered)
2623</p>
2624</dd>
2625</dl></div>
2626</li>
2627<li>
2628<p>
2629Placeholders that expand to information extracted from the commit:
2630</p>
2631<div class="dlist"><dl>
2632<dt class="hdlist1">
2633<em>%H</em>
2634</dt>
2635<dd>
2636<p>
2637commit hash
2638</p>
2639</dd>
2640<dt class="hdlist1">
2641<em>%h</em>
2642</dt>
2643<dd>
2644<p>
2645abbreviated commit hash
2646</p>
2647</dd>
2648<dt class="hdlist1">
2649<em>%T</em>
2650</dt>
2651<dd>
2652<p>
2653tree hash
2654</p>
2655</dd>
2656<dt class="hdlist1">
2657<em>%t</em>
2658</dt>
2659<dd>
2660<p>
2661abbreviated tree hash
2662</p>
2663</dd>
2664<dt class="hdlist1">
2665<em>%P</em>
2666</dt>
2667<dd>
2668<p>
2669parent hashes
2670</p>
2671</dd>
2672<dt class="hdlist1">
2673<em>%p</em>
2674</dt>
2675<dd>
2676<p>
2677abbreviated parent hashes
2678</p>
2679</dd>
2680<dt class="hdlist1">
2681<em>%an</em>
2682</dt>
2683<dd>
2684<p>
2685author name
2686</p>
2687</dd>
2688<dt class="hdlist1">
2689<em>%aN</em>
2690</dt>
2691<dd>
2692<p>
2693author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2694 or <a href="git-blame.html">git-blame(1)</a>)
2695</p>
2696</dd>
2697<dt class="hdlist1">
2698<em>%ae</em>
2699</dt>
2700<dd>
2701<p>
2702author email
2703</p>
2704</dd>
2705<dt class="hdlist1">
2706<em>%aE</em>
2707</dt>
2708<dd>
2709<p>
2710author email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a>
2711 or <a href="git-blame.html">git-blame(1)</a>)
2712</p>
2713</dd>
2714<dt class="hdlist1">
Junio C Hamano8ac8a3d2019-11-11 04:33:462715<em>%al</em>
2716</dt>
2717<dd>
2718<p>
2719author email local-part (the part before the <em>@</em> sign)
2720</p>
2721</dd>
2722<dt class="hdlist1">
2723<em>%aL</em>
2724</dt>
2725<dd>
2726<p>
2727author local-part (see <em>%al</em>) respecting .mailmap, see
2728 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2729</p>
2730</dd>
2731<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:002732<em>%ad</em>
2733</dt>
2734<dd>
2735<p>
2736author date (format respects --date= option)
2737</p>
2738</dd>
2739<dt class="hdlist1">
2740<em>%aD</em>
2741</dt>
2742<dd>
2743<p>
2744author date, RFC2822 style
2745</p>
2746</dd>
2747<dt class="hdlist1">
2748<em>%ar</em>
2749</dt>
2750<dd>
2751<p>
2752author date, relative
2753</p>
2754</dd>
2755<dt class="hdlist1">
2756<em>%at</em>
2757</dt>
2758<dd>
2759<p>
2760author date, UNIX timestamp
2761</p>
2762</dd>
2763<dt class="hdlist1">
2764<em>%ai</em>
2765</dt>
2766<dd>
2767<p>
2768author date, ISO 8601-like format
2769</p>
2770</dd>
2771<dt class="hdlist1">
2772<em>%aI</em>
2773</dt>
2774<dd>
2775<p>
2776author date, strict ISO 8601 format
2777</p>
2778</dd>
2779<dt class="hdlist1">
Junio C Hamanob4896852019-12-10 23:15:092780<em>%as</em>
2781</dt>
2782<dd>
2783<p>
2784author date, short format (<code>YYYY-MM-DD</code>)
2785</p>
2786</dd>
2787<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:002788<em>%cn</em>
2789</dt>
2790<dd>
2791<p>
2792committer name
2793</p>
2794</dd>
2795<dt class="hdlist1">
2796<em>%cN</em>
2797</dt>
2798<dd>
2799<p>
2800committer name (respecting .mailmap, see
2801 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2802</p>
2803</dd>
2804<dt class="hdlist1">
2805<em>%ce</em>
2806</dt>
2807<dd>
2808<p>
2809committer email
2810</p>
2811</dd>
2812<dt class="hdlist1">
2813<em>%cE</em>
2814</dt>
2815<dd>
2816<p>
2817committer email (respecting .mailmap, see
2818 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2819</p>
2820</dd>
2821<dt class="hdlist1">
Junio C Hamano8ac8a3d2019-11-11 04:33:462822<em>%cl</em>
2823</dt>
2824<dd>
2825<p>
2826author email local-part (the part before the <em>@</em> sign)
2827</p>
2828</dd>
2829<dt class="hdlist1">
2830<em>%cL</em>
2831</dt>
2832<dd>
2833<p>
2834author local-part (see <em>%cl</em>) respecting .mailmap, see
2835 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2836</p>
2837</dd>
2838<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:002839<em>%cd</em>
2840</dt>
2841<dd>
2842<p>
2843committer date (format respects --date= option)
2844</p>
2845</dd>
2846<dt class="hdlist1">
2847<em>%cD</em>
2848</dt>
2849<dd>
2850<p>
2851committer date, RFC2822 style
2852</p>
2853</dd>
2854<dt class="hdlist1">
2855<em>%cr</em>
2856</dt>
2857<dd>
2858<p>
2859committer date, relative
2860</p>
2861</dd>
2862<dt class="hdlist1">
2863<em>%ct</em>
2864</dt>
2865<dd>
2866<p>
2867committer date, UNIX timestamp
2868</p>
2869</dd>
2870<dt class="hdlist1">
2871<em>%ci</em>
2872</dt>
2873<dd>
2874<p>
2875committer date, ISO 8601-like format
2876</p>
2877</dd>
2878<dt class="hdlist1">
2879<em>%cI</em>
2880</dt>
2881<dd>
2882<p>
2883committer date, strict ISO 8601 format
2884</p>
2885</dd>
2886<dt class="hdlist1">
Junio C Hamanob4896852019-12-10 23:15:092887<em>%cs</em>
2888</dt>
2889<dd>
2890<p>
2891committer date, short format (<code>YYYY-MM-DD</code>)
2892</p>
2893</dd>
2894<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:002895<em>%d</em>
2896</dt>
2897<dd>
2898<p>
2899ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
2900</p>
2901</dd>
2902<dt class="hdlist1">
2903<em>%D</em>
2904</dt>
2905<dd>
2906<p>
2907ref names without the " (", ")" wrapping.
2908</p>
2909</dd>
2910<dt class="hdlist1">
2911<em>%S</em>
2912</dt>
2913<dd>
2914<p>
2915ref name given on the command line by which the commit was reached
2916 (like <code>git log --source</code>), only works with <code>git log</code>
2917</p>
2918</dd>
2919<dt class="hdlist1">
2920<em>%e</em>
2921</dt>
2922<dd>
2923<p>
2924encoding
2925</p>
2926</dd>
2927<dt class="hdlist1">
2928<em>%s</em>
2929</dt>
2930<dd>
2931<p>
2932subject
2933</p>
2934</dd>
2935<dt class="hdlist1">
2936<em>%f</em>
2937</dt>
2938<dd>
2939<p>
2940sanitized subject line, suitable for a filename
2941</p>
2942</dd>
2943<dt class="hdlist1">
2944<em>%b</em>
2945</dt>
2946<dd>
2947<p>
2948body
2949</p>
2950</dd>
2951<dt class="hdlist1">
2952<em>%B</em>
2953</dt>
2954<dd>
2955<p>
2956raw body (unwrapped subject and body)
2957</p>
2958</dd>
2959<dt class="hdlist1">
2960<em>%N</em>
2961</dt>
2962<dd>
2963<p>
2964commit notes
2965</p>
2966</dd>
2967<dt class="hdlist1">
2968<em>%GG</em>
2969</dt>
2970<dd>
2971<p>
2972raw verification message from GPG for a signed commit
2973</p>
2974</dd>
2975<dt class="hdlist1">
2976<em>%G?</em>
2977</dt>
2978<dd>
2979<p>
2980show "G" for a good (valid) signature,
2981 "B" for a bad signature,
2982 "U" for a good signature with unknown validity,
2983 "X" for a good signature that has expired,
2984 "Y" for a good signature made by an expired key,
2985 "R" for a good signature made by a revoked key,
2986 "E" if the signature cannot be checked (e.g. missing key)
2987 and "N" for no signature
2988</p>
2989</dd>
2990<dt class="hdlist1">
2991<em>%GS</em>
2992</dt>
2993<dd>
2994<p>
2995show the name of the signer for a signed commit
2996</p>
2997</dd>
2998<dt class="hdlist1">
2999<em>%GK</em>
3000</dt>
3001<dd>
3002<p>
3003show the key used to sign a signed commit
3004</p>
3005</dd>
3006<dt class="hdlist1">
3007<em>%GF</em>
3008</dt>
3009<dd>
3010<p>
3011show the fingerprint of the key used to sign a signed commit
3012</p>
3013</dd>
3014<dt class="hdlist1">
3015<em>%GP</em>
3016</dt>
3017<dd>
3018<p>
3019show the fingerprint of the primary key whose subkey was used
3020 to sign a signed commit
3021</p>
3022</dd>
3023<dt class="hdlist1">
Junio C Hamanobee061d2020-01-30 23:21:183024<em>%GT</em>
3025</dt>
3026<dd>
3027<p>
3028show the trust level for the key used to sign a signed commit
3029</p>
3030</dd>
3031<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:003032<em>%gD</em>
3033</dt>
3034<dd>
3035<p>
3036reflog selector, e.g., <code>refs/stash@{1}</code> or <code>refs/stash@{2
Junio C Hamano48cd3f12019-10-09 05:55:303037 minutes ago}</code>; the format follows the rules described for the
Junio C Hamano11f15372019-03-07 03:17:003038 <code>-g</code> option. The portion before the <code>@</code> is the refname as
3039 given on the command line (so <code>git log -g refs/heads/master</code>
3040 would yield <code>refs/heads/master@{0}</code>).
3041</p>
3042</dd>
3043<dt class="hdlist1">
3044<em>%gd</em>
3045</dt>
3046<dd>
3047<p>
3048shortened reflog selector; same as <code>%gD</code>, but the refname
3049 portion is shortened for human readability (so
3050 <code>refs/heads/master</code> becomes just <code>master</code>).
3051</p>
3052</dd>
3053<dt class="hdlist1">
3054<em>%gn</em>
3055</dt>
3056<dd>
3057<p>
3058reflog identity name
3059</p>
3060</dd>
3061<dt class="hdlist1">
3062<em>%gN</em>
3063</dt>
3064<dd>
3065<p>
3066reflog identity name (respecting .mailmap, see
3067 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
3068</p>
3069</dd>
3070<dt class="hdlist1">
3071<em>%ge</em>
3072</dt>
3073<dd>
3074<p>
3075reflog identity email
3076</p>
3077</dd>
3078<dt class="hdlist1">
3079<em>%gE</em>
3080</dt>
3081<dd>
3082<p>
3083reflog identity email (respecting .mailmap, see
3084 <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
3085</p>
3086</dd>
3087<dt class="hdlist1">
3088<em>%gs</em>
3089</dt>
3090<dd>
3091<p>
3092reflog subject
3093</p>
3094</dd>
3095<dt class="hdlist1">
3096<em>%(trailers[:options])</em>
3097</dt>
3098<dd>
3099<p>
3100display the trailers of the body as
3101 interpreted by
3102 <a href="git-interpret-trailers.html">git-interpret-trailers(1)</a>. The
3103 <code>trailers</code> string may be followed by a colon
3104 and zero or more comma-separated options:
3105</p>
3106<div class="ulist"><ul>
3107<li>
3108<p>
3109<em>key=&lt;K&gt;</em>: only show trailers with specified key. Matching is done
3110 case-insensitively and trailing colon is optional. If option is
3111 given multiple times trailer lines matching any of the keys are
3112 shown. This option automatically enables the <code>only</code> option so that
3113 non-trailer lines in the trailer block are hidden. If that is not
3114 desired it can be disabled with <code>only=false</code>. E.g.,
3115 <code>%(trailers:key=Reviewed-by)</code> shows trailer lines with key
3116 <code>Reviewed-by</code>.
Junio C Hamanoa3fd83c2007-03-02 10:34:363117</p>
3118</li>
3119<li>
3120<p>
Junio C Hamano11f15372019-03-07 03:17:003121<em>only[=val]</em>: select whether non-trailer lines from the trailer
3122 block should be included. The <code>only</code> keyword may optionally be
3123 followed by an equal sign and one of <code>true</code>, <code>on</code>, <code>yes</code> to omit or
3124 <code>false</code>, <code>off</code>, <code>no</code> to show the non-trailer lines. If option is
3125 given without value it is enabled. If given multiple times the last
3126 value is used.
Junio C Hamanoa3fd83c2007-03-02 10:34:363127</p>
3128</li>
3129<li>
3130<p>
Junio C Hamano11f15372019-03-07 03:17:003131<em>separator=&lt;SEP&gt;</em>: specify a separator inserted between trailer
3132 lines. When this option is not given each trailer line is
3133 terminated with a line feed character. The string SEP may contain
3134 the literal formatting codes described above. To use comma as
3135 separator one must use <code>%x2C</code> as it would otherwise be parsed as
3136 next option. If separator option is given multiple times only the
3137 last one is used. E.g., <code>%(trailers:key=Ticket,separator=%x2C )</code>
3138 shows all trailer lines whose key is "Ticket" separated by a comma
3139 and a space.
Junio C Hamanoa3fd83c2007-03-02 10:34:363140</p>
3141</li>
3142<li>
3143<p>
Junio C Hamano11f15372019-03-07 03:17:003144<em>unfold[=val]</em>: make it behave as if interpret-trailer&#8217;s <code>--unfold</code>
3145 option was given. In same way as to for <code>only</code> it can be followed
3146 by an equal sign and explicit value. E.g.,
3147 <code>%(trailers:only,unfold=true)</code> unfolds and shows all trailer lines.
Junio C Hamanoa3fd83c2007-03-02 10:34:363148</p>
3149</li>
3150<li>
3151<p>
Junio C Hamano11f15372019-03-07 03:17:003152<em>valueonly[=val]</em>: skip over the key part of the trailer line and only
3153 show the value part. Also this optionally allows explicit value.
Junio C Hamanoa3fd83c2007-03-02 10:34:363154</p>
3155</li>
Junio C Hamano11f15372019-03-07 03:17:003156</ul></div>
3157</dd>
3158</dl></div>
Junio C Hamano04e768d2013-04-23 19:19:263159</li>
Junio C Hamanoba4b9282008-07-06 05:20:313160</ul></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:363161</li>
Junio C Hamanoc21ab052009-10-31 04:03:553162</ul></div>
3163<div class="admonitionblock">
3164<table><tr>
3165<td class="icon">
3166<div class="title">Note</div>
3167</td>
3168<td class="content">Some placeholders may depend on other options given to the
Junio C Hamanoac12f0e2014-09-19 22:32:513169revision traversal engine. For example, the <code>%g*</code> reflog options will
Junio C Hamanoc21ab052009-10-31 04:03:553170insert an empty string unless we are traversing reflog entries (e.g., by
Junio C Hamano00b9f1a2014-09-29 23:11:283171<code>git log -g</code>). The <code>%d</code> and <code>%D</code> placeholders will use the "short"
3172decoration format if <code>--decorate</code> was not already provided on the command
3173line.</td>
Junio C Hamanoc21ab052009-10-31 04:03:553174</tr></table>
3175</div>
Junio C Hamanoac12f0e2014-09-19 22:32:513176<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:593177is inserted immediately before the expansion if and only if the
3178placeholder expands to a non-empty string.</p></div>
Junio C Hamano535c65c2017-06-24 22:51:583179<div class="paragraph"><p>If you add a <code>-</code> (minus sign) after <em>%</em> of a placeholder, all consecutive
3180line-feeds immediately preceding the expansion are deleted if and only if the
Junio C Hamano2bd8a742009-12-01 21:16:593181placeholder expands to an empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593182<div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
Junio C Hamano89a57342010-06-22 23:22:553183is inserted immediately before the expansion if and only if the
3184placeholder expands to a non-empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:593185<div class="ulist"><ul>
Junio C Hamano6fb124c2008-06-13 10:04:013186<li>
3187<p>
3188<em>tformat:</em>
3189</p>
Junio C Hamano68cf15a2010-11-06 01:01:593190<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:013191provides "terminator" semantics instead of "separator" semantics. In
3192other words, each commit has the message terminator character (usually a
3193newline) appended, rather than a separator placed between entries.
3194This means that the final entry of a single-line format will be properly
3195terminated with a new line, just as the "oneline" format does.
Junio C Hamanoba4b9282008-07-06 05:20:313196For example:</p></div>
Junio C Hamano6fb124c2008-06-13 10:04:013197<div class="listingblock">
3198<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513199<pre><code>$ git log -2 --pretty=format:%h 4da45bef \
Junio C Hamano6fb124c2008-06-13 10:04:013200 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
32014da45be
32027134973 -- NO NEWLINE
3203
3204$ git log -2 --pretty=tformat:%h 4da45bef \
3205 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
32064da45be
Junio C Hamanoac12f0e2014-09-19 22:32:5132077134973</code></pre>
Junio C Hamano6fb124c2008-06-13 10:04:013208</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:513209<div class="paragraph"><p>In addition, any unrecognized string that has a <code>%</code> in it is interpreted
3210as if it has <code>tformat:</code> in front of it. For example, these two are
Junio C Hamano0a235222009-03-06 08:21:093211equivalent:</p></div>
3212<div class="listingblock">
3213<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:513214<pre><code>$ git log -2 --pretty=tformat:%h 4da45bef
3215$ git log -2 --pretty=%h 4da45bef</code></pre>
Junio C Hamano0a235222009-03-06 08:21:093216</div></div>
Junio C Hamano6fb124c2008-06-13 10:04:013217</li>
Junio C Hamanoba4b9282008-07-06 05:20:313218</ul></div>
Junio C Hamano1a4e8412005-12-27 08:17:233219</div>
Junio C Hamano9629d4f2012-12-19 00:28:273220</div>
3221<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:593222<h2 id="_common_diff_options">COMMON DIFF OPTIONS</h2>
Junio C Hamanod2c978f2011-03-20 19:42:223223<div class="sectionbody">
3224<div class="dlist"><dl>
3225<dt class="hdlist1">
3226-p
3227</dt>
3228<dt class="hdlist1">
3229-u
3230</dt>
3231<dt class="hdlist1">
3232--patch
3233</dt>
3234<dd>
3235<p>
3236 Generate patch (see section on generating patches).
Junio C Hamanod2c978f2011-03-20 19:42:223237</p>
3238</dd>
3239<dt class="hdlist1">
Junio C Hamano58f587a2013-07-22 19:20:593240-s
3241</dt>
3242<dt class="hdlist1">
3243--no-patch
3244</dt>
3245<dd>
3246<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513247 Suppress diff output. Useful for commands like <code>git show</code> that
3248 show the patch by default, or to cancel the effect of <code>--patch</code>.
Junio C Hamano58f587a2013-07-22 19:20:593249</p>
3250</dd>
3251<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223252-U&lt;n&gt;
3253</dt>
3254<dt class="hdlist1">
3255--unified=&lt;n&gt;
3256</dt>
3257<dd>
3258<p>
3259 Generate diffs with &lt;n&gt; lines of context instead of
Junio C Hamano11f15372019-03-07 03:17:003260 the usual three. Implies <code>--patch</code>.
Junio C Hamanoac12f0e2014-09-19 22:32:513261 Implies <code>-p</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223262</p>
3263</dd>
3264<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:003265--output=&lt;file&gt;
3266</dt>
3267<dd>
3268<p>
3269 Output to a specific file instead of stdout.
3270</p>
3271</dd>
3272<dt class="hdlist1">
3273--output-indicator-new=&lt;char&gt;
3274</dt>
3275<dt class="hdlist1">
3276--output-indicator-old=&lt;char&gt;
3277</dt>
3278<dt class="hdlist1">
3279--output-indicator-context=&lt;char&gt;
3280</dt>
3281<dd>
3282<p>
3283 Specify the character used to indicate new, old or context
3284 lines in the generated patch. Normally they are <em>+</em>, <em>-</em> and
3285 ' ' respectively.
3286</p>
3287</dd>
3288<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223289--raw
3290</dt>
3291<dd>
3292<p>
Junio C Hamano85f1fde2015-06-01 20:37:323293 For each commit, show a summary of changes using the raw diff
3294 format. See the "RAW OUTPUT FORMAT" section of
3295 <a href="git-diff.html">git-diff(1)</a>. This is different from showing the log
3296 itself in raw format, which you can achieve with
3297 <code>--format=raw</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223298</p>
3299</dd>
3300<dt class="hdlist1">
3301--patch-with-raw
3302</dt>
3303<dd>
3304<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513305 Synonym for <code>-p --raw</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223306</p>
3307</dd>
3308<dt class="hdlist1">
Junio C Hamanoad70bf02016-09-26 23:44:273309--indent-heuristic
3310</dt>
Junio C Hamanoa65b6762017-11-06 04:45:423311<dd>
3312<p>
Junio C Hamano14e66832018-06-18 18:32:193313 Enable the heuristic that shifts diff hunk boundaries to make patches
Junio C Hamanoa65b6762017-11-06 04:45:423314 easier to read. This is the default.
3315</p>
3316</dd>
Junio C Hamanoad70bf02016-09-26 23:44:273317<dt class="hdlist1">
3318--no-indent-heuristic
3319</dt>
Junio C Hamano5f888332016-06-13 19:28:313320<dd>
3321<p>
Junio C Hamanoa65b6762017-11-06 04:45:423322 Disable the indent heuristic.
Junio C Hamano5f888332016-06-13 19:28:313323</p>
3324</dd>
3325<dt class="hdlist1">
Junio C Hamano5a73f302011-10-14 05:58:343326--minimal
3327</dt>
3328<dd>
3329<p>
3330 Spend extra time to make sure the smallest possible
3331 diff is produced.
3332</p>
3333</dd>
3334<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223335--patience
3336</dt>
3337<dd>
3338<p>
3339 Generate a diff using the "patience diff" algorithm.
3340</p>
3341</dd>
3342<dt class="hdlist1">
Junio C Hamanoaea9e6b2012-03-07 00:17:113343--histogram
3344</dt>
3345<dd>
3346<p>
3347 Generate a diff using the "histogram diff" algorithm.
3348</p>
3349</dd>
3350<dt class="hdlist1">
Junio C Hamano047135e2017-12-19 21:57:543351--anchored=&lt;text&gt;
3352</dt>
3353<dd>
3354<p>
3355 Generate a diff using the "anchored diff" algorithm.
3356</p>
3357<div class="paragraph"><p>This option may be specified more than once.</p></div>
3358<div class="paragraph"><p>If a line exists in both the source and destination, exists only once,
3359and starts with this text, this algorithm attempts to prevent it from
3360appearing as a deletion or addition in the output. It uses the "patience
3361diff" algorithm internally.</p></div>
3362</dd>
3363<dt class="hdlist1">
Junio C Hamano80ad00d2013-02-18 00:19:033364--diff-algorithm={patience|minimal|histogram|myers}
3365</dt>
3366<dd>
3367<p>
3368 Choose a diff algorithm. The variants are as follows:
3369</p>
3370<div class="openblock">
3371<div class="content">
3372<div class="dlist"><dl>
3373<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513374<code>default</code>, <code>myers</code>
Junio C Hamano80ad00d2013-02-18 00:19:033375</dt>
3376<dd>
3377<p>
3378 The basic greedy diff algorithm. Currently, this is the default.
3379</p>
3380</dd>
3381<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513382<code>minimal</code>
Junio C Hamano80ad00d2013-02-18 00:19:033383</dt>
3384<dd>
3385<p>
3386 Spend extra time to make sure the smallest possible diff is
3387 produced.
3388</p>
3389</dd>
3390<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513391<code>patience</code>
Junio C Hamano80ad00d2013-02-18 00:19:033392</dt>
3393<dd>
3394<p>
3395 Use "patience diff" algorithm when generating patches.
3396</p>
3397</dd>
3398<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513399<code>histogram</code>
Junio C Hamano80ad00d2013-02-18 00:19:033400</dt>
3401<dd>
3402<p>
3403 This algorithm extends the patience algorithm to "support
3404 low-occurrence common elements".
3405</p>
3406</dd>
3407</dl></div>
3408</div></div>
Junio C Hamano14e66832018-06-18 18:32:193409<div class="paragraph"><p>For instance, if you configured the <code>diff.algorithm</code> variable to a
Junio C Hamano80ad00d2013-02-18 00:19:033410non-default value and want to use the default one, then you
Junio C Hamanoac12f0e2014-09-19 22:32:513411have to use <code>--diff-algorithm=default</code> option.</p></div>
Junio C Hamano80ad00d2013-02-18 00:19:033412</dd>
3413<dt class="hdlist1">
Junio C Hamano4c4b0122011-06-30 01:19:323414--stat[=&lt;width&gt;[,&lt;name-width&gt;[,&lt;count&gt;]]]
Junio C Hamanod2c978f2011-03-20 19:42:223415</dt>
3416<dd>
3417<p>
Junio C Hamanoaea9e6b2012-03-07 00:17:113418 Generate a diffstat. By default, as much space as necessary
3419 will be used for the filename part, and the rest for the graph
3420 part. Maximum width defaults to terminal width, or 80 columns
Junio C Hamano7f2b3cb2012-06-22 22:42:393421 if not connected to a terminal, and can be overridden by
Junio C Hamanoac12f0e2014-09-19 22:32:513422 <code>&lt;width&gt;</code>. The width of the filename part can be limited by
3423 giving another width <code>&lt;name-width&gt;</code> after a comma. The width
Junio C Hamanoaea9e6b2012-03-07 00:17:113424 of the graph part can be limited by using
Junio C Hamanoac12f0e2014-09-19 22:32:513425 <code>--stat-graph-width=&lt;width&gt;</code> (affects all commands generating
3426 a stat graph) or by setting <code>diff.statGraphWidth=&lt;width&gt;</code>
3427 (does not affect <code>git format-patch</code>).
3428 By giving a third parameter <code>&lt;count&gt;</code>, you can limit the
3429 output to the first <code>&lt;count&gt;</code> lines, followed by <code>...</code> if
Junio C Hamanoaea9e6b2012-03-07 00:17:113430 there are more.
Junio C Hamanod2c978f2011-03-20 19:42:223431</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513432<div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=&lt;width&gt;</code>,
3433<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:223434</dd>
3435<dt class="hdlist1">
Junio C Hamano45badf02018-03-14 21:56:413436--compact-summary
3437</dt>
3438<dd>
3439<p>
3440 Output a condensed summary of extended header information such
3441 as file creations or deletions ("new" or "gone", optionally "+l"
3442 if it&#8217;s a symlink) and mode changes ("+x" or "-x" for adding
3443 or removing executable bit respectively) in diffstat. The
Junio C Hamanofa2915c2018-06-19 19:50:183444 information is put between the filename part and the graph
Junio C Hamano45badf02018-03-14 21:56:413445 part. Implies <code>--stat</code>.
3446</p>
3447</dd>
3448<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223449--numstat
3450</dt>
3451<dd>
3452<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513453 Similar to <code>--stat</code>, but shows number of added and
Junio C Hamanod2c978f2011-03-20 19:42:223454 deleted lines in decimal notation and pathname without
3455 abbreviation, to make it more machine friendly. For
Junio C Hamanoac12f0e2014-09-19 22:32:513456 binary files, outputs two <code>-</code> instead of saying
3457 <code>0 0</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223458</p>
3459</dd>
3460<dt class="hdlist1">
3461--shortstat
3462</dt>
3463<dd>
3464<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513465 Output only the last line of the <code>--stat</code> format containing total
Junio C Hamanod2c978f2011-03-20 19:42:223466 number of modified files, as well as number of added and deleted
3467 lines.
3468</p>
3469</dd>
3470<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:003471-X[&lt;param1,param2,&#8230;&gt;]
3472</dt>
3473<dt class="hdlist1">
Junio C Hamano1c222c52011-05-13 19:55:323474--dirstat[=&lt;param1,param2,&#8230;&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:223475</dt>
3476<dd>
3477<p>
Junio C Hamano1c222c52011-05-13 19:55:323478 Output the distribution of relative amount of changes for each
Junio C Hamanoac12f0e2014-09-19 22:32:513479 sub-directory. The behavior of <code>--dirstat</code> can be customized by
Junio C Hamano1c222c52011-05-13 19:55:323480 passing it a comma separated list of parameters.
Junio C Hamanoac12f0e2014-09-19 22:32:513481 The defaults are controlled by the <code>diff.dirstat</code> configuration
Junio C Hamanoa28a9202012-06-21 07:08:233482 variable (see <a href="git-config.html">git-config(1)</a>).
Junio C Hamano1c222c52011-05-13 19:55:323483 The following parameters are available:
Junio C Hamanod2c978f2011-03-20 19:42:223484</p>
Junio C Hamano9629d4f2012-12-19 00:28:273485<div class="openblock">
3486<div class="content">
Junio C Hamano1c222c52011-05-13 19:55:323487<div class="dlist"><dl>
3488<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513489<code>changes</code>
Junio C Hamano1c222c52011-05-13 19:55:323490</dt>
3491<dd>
3492<p>
3493 Compute the dirstat numbers by counting the lines that have been
3494 removed from the source, or added to the destination. This ignores
3495 the amount of pure code movements within a file. In other words,
3496 rearranging lines in a file is not counted as much as other changes.
3497 This is the default behavior when no parameter is given.
3498</p>
Junio C Hamanod2c978f2011-03-20 19:42:223499</dd>
3500<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513501<code>lines</code>
Junio C Hamanod2c978f2011-03-20 19:42:223502</dt>
3503<dd>
3504<p>
Junio C Hamano1c222c52011-05-13 19:55:323505 Compute the dirstat numbers by doing the regular line-based diff
3506 analysis, and summing the removed/added line counts. (For binary
3507 files, count 64-byte chunks instead, since binary files have no
Junio C Hamanoac12f0e2014-09-19 22:32:513508 natural concept of lines). This is a more expensive <code>--dirstat</code>
3509 behavior than the <code>changes</code> behavior, but it does count rearranged
Junio C Hamano1c222c52011-05-13 19:55:323510 lines within a file as much as other changes. The resulting output
Junio C Hamanoac12f0e2014-09-19 22:32:513511 is consistent with what you get from the other <code>--*stat</code> options.
Junio C Hamanod2c978f2011-03-20 19:42:223512</p>
3513</dd>
3514<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513515<code>files</code>
Junio C Hamano1c222c52011-05-13 19:55:323516</dt>
3517<dd>
3518<p>
3519 Compute the dirstat numbers by counting the number of files changed.
3520 Each changed file counts equally in the dirstat analysis. This is
Junio C Hamanoac12f0e2014-09-19 22:32:513521 the computationally cheapest <code>--dirstat</code> behavior, since it does
Junio C Hamano1c222c52011-05-13 19:55:323522 not have to look at the file contents at all.
3523</p>
3524</dd>
3525<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:513526<code>cumulative</code>
Junio C Hamano1c222c52011-05-13 19:55:323527</dt>
3528<dd>
3529<p>
3530 Count changes in a child directory for the parent directory as well.
Junio C Hamanoac12f0e2014-09-19 22:32:513531 Note that when using <code>cumulative</code>, the sum of the percentages
Junio C Hamano1c222c52011-05-13 19:55:323532 reported may exceed 100%. The default (non-cumulative) behavior can
Junio C Hamanoac12f0e2014-09-19 22:32:513533 be specified with the <code>noncumulative</code> parameter.
Junio C Hamano1c222c52011-05-13 19:55:323534</p>
3535</dd>
3536<dt class="hdlist1">
3537&lt;limit&gt;
3538</dt>
3539<dd>
3540<p>
3541 An integer parameter specifies a cut-off percent (3% by default).
3542 Directories contributing less than this percentage of the changes
3543 are not shown in the output.
3544</p>
3545</dd>
3546</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:273547</div></div>
Junio C Hamano1c222c52011-05-13 19:55:323548<div class="paragraph"><p>Example: The following will count changed files, while ignoring
3549directories with less than 10% of the total amount of changed files,
3550and accumulating child directory counts in the parent directories:
Junio C Hamanoac12f0e2014-09-19 22:32:513551<code>--dirstat=files,10,cumulative</code>.</p></div>
Junio C Hamano1c222c52011-05-13 19:55:323552</dd>
3553<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:003554--cumulative
3555</dt>
3556<dd>
3557<p>
3558 Synonym for --dirstat=cumulative
3559</p>
3560</dd>
3561<dt class="hdlist1">
3562--dirstat-by-file[=&lt;param1,param2&gt;&#8230;]
3563</dt>
3564<dd>
3565<p>
3566 Synonym for --dirstat=files,param1,param2&#8230;
3567</p>
3568</dd>
3569<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223570--summary
3571</dt>
3572<dd>
3573<p>
3574 Output a condensed summary of extended header information
3575 such as creations, renames and mode changes.
3576</p>
3577</dd>
3578<dt class="hdlist1">
3579--patch-with-stat
3580</dt>
3581<dd>
3582<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513583 Synonym for <code>-p --stat</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223584</p>
3585</dd>
3586<dt class="hdlist1">
3587-z
3588</dt>
3589<dd>
3590<p>
3591 Separate the commits with NULs instead of with new newlines.
3592</p>
Junio C Hamanoac12f0e2014-09-19 22:32:513593<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:223594pathnames and use NULs as output field terminators.</p></div>
Junio C Hamano0f6f3bf2017-03-13 07:01:533595<div class="paragraph"><p>Without this option, pathnames with "unusual" characters are quoted as
3596explained for the configuration variable <code>core.quotePath</code> (see
3597<a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223598</dd>
3599<dt class="hdlist1">
3600--name-only
3601</dt>
3602<dd>
3603<p>
3604 Show only names of changed files.
3605</p>
3606</dd>
3607<dt class="hdlist1">
3608--name-status
3609</dt>
3610<dd>
3611<p>
3612 Show only names and status of changed files. See the description
Junio C Hamanoac12f0e2014-09-19 22:32:513613 of the <code>--diff-filter</code> option on what the status letters mean.
Junio C Hamanod2c978f2011-03-20 19:42:223614</p>
3615</dd>
3616<dt class="hdlist1">
3617--submodule[=&lt;format&gt;]
3618</dt>
3619<dd>
3620<p>
Junio C Hamanocd451662016-09-13 00:54:093621 Specify how differences in submodules are shown. When specifying
3622 <code>--submodule=short</code> the <em>short</em> format is used. This format just
3623 shows the names of the commits at the beginning and end of the range.
3624 When <code>--submodule</code> or <code>--submodule=log</code> is specified, the <em>log</em>
3625 format is used. This format lists the commits in the range like
3626 <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does. When <code>--submodule=diff</code>
3627 is specified, the <em>diff</em> format is used. This format shows an
3628 inline diff of the changes in the submodule contents between the
3629 commit range. Defaults to <code>diff.submodule</code> or the <em>short</em> format
3630 if the config option is unset.
Junio C Hamanod2c978f2011-03-20 19:42:223631</p>
3632</dd>
3633<dt class="hdlist1">
3634--color[=&lt;when&gt;]
3635</dt>
3636<dd>
3637<p>
3638 Show colored diff.
Junio C Hamanoac12f0e2014-09-19 22:32:513639 <code>--color</code> (i.e. without <em>=&lt;when&gt;</em>) is the same as <code>--color=always</code>.
3640 <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:223641</p>
3642</dd>
3643<dt class="hdlist1">
3644--no-color
3645</dt>
3646<dd>
3647<p>
Junio C Hamano5f2627d2011-05-06 20:23:483648 Turn off colored diff.
Junio C Hamanoac12f0e2014-09-19 22:32:513649 It is the same as <code>--color=never</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223650</p>
3651</dd>
3652<dt class="hdlist1">
Junio C Hamanofb1fdf12017-08-27 06:14:593653--color-moved[=&lt;mode&gt;]
3654</dt>
3655<dd>
3656<p>
3657 Moved lines of code are colored differently.
3658 The &lt;mode&gt; defaults to <em>no</em> if the option is not given
3659 and to <em>zebra</em> if the option with no mode is given.
3660 The mode must be one of:
3661</p>
3662<div class="openblock">
3663<div class="content">
3664<div class="dlist"><dl>
3665<dt class="hdlist1">
3666no
3667</dt>
3668<dd>
3669<p>
3670 Moved lines are not highlighted.
3671</p>
3672</dd>
3673<dt class="hdlist1">
3674default
3675</dt>
3676<dd>
3677<p>
3678 Is a synonym for <code>zebra</code>. This may change to a more sensible mode
3679 in the future.
3680</p>
3681</dd>
3682<dt class="hdlist1">
3683plain
3684</dt>
3685<dd>
3686<p>
3687 Any line that is added in one location and was removed
3688 in another location will be colored with <em>color.diff.newMoved</em>.
3689 Similarly <em>color.diff.oldMoved</em> will be used for removed lines
3690 that are added somewhere else in the diff. This mode picks up any
3691 moved line, but it is not very useful in a review to determine
3692 if a block of code was moved without permutation.
3693</p>
3694</dd>
3695<dt class="hdlist1">
Junio C Hamanof09b7cd2018-08-02 23:01:453696blocks
Junio C Hamanofb1fdf12017-08-27 06:14:593697</dt>
3698<dd>
3699<p>
3700 Blocks of moved text of at least 20 alphanumeric characters
3701 are detected greedily. The detected blocks are
Junio C Hamanof09b7cd2018-08-02 23:01:453702 painted using either the <em>color.diff.{old,new}Moved</em> color.
3703 Adjacent blocks cannot be told apart.
3704</p>
3705</dd>
3706<dt class="hdlist1">
3707zebra
3708</dt>
3709<dd>
3710<p>
3711 Blocks of moved text are detected as in <em>blocks</em> mode. The blocks
3712 are painted using either the <em>color.diff.{old,new}Moved</em> color or
Junio C Hamanofb1fdf12017-08-27 06:14:593713 <em>color.diff.{old,new}MovedAlternative</em>. The change between
3714 the two colors indicates that a new block was detected.
3715</p>
3716</dd>
3717<dt class="hdlist1">
Junio C Hamanobfd91f42018-08-17 22:21:163718dimmed-zebra
Junio C Hamanofb1fdf12017-08-27 06:14:593719</dt>
3720<dd>
3721<p>
3722 Similar to <em>zebra</em>, but additional dimming of uninteresting parts
3723 of moved code is performed. The bordering lines of two adjacent
3724 blocks are considered interesting, the rest is uninteresting.
Junio C Hamanobfd91f42018-08-17 22:21:163725 <code>dimmed_zebra</code> is a deprecated synonym.
Junio C Hamanofb1fdf12017-08-27 06:14:593726</p>
3727</dd>
3728</dl></div>
3729</div></div>
3730</dd>
3731<dt class="hdlist1">
Junio C Hamanoa90214f2019-01-28 22:05:253732--no-color-moved
3733</dt>
3734<dd>
3735<p>
3736 Turn off move detection. This can be used to override configuration
3737 settings. It is the same as <code>--color-moved=no</code>.
3738</p>
3739</dd>
3740<dt class="hdlist1">
Junio C Hamanof09b7cd2018-08-02 23:01:453741--color-moved-ws=&lt;modes&gt;
3742</dt>
3743<dd>
3744<p>
Junio C Hamanoa90214f2019-01-28 22:05:253745 This configures how whitespace is ignored when performing the
Junio C Hamanof09b7cd2018-08-02 23:01:453746 move detection for <code>--color-moved</code>.
3747 These modes can be given as a comma separated list:
3748</p>
3749<div class="openblock">
3750<div class="content">
3751<div class="dlist"><dl>
3752<dt class="hdlist1">
Junio C Hamanoa90214f2019-01-28 22:05:253753no
3754</dt>
3755<dd>
3756<p>
3757 Do not ignore whitespace when performing move detection.
3758</p>
3759</dd>
3760<dt class="hdlist1">
Junio C Hamanof09b7cd2018-08-02 23:01:453761ignore-space-at-eol
3762</dt>
3763<dd>
3764<p>
3765 Ignore changes in whitespace at EOL.
3766</p>
3767</dd>
3768<dt class="hdlist1">
3769ignore-space-change
3770</dt>
3771<dd>
3772<p>
3773 Ignore changes in amount of whitespace. This ignores whitespace
3774 at line end, and considers all other sequences of one or
3775 more whitespace characters to be equivalent.
3776</p>
3777</dd>
3778<dt class="hdlist1">
3779ignore-all-space
3780</dt>
3781<dd>
3782<p>
3783 Ignore whitespace when comparing lines. This ignores differences
3784 even if one line has whitespace where the other line has none.
3785</p>
3786</dd>
3787<dt class="hdlist1">
3788allow-indentation-change
3789</dt>
3790<dd>
3791<p>
Junio C Hamanoa90214f2019-01-28 22:05:253792 Initially ignore any whitespace in the move detection, then
Junio C Hamanof09b7cd2018-08-02 23:01:453793 group the moved code blocks only into a block if the change in
3794 whitespace is the same per line. This is incompatible with the
3795 other modes.
3796</p>
3797</dd>
3798</dl></div>
3799</div></div>
3800</dd>
3801<dt class="hdlist1">
Junio C Hamanoa90214f2019-01-28 22:05:253802--no-color-moved-ws
3803</dt>
3804<dd>
3805<p>
3806 Do not ignore whitespace when performing move detection. This can be
3807 used to override configuration settings. It is the same as
3808 <code>--color-moved-ws=no</code>.
3809</p>
3810</dd>
3811<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223812--word-diff[=&lt;mode&gt;]
3813</dt>
3814<dd>
3815<p>
3816 Show a word diff, using the &lt;mode&gt; to delimit changed words.
3817 By default, words are delimited by whitespace; see
Junio C Hamanoac12f0e2014-09-19 22:32:513818 <code>--word-diff-regex</code> below. The &lt;mode&gt; defaults to <em>plain</em>, and
Junio C Hamanod2c978f2011-03-20 19:42:223819 must be one of:
3820</p>
Junio C Hamano9629d4f2012-12-19 00:28:273821<div class="openblock">
3822<div class="content">
Junio C Hamanod2c978f2011-03-20 19:42:223823<div class="dlist"><dl>
3824<dt class="hdlist1">
3825color
3826</dt>
3827<dd>
3828<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513829 Highlight changed words using only colors. Implies <code>--color</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223830</p>
3831</dd>
3832<dt class="hdlist1">
3833plain
3834</dt>
3835<dd>
3836<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513837 Show words as <code>[-removed-]</code> and <code>{+added+}</code>. Makes no
Junio C Hamanod2c978f2011-03-20 19:42:223838 attempts to escape the delimiters if they appear in the input,
3839 so the output may be ambiguous.
3840</p>
3841</dd>
3842<dt class="hdlist1">
3843porcelain
3844</dt>
3845<dd>
3846<p>
3847 Use a special line-based format intended for script
3848 consumption. Added/removed/unchanged runs are printed in the
Junio C Hamanoac12f0e2014-09-19 22:32:513849 usual unified diff format, starting with a <code>+</code>/<code>-</code>/` `
Junio C Hamanod2c978f2011-03-20 19:42:223850 character at the beginning of the line and extending to the
3851 end of the line. Newlines in the input are represented by a
Junio C Hamanoac12f0e2014-09-19 22:32:513852 tilde <code>~</code> on a line of its own.
Junio C Hamanod2c978f2011-03-20 19:42:223853</p>
3854</dd>
3855<dt class="hdlist1">
3856none
3857</dt>
3858<dd>
3859<p>
3860 Disable word diff again.
3861</p>
3862</dd>
3863</dl></div>
Junio C Hamano9629d4f2012-12-19 00:28:273864</div></div>
Junio C Hamanod2c978f2011-03-20 19:42:223865<div class="paragraph"><p>Note that despite the name of the first mode, color is used to
3866highlight the changed parts in all modes if enabled.</p></div>
3867</dd>
3868<dt class="hdlist1">
3869--word-diff-regex=&lt;regex&gt;
3870</dt>
3871<dd>
3872<p>
3873 Use &lt;regex&gt; to decide what a word is, instead of considering
3874 runs of non-whitespace to be a word. Also implies
Junio C Hamanoac12f0e2014-09-19 22:32:513875 <code>--word-diff</code> unless it was already enabled.
Junio C Hamanod2c978f2011-03-20 19:42:223876</p>
3877<div class="paragraph"><p>Every non-overlapping match of the
3878&lt;regex&gt; is considered a word. Anything between these matches is
3879considered whitespace and ignored(!) for the purposes of finding
Junio C Hamanoac12f0e2014-09-19 22:32:513880differences. You may want to append <code>|[^[:space:]]</code> to your regular
Junio C Hamanod2c978f2011-03-20 19:42:223881expression to make sure that it matches all non-whitespace characters.
3882A match that contains a newline is silently truncated(!) at the
3883newline.</p></div>
Junio C Hamano713eded2015-12-03 00:24:023884<div class="paragraph"><p>For example, <code>--word-diff-regex=.</code> will treat each character as a word
3885and, correspondingly, show differences character by character.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:223886<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:243887<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:223888overrides any diff driver or configuration setting. Diff drivers
3889override configuration settings.</p></div>
3890</dd>
3891<dt class="hdlist1">
3892--color-words[=&lt;regex&gt;]
3893</dt>
3894<dd>
3895<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513896 Equivalent to <code>--word-diff=color</code> plus (if a regex was
3897 specified) <code>--word-diff-regex=&lt;regex&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223898</p>
3899</dd>
3900<dt class="hdlist1">
3901--no-renames
3902</dt>
3903<dd>
3904<p>
3905 Turn off rename detection, even when the configuration
3906 file gives the default to do so.
3907</p>
3908</dd>
3909<dt class="hdlist1">
Junio C Hamano11f15372019-03-07 03:17:003910--[no-]rename-empty
3911</dt>
3912<dd>
3913<p>
3914 Whether to use empty blobs as rename source.
3915</p>
3916</dd>
3917<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223918--check
3919</dt>
3920<dd>
3921<p>
Junio C Hamano84ea1e42016-04-08 21:53:483922 Warn if changes introduce conflict markers or whitespace errors.
3923 What are considered whitespace errors is controlled by <code>core.whitespace</code>
Junio C Hamano6005bfa2011-06-23 00:51:223924 configuration. By default, trailing whitespaces (including
Junio C Hamano14e66832018-06-18 18:32:193925 lines that consist solely of whitespaces) and a space character
Junio C Hamano6005bfa2011-06-23 00:51:223926 that is immediately followed by a tab character inside the
3927 initial indent of the line are considered whitespace errors.
3928 Exits with non-zero status if problems are found. Not compatible
3929 with --exit-code.
Junio C Hamanod2c978f2011-03-20 19:42:223930</p>
3931</dd>
3932<dt class="hdlist1">
Junio C Hamano8c5d5942015-06-11 19:37:483933--ws-error-highlight=&lt;kind&gt;
3934</dt>
3935<dd>
3936<p>
Junio C Hamano4b2a6c12017-08-22 18:32:373937 Highlight whitespace errors in the <code>context</code>, <code>old</code> or <code>new</code>
3938 lines of the diff. Multiple values are separated by comma,
3939 <code>none</code> resets previous values, <code>default</code> reset the list to
3940 <code>new</code> and <code>all</code> is a shorthand for <code>old,new,context</code>. When
3941 this option is not given, and the configuration variable
3942 <code>diff.wsErrorHighlight</code> is not set, only whitespace errors in
3943 <code>new</code> lines are highlighted. The whitespace errors are colored
Junio C Hamano14e66832018-06-18 18:32:193944 with <code>color.diff.whitespace</code>.
Junio C Hamano8c5d5942015-06-11 19:37:483945</p>
3946</dd>
3947<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:223948--full-index
3949</dt>
3950<dd>
3951<p>
3952 Instead of the first handful of characters, show the full
3953 pre- and post-image blob object names on the "index"
3954 line when generating patch format output.
3955</p>
3956</dd>
3957<dt class="hdlist1">
3958--binary
3959</dt>
3960<dd>
3961<p>
Junio C Hamanoac12f0e2014-09-19 22:32:513962 In addition to <code>--full-index</code>, output a binary diff that
Junio C Hamano6b7d2152019-04-16 12:51:153963 can be applied with <code>git-apply</code>. Implies <code>--patch</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223964</p>
3965</dd>
3966<dt class="hdlist1">
3967--abbrev[=&lt;n&gt;]
3968</dt>
3969<dd>
3970<p>
3971 Instead of showing the full 40-byte hexadecimal object
3972 name in diff-raw format output and diff-tree header
3973 lines, show only a partial prefix. This is
Junio C Hamanoac12f0e2014-09-19 22:32:513974 independent of the <code>--full-index</code> option above, which controls
Junio C Hamanod2c978f2011-03-20 19:42:223975 the diff-patch output format. Non default number of
Junio C Hamanoac12f0e2014-09-19 22:32:513976 digits can be specified with <code>--abbrev=&lt;n&gt;</code>.
Junio C Hamanod2c978f2011-03-20 19:42:223977</p>
3978</dd>
3979<dt class="hdlist1">
3980-B[&lt;n&gt;][/&lt;m&gt;]
3981</dt>
3982<dt class="hdlist1">
3983--break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]
3984</dt>
3985<dd>
3986<p>
3987 Break complete rewrite changes into pairs of delete and
3988 create. This serves two purposes:
3989</p>
3990<div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file
3991not as a series of deletion and insertion mixed together with a very
3992few lines that happen to match textually as the context, but as a
3993single deletion of everything old followed by a single insertion of
Junio C Hamanoac12f0e2014-09-19 22:32:513994everything new, and the number <code>m</code> controls this aspect of the -B
3995option (defaults to 60%). <code>-B/70%</code> specifies that less than 30% of the
Junio C Hamano076ffcc2013-02-06 05:13:213996original should remain in the result for Git to consider it a total
Junio C Hamanod2c978f2011-03-20 19:42:223997rewrite (i.e. otherwise the resulting patch will be a series of
3998deletion and insertion mixed together with context lines).</p></div>
3999<div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
4000source of a rename (usually -M only considers a file that disappeared
Junio C Hamanoac12f0e2014-09-19 22:32:514001as the source of a rename), and the number <code>n</code> controls this aspect of
4002the -B option (defaults to 50%). <code>-B20%</code> specifies that a change with
Junio C Hamanod2c978f2011-03-20 19:42:224003addition and deletion compared to 20% or more of the file&#8217;s size are
4004eligible for being picked up as a possible source of a rename to
4005another file.</p></div>
4006</dd>
4007<dt class="hdlist1">
4008-M[&lt;n&gt;]
4009</dt>
4010<dt class="hdlist1">
4011--find-renames[=&lt;n&gt;]
4012</dt>
4013<dd>
4014<p>
4015 If generating diffs, detect and report renames for each commit.
4016 For following files across renames while traversing history, see
Junio C Hamanoac12f0e2014-09-19 22:32:514017 <code>--follow</code>.
4018 If <code>n</code> is specified, it is a threshold on the similarity
Junio C Hamanod2c978f2011-03-20 19:42:224019 index (i.e. amount of addition/deletions compared to the
Junio C Hamanoac12f0e2014-09-19 22:32:514020 file&#8217;s size). For example, <code>-M90%</code> means Git should consider a
Junio C Hamanod2c978f2011-03-20 19:42:224021 delete/add pair to be a rename if more than 90% of the file
Junio C Hamanoac12f0e2014-09-19 22:32:514022 hasn&#8217;t changed. Without a <code>%</code> sign, the number is to be read as
4023 a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes
4024 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is
4025 the same as <code>-M5%</code>. To limit detection to exact renames, use
4026 <code>-M100%</code>. The default similarity index is 50%.
Junio C Hamanod2c978f2011-03-20 19:42:224027</p>
4028</dd>
4029<dt class="hdlist1">
4030-C[&lt;n&gt;]
4031</dt>
4032<dt class="hdlist1">
4033--find-copies[=&lt;n&gt;]
4034</dt>
4035<dd>
4036<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514037 Detect copies as well as renames. See also <code>--find-copies-harder</code>.
4038 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:224039</p>
4040</dd>
4041<dt class="hdlist1">
4042--find-copies-harder
4043</dt>
4044<dd>
4045<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514046 For performance reasons, by default, <code>-C</code> option finds copies only
Junio C Hamanod2c978f2011-03-20 19:42:224047 if the original file of the copy was modified in the same
4048 changeset. This flag makes the command
4049 inspect unmodified files as candidates for the source of
4050 copy. This is a very expensive operation for large
4051 projects, so use it with caution. Giving more than one
Junio C Hamanoac12f0e2014-09-19 22:32:514052 <code>-C</code> option has the same effect.
Junio C Hamanod2c978f2011-03-20 19:42:224053</p>
4054</dd>
4055<dt class="hdlist1">
Junio C Hamanob02377c2011-04-28 22:26:024056-D
4057</dt>
4058<dt class="hdlist1">
4059--irreversible-delete
4060</dt>
4061<dd>
4062<p>
4063 Omit the preimage for deletes, i.e. print only the header but not
Junio C Hamanoac12f0e2014-09-19 22:32:514064 the diff between the preimage and <code>/dev/null</code>. The resulting patch
4065 is not meant to be applied with <code>patch</code> or <code>git apply</code>; this is
Junio C Hamanob02377c2011-04-28 22:26:024066 solely for people who want to just concentrate on reviewing the
Junio C Hamanod16fd1b2017-08-04 16:41:514067 text after the change. In addition, the output obviously lacks
Junio C Hamanob02377c2011-04-28 22:26:024068 enough information to apply such a patch in reverse, even manually,
4069 hence the name of the option.
4070</p>
Junio C Hamanoac12f0e2014-09-19 22:32:514071<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:024072of a delete/create pair.</p></div>
4073</dd>
4074<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224075-l&lt;num&gt;
4076</dt>
4077<dd>
4078<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514079 The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n
Junio C Hamanod2c978f2011-03-20 19:42:224080 is the number of potential rename/copy targets. This
4081 option prevents rename/copy detection from running if
4082 the number of rename/copy targets exceeds the specified
4083 number.
4084</p>
4085</dd>
4086<dt class="hdlist1">
4087--diff-filter=[(A|C|D|M|R|T|U|X|B)&#8230;[*]]
4088</dt>
4089<dd>
4090<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514091 Select only files that are Added (<code>A</code>), Copied (<code>C</code>),
4092 Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their
4093 type (i.e. regular file, symlink, submodule, &#8230;) changed (<code>T</code>),
4094 are Unmerged (<code>U</code>), are
4095 Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>).
Junio C Hamanod2c978f2011-03-20 19:42:224096 Any combination of the filter characters (including none) can be used.
Junio C Hamanoac12f0e2014-09-19 22:32:514097 When <code>*</code> (All-or-none) is added to the combination, all
Junio C Hamanod2c978f2011-03-20 19:42:224098 paths are selected if there is any file that matches
4099 other criteria in the comparison; if there is no file
4100 that matches other criteria, nothing is selected.
4101</p>
Junio C Hamanoeed15af2016-07-25 22:49:424102<div class="paragraph"><p>Also, these upper-case letters can be downcased to exclude. E.g.
4103<code>--diff-filter=ad</code> excludes added and deleted paths.</p></div>
Junio C Hamano3a34f152018-01-09 23:09:384104<div class="paragraph"><p>Note that not all diffs can feature all types. For instance, diffs
4105from the index to the working tree can never have Added entries
4106(because the set of paths included in the diff is limited by what is in
4107the index). Similarly, copied and renamed entries cannot appear if
4108detection for those types is disabled.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:224109</dd>
4110<dt class="hdlist1">
4111-S&lt;string&gt;
4112</dt>
4113<dd>
4114<p>
Junio C Hamanof1f5a7b2013-06-11 22:23:524115 Look for differences that change the number of occurrences of
4116 the specified string (i.e. addition/deletion) in a file.
4117 Intended for the scripter&#8217;s use.
Junio C Hamanod2c978f2011-03-20 19:42:224118</p>
Junio C Hamanof1f5a7b2013-06-11 22:23:524119<div class="paragraph"><p>It is useful when you&#8217;re looking for an exact block of code (like a
4120struct), and want to know the history of that block since it first
4121came into being: use the feature iteratively to feed the interesting
Junio C Hamanoac12f0e2014-09-19 22:32:514122block in the preimage back into <code>-S</code>, and keep going until you get the
Junio C Hamanof1f5a7b2013-06-11 22:23:524123very first version of the block.</p></div>
Junio C Hamanoace33e42019-01-18 23:16:054124<div class="paragraph"><p>Binary files are searched as well.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:224125</dd>
4126<dt class="hdlist1">
4127-G&lt;regex&gt;
4128</dt>
4129<dd>
4130<p>
Junio C Hamanof1f5a7b2013-06-11 22:23:524131 Look for differences whose patch text contains added/removed
4132 lines that match &lt;regex&gt;.
Junio C Hamanod2c978f2011-03-20 19:42:224133</p>
Junio C Hamanoac12f0e2014-09-19 22:32:514134<div class="paragraph"><p>To illustrate the difference between <code>-S&lt;regex&gt; --pickaxe-regex</code> and
4135<code>-G&lt;regex&gt;</code>, consider a commit with the following diff in the same
Junio C Hamanof1f5a7b2013-06-11 22:23:524136file:</p></div>
4137<div class="listingblock">
4138<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514139<pre><code>+ return !regexec(regexp, two-&gt;ptr, 1, &amp;regmatch, 0);
Junio C Hamanof1f5a7b2013-06-11 22:23:524140...
Junio C Hamanoac12f0e2014-09-19 22:32:514141- hit = !regexec(regexp, mf2.ptr, 1, &amp;regmatch, 0);</code></pre>
Junio C Hamanof1f5a7b2013-06-11 22:23:524142</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514143<div class="paragraph"><p>While <code>git log -G"regexec\(regexp"</code> will show this commit, <code>git log
4144-S"regexec\(regexp" --pickaxe-regex</code> will not (because the number of
Junio C Hamanof1f5a7b2013-06-11 22:23:524145occurrences of that string did not change).</p></div>
Junio C Hamanoace33e42019-01-18 23:16:054146<div class="paragraph"><p>Unless <code>--text</code> is supplied patches of binary files without a textconv
4147filter will be ignored.</p></div>
Junio C Hamanof1f5a7b2013-06-11 22:23:524148<div class="paragraph"><p>See the <em>pickaxe</em> entry in <a href="gitdiffcore.html">gitdiffcore(7)</a> for more
4149information.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:224150</dd>
4151<dt class="hdlist1">
Junio C Hamano7b9cce92018-01-23 22:34:274152--find-object=&lt;object-id&gt;
4153</dt>
4154<dd>
4155<p>
4156 Look for differences that change the number of occurrences of
4157 the specified object. Similar to <code>-S</code>, just the argument is different
4158 in that it doesn&#8217;t search for a specific string but for a specific
4159 object id.
4160</p>
4161<div class="paragraph"><p>The object can be a blob or a submodule commit. It implies the <code>-t</code> option in
4162<code>git-log</code> to also find trees.</p></div>
4163</dd>
4164<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224165--pickaxe-all
4166</dt>
4167<dd>
4168<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514169 When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that
Junio C Hamanod2c978f2011-03-20 19:42:224170 changeset, not just the files that contain the change
4171 in &lt;string&gt;.
4172</p>
4173</dd>
4174<dt class="hdlist1">
4175--pickaxe-regex
4176</dt>
4177<dd>
4178<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514179 Treat the &lt;string&gt; given to <code>-S</code> as an extended POSIX regular
Junio C Hamanof1f5a7b2013-06-11 22:23:524180 expression to match.
Junio C Hamanod2c978f2011-03-20 19:42:224181</p>
4182</dd>
4183<dt class="hdlist1">
4184-O&lt;orderfile&gt;
4185</dt>
4186<dd>
4187<p>
Junio C Hamanobcd98f42017-01-24 00:12:164188 Control the order in which files appear in the output.
Junio C Hamano322c6242015-03-23 21:32:464189 This overrides the <code>diff.orderFile</code> configuration variable
4190 (see <a href="git-config.html">git-config(1)</a>). To cancel <code>diff.orderFile</code>,
Junio C Hamanoac12f0e2014-09-19 22:32:514191 use <code>-O/dev/null</code>.
Junio C Hamanod2c978f2011-03-20 19:42:224192</p>
Junio C Hamanobcd98f42017-01-24 00:12:164193<div class="paragraph"><p>The output order is determined by the order of glob patterns in
4194&lt;orderfile&gt;.
4195All files with pathnames that match the first pattern are output
4196first, all files with pathnames that match the second pattern (but not
4197the first) are output next, and so on.
4198All files with pathnames that do not match any pattern are output
4199last, as if there was an implicit match-all pattern at the end of the
4200file.
4201If multiple pathnames have the same rank (they match the same pattern
4202but no earlier patterns), their output order relative to each other is
4203the normal order.</p></div>
4204<div class="paragraph"><p>&lt;orderfile&gt; is parsed as follows:</p></div>
4205<div class="openblock">
4206<div class="content">
4207<div class="ulist"><ul>
4208<li>
4209<p>
4210Blank lines are ignored, so they can be used as separators for
4211 readability.
4212</p>
4213</li>
4214<li>
4215<p>
4216Lines starting with a hash ("<code>#</code>") are ignored, so they can be used
4217 for comments. Add a backslash ("<code>\</code>") to the beginning of the
4218 pattern if it starts with a hash.
4219</p>
4220</li>
4221<li>
4222<p>
4223Each other line contains a single pattern.
4224</p>
4225</li>
4226</ul></div>
4227</div></div>
4228<div class="paragraph"><p>Patterns have the same syntax and semantics as patterns used for
Junio C Hamano96153bf2018-04-25 08:25:344229fnmatch(3) without the FNM_PATHNAME flag, except a pathname also
Junio C Hamanobcd98f42017-01-24 00:12:164230matches a pattern if removing any number of the final pathname
4231components matches the pattern. For example, the pattern "<code>foo*bar</code>"
4232matches "<code>fooasdfbar</code>" and "<code>foo/bar/baz/asdf</code>" but not "<code>foobarx</code>".</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:224233</dd>
4234<dt class="hdlist1">
4235-R
4236</dt>
4237<dd>
4238<p>
4239 Swap two inputs; that is, show differences from index or
4240 on-disk file to tree contents.
4241</p>
4242</dd>
4243<dt class="hdlist1">
4244--relative[=&lt;path&gt;]
4245</dt>
4246<dd>
4247<p>
4248 When run from a subdirectory of the project, it can be
4249 told to exclude changes outside the directory and show
4250 pathnames relative to it with this option. When you are
4251 not in a subdirectory (e.g. in a bare repository), you
4252 can name which subdirectory to make the output relative
4253 to by giving a &lt;path&gt; as an argument.
4254</p>
4255</dd>
4256<dt class="hdlist1">
4257-a
4258</dt>
4259<dt class="hdlist1">
4260--text
4261</dt>
4262<dd>
4263<p>
4264 Treat all files as text.
4265</p>
4266</dd>
4267<dt class="hdlist1">
Junio C Hamano4886c772017-11-27 03:33:284268--ignore-cr-at-eol
4269</dt>
4270<dd>
4271<p>
Junio C Hamano96153bf2018-04-25 08:25:344272 Ignore carriage-return at the end of line when doing a comparison.
Junio C Hamano4886c772017-11-27 03:33:284273</p>
4274</dd>
4275<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224276--ignore-space-at-eol
4277</dt>
4278<dd>
4279<p>
4280 Ignore changes in whitespace at EOL.
4281</p>
4282</dd>
4283<dt class="hdlist1">
4284-b
4285</dt>
4286<dt class="hdlist1">
4287--ignore-space-change
4288</dt>
4289<dd>
4290<p>
4291 Ignore changes in amount of whitespace. This ignores whitespace
4292 at line end, and considers all other sequences of one or
4293 more whitespace characters to be equivalent.
4294</p>
4295</dd>
4296<dt class="hdlist1">
4297-w
4298</dt>
4299<dt class="hdlist1">
4300--ignore-all-space
4301</dt>
4302<dd>
4303<p>
4304 Ignore whitespace when comparing lines. This ignores
4305 differences even if one line has whitespace where the other
4306 line has none.
4307</p>
4308</dd>
4309<dt class="hdlist1">
Junio C Hamanoa1952302013-07-01 21:31:184310--ignore-blank-lines
4311</dt>
4312<dd>
4313<p>
4314 Ignore changes whose lines are all blank.
4315</p>
4316</dd>
4317<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224318--inter-hunk-context=&lt;lines&gt;
4319</dt>
4320<dd>
4321<p>
4322 Show the context between diff hunks, up to the specified number
4323 of lines, thereby fusing hunks that are close to each other.
Junio C Hamanobcd98f42017-01-24 00:12:164324 Defaults to <code>diff.interHunkContext</code> or 0 if the config option
4325 is unset.
Junio C Hamanod2c978f2011-03-20 19:42:224326</p>
4327</dd>
4328<dt class="hdlist1">
Junio C Hamano11821ed2011-10-19 18:42:094329-W
4330</dt>
4331<dt class="hdlist1">
4332--function-context
4333</dt>
4334<dd>
4335<p>
4336 Show whole surrounding functions of changes.
4337</p>
4338</dd>
4339<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224340--ext-diff
4341</dt>
4342<dd>
4343<p>
4344 Allow an external diff helper to be executed. If you set an
Junio C Hamanoa28a9202012-06-21 07:08:234345 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
4346 to use this option with <a href="git-log.html">git-log(1)</a> and friends.
Junio C Hamanod2c978f2011-03-20 19:42:224347</p>
4348</dd>
4349<dt class="hdlist1">
4350--no-ext-diff
4351</dt>
4352<dd>
4353<p>
4354 Disallow external diff drivers.
4355</p>
4356</dd>
4357<dt class="hdlist1">
Junio C Hamanoc652aed2011-07-07 01:14:314358--textconv
4359</dt>
4360<dt class="hdlist1">
4361--no-textconv
4362</dt>
4363<dd>
4364<p>
4365 Allow (or disallow) external text conversion filters to be run
Junio C Hamanoa28a9202012-06-21 07:08:234366 when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for
Junio C Hamanoc652aed2011-07-07 01:14:314367 details. Because textconv filters are typically a one-way
4368 conversion, the resulting diff is suitable for human
4369 consumption, but cannot be applied. For this reason, textconv
Junio C Hamanoa28a9202012-06-21 07:08:234370 filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and
4371 <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:314372 diff plumbing commands.
4373</p>
4374</dd>
4375<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:224376--ignore-submodules[=&lt;when&gt;]
4377</dt>
4378<dd>
4379<p>
4380 Ignore changes to submodules in the diff generation. &lt;when&gt; can be
Junio C Hamanoc7102962013-05-29 23:57:174381 either "none", "untracked", "dirty" or "all", which is the default.
Junio C Hamanod2c978f2011-03-20 19:42:224382 Using "none" will consider the submodule modified when it either contains
4383 untracked or modified files or its HEAD differs from the commit recorded
4384 in the superproject and can be used to override any settings of the
Junio C Hamanoa28a9202012-06-21 07:08:234385 <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:224386 "untracked" is used submodules are not considered dirty when they only
4387 contain untracked content (but they are still scanned for modified
4388 content). Using "dirty" ignores all changes to the work tree of submodules,
4389 only changes to the commits stored in the superproject are shown (this was
4390 the behavior until 1.7.0). Using "all" hides all changes to submodules.
4391</p>
4392</dd>
4393<dt class="hdlist1">
4394--src-prefix=&lt;prefix&gt;
4395</dt>
4396<dd>
4397<p>
4398 Show the given source prefix instead of "a/".
4399</p>
4400</dd>
4401<dt class="hdlist1">
4402--dst-prefix=&lt;prefix&gt;
4403</dt>
4404<dd>
4405<p>
4406 Show the given destination prefix instead of "b/".
4407</p>
4408</dd>
4409<dt class="hdlist1">
4410--no-prefix
4411</dt>
4412<dd>
4413<p>
4414 Do not show any source or destination prefix.
4415</p>
4416</dd>
Junio C Hamanocd451662016-09-13 00:54:094417<dt class="hdlist1">
4418--line-prefix=&lt;prefix&gt;
4419</dt>
4420<dd>
4421<p>
4422 Prepend an additional prefix to every line of output.
4423</p>
4424</dd>
Junio C Hamanof7017f12016-10-27 23:31:344425<dt class="hdlist1">
4426--ita-invisible-in-index
4427</dt>
4428<dd>
4429<p>
4430 By default entries added by "git add -N" appear as an existing
4431 empty file in "git diff" and a new file in "git diff --cached".
4432 This option makes the entry appear as a new file in "git diff"
4433 and non-existent in "git diff --cached". This option could be
4434 reverted with <code>--ita-visible-in-index</code>. Both options are
4435 experimental and could be removed in future.
4436</p>
4437</dd>
Junio C Hamanod2c978f2011-03-20 19:42:224438</dl></div>
4439<div class="paragraph"><p>For more detailed explanation on these common options, see also
Junio C Hamanoa28a9202012-06-21 07:08:234440<a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:224441</div>
Junio C Hamano9629d4f2012-12-19 00:28:274442</div>
4443<div class="sect1">
Junio C Hamano48cd3f12019-10-09 05:55:304444<h2 id="_generating_patch_text_with_p">Generating patch text with -p</h2>
Junio C Hamano00b8b632007-12-07 09:50:494445<div class="sectionbody">
Junio C Hamano48cd3f12019-10-09 05:55:304446<div class="paragraph"><p>Running
4447<a href="git-diff.html">git-diff(1)</a>,
4448<a href="git-log.html">git-log(1)</a>,
4449<a href="git-show.html">git-show(1)</a>,
4450<a href="git-diff-index.html">git-diff-index(1)</a>,
4451<a href="git-diff-tree.html">git-diff-tree(1)</a>, or
4452<a href="git-diff-files.html">git-diff-files(1)</a>
4453with the <code>-p</code> option produces patch text.
4454You can customize the creation of patch text via the
Junio C Hamano042f2142016-06-27 18:05:054455<code>GIT_EXTERNAL_DIFF</code> and the <code>GIT_DIFF_OPTS</code> environment variables.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594456<div class="paragraph"><p>What the -p option produces is slightly different from the traditional
Junio C Hamano7f9fa862010-10-19 23:51:144457diff format:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594458<div class="olist arabic"><ol class="arabic">
Junio C Hamano00b8b632007-12-07 09:50:494459<li>
4460<p>
Junio C Hamano7f9fa862010-10-19 23:51:144461It is preceded with a "git diff" header that looks like this:
Junio C Hamano00b8b632007-12-07 09:50:494462</p>
4463<div class="literalblock">
4464<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514465<pre><code>diff --git a/file1 b/file2</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494466</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514467<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:494468involved. Especially, even for a creation or a deletion,
Junio C Hamanoac12f0e2014-09-19 22:32:514469<code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p></div>
4470<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:494471name of the source file of the rename/copy and the name of
Junio C Hamanoba4b9282008-07-06 05:20:314472the file that rename/copy produces, respectively.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494473</li>
4474<li>
4475<p>
4476It is followed by one or more extended header lines:
4477</p>
4478<div class="literalblock">
4479<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514480<pre><code>old mode &lt;mode&gt;
Junio C Hamano00b8b632007-12-07 09:50:494481new mode &lt;mode&gt;
4482deleted file mode &lt;mode&gt;
4483new file mode &lt;mode&gt;
4484copy from &lt;path&gt;
4485copy to &lt;path&gt;
4486rename from &lt;path&gt;
4487rename to &lt;path&gt;
4488similarity index &lt;number&gt;
4489dissimilarity index &lt;number&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:514490index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494491</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594492<div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type
Junio C Hamano7f9fa862010-10-19 23:51:144493and file permission bits.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514494<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:594495<div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and
Junio C Hamano7f9fa862010-10-19 23:51:144496the dissimilarity index is the percentage of changed lines. It
4497is a rounded down integer, followed by a percent sign. The
4498similarity index value of 100% is thus reserved for two equal
4499files, while 100% dissimilarity means that no line from the old
4500file made it into the new one.</p></div>
Junio C Hamano48cd3f12019-10-09 05:55:304501<div class="paragraph"><p>The index line includes the blob object names before and after the change.
Junio C Hamano7f9fa862010-10-19 23:51:144502The &lt;mode&gt; is included if the file mode does not change; otherwise,
4503separate lines indicate the old and the new mode.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494504</li>
4505<li>
4506<p>
Junio C Hamano0f6f3bf2017-03-13 07:01:534507Pathnames with "unusual" characters are quoted as explained for
4508 the configuration variable <code>core.quotePath</code> (see
4509 <a href="git-config.html">git-config(1)</a>).
Junio C Hamano00b8b632007-12-07 09:50:494510</p>
4511</li>
Junio C Hamano7f9fa862010-10-19 23:51:144512<li>
4513<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514514All the <code>file1</code> files in the output refer to files before the
4515 commit, and all the <code>file2</code> files refer to files after the commit.
Junio C Hamano7f9fa862010-10-19 23:51:144516 It is incorrect to apply each change to each file sequentially. For
4517 example, this patch will swap a and b:
4518</p>
4519<div class="literalblock">
4520<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514521<pre><code>diff --git a/a b/b
Junio C Hamano7f9fa862010-10-19 23:51:144522rename from a
4523rename to b
4524diff --git a/b b/a
4525rename from b
Junio C Hamanoac12f0e2014-09-19 22:32:514526rename to a</code></pre>
Junio C Hamano7f9fa862010-10-19 23:51:144527</div></div>
4528</li>
Junio C Hamanoba4b9282008-07-06 05:20:314529</ol></div>
Junio C Hamano00b8b632007-12-07 09:50:494530</div>
Junio C Hamano9629d4f2012-12-19 00:28:274531</div>
4532<div class="sect1">
Junio C Hamano48cd3f12019-10-09 05:55:304533<h2 id="_combined_diff_format">Combined diff format</h2>
Junio C Hamano00b8b632007-12-07 09:50:494534<div class="sectionbody">
Junio C Hamano1dbca522015-05-22 20:48:554535<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:434536produce a <em>combined diff</em> when showing a merge. This is the default
Junio C Hamanoa28a9202012-06-21 07:08:234537format when showing merges with <a href="git-diff.html">git-diff(1)</a> or
Junio C Hamano1dbca522015-05-22 20:48:554538<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:434539of these commands to force generation of diffs with individual parents
4540of a merge.</p></div>
Junio C Hamano48cd3f12019-10-09 05:55:304541<div class="paragraph"><p>A "combined diff" format looks like this:</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494542<div class="listingblock">
4543<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514544<pre><code>diff --combined describe.c
Junio C Hamano00b8b632007-12-07 09:50:494545index fabadb8,cc95eb0..4866510
4546--- a/describe.c
4547+++ b/describe.c
4548@@@ -98,20 -98,12 +98,20 @@@
4549 return (a_date &gt; b_date) ? -1 : (a_date == b_date) ? 0 : 1;
4550 }
4551
4552- static void describe(char *arg)
4553 -static void describe(struct commit *cmit, int last_one)
4554++static void describe(char *arg, int last_one)
4555 {
4556 + unsigned char sha1[20];
4557 + struct commit *cmit;
4558 struct commit_list *list;
4559 static int initialized = 0;
4560 struct commit_name *n;
4561
4562 + if (get_sha1(arg, sha1) &lt; 0)
4563 + usage(describe_usage);
4564 + cmit = lookup_commit_reference(sha1);
4565 + if (!cmit)
4566 + usage(describe_usage);
4567 +
4568 if (!initialized) {
4569 initialized = 1;
Junio C Hamanoac12f0e2014-09-19 22:32:514570 for_each_ref(get_name);</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494571</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594572<div class="olist arabic"><ol class="arabic">
Junio C Hamano00b8b632007-12-07 09:50:494573<li>
4574<p>
4575It is preceded with a "git diff" header, that looks like
Junio C Hamano48cd3f12019-10-09 05:55:304576 this (when the <code>-c</code> option is used):
Junio C Hamano00b8b632007-12-07 09:50:494577</p>
4578<div class="literalblock">
4579<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514580<pre><code>diff --combined file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494581</div></div>
Junio C Hamano48cd3f12019-10-09 05:55:304582<div class="paragraph"><p>or like this (when the <code>--cc</code> option is used):</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494583<div class="literalblock">
4584<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514585<pre><code>diff --cc file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494586</div></div>
4587</li>
4588<li>
4589<p>
4590It is followed by one or more extended header lines
4591 (this example shows a merge with two parents):
4592</p>
4593<div class="literalblock">
4594<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514595<pre><code>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
Junio C Hamano00b8b632007-12-07 09:50:494596mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;
4597new file mode &lt;mode&gt;
Junio C Hamanoac12f0e2014-09-19 22:32:514598deleted file mode &lt;mode&gt;,&lt;mode&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>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:494601the &lt;mode&gt; is different from the rest. Extended headers with
4602information about detected contents movement (renames and
4603copying detection) are designed to work with diff of two
Junio C Hamanoba4b9282008-07-06 05:20:314604&lt;tree-ish&gt; and are not used by combined diff format.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494605</li>
4606<li>
4607<p>
4608It is followed by two-line from-file/to-file header
4609</p>
4610<div class="literalblock">
4611<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514612<pre><code>--- a/file
4613+++ b/file</code></pre>
Junio C Hamano00b8b632007-12-07 09:50:494614</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594615<div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff
Junio C Hamanoac12f0e2014-09-19 22:32:514616format, <code>/dev/null</code> is used to signal created or deleted
Junio C Hamanoba4b9282008-07-06 05:20:314617files.</p></div>
Junio C Hamano11f15372019-03-07 03:17:004618<div class="paragraph"><p>However, if the --combined-all-paths option is provided, instead of a
4619two-line from-file/to-file you get a N+1 line from-file/to-file header,
4620where N is the number of parents in the merge commit</p></div>
4621<div class="literalblock">
4622<div class="content">
4623<pre><code>--- a/file
4624--- a/file
4625--- a/file
4626+++ b/file</code></pre>
4627</div></div>
4628<div class="paragraph"><p>This extended format can be useful if rename or copy detection is
4629active, to allow you to see the original name of the file in different
4630parents.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494631</li>
4632<li>
4633<p>
4634Chunk header format is modified to prevent people from
Junio C Hamanoac12f0e2014-09-19 22:32:514635 accidentally feeding it to <code>patch -p1</code>. Combined diff format
Junio C Hamano00b8b632007-12-07 09:50:494636 was created for review of merge commit changes, and was not
Junio C Hamano48cd3f12019-10-09 05:55:304637 meant to be applied. The change is similar to the change in the
Junio C Hamano00b8b632007-12-07 09:50:494638 extended <em>index</em> header:
4639</p>
4640<div class="literalblock">
4641<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514642<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:494643</div></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514644<div class="paragraph"><p>There are (number of parents + 1) <code>@</code> characters in the chunk
Junio C Hamanoba4b9282008-07-06 05:20:314645header for combined diff format.</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494646</li>
Junio C Hamanoba4b9282008-07-06 05:20:314647</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:594648<div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two
Junio C Hamanoac12f0e2014-09-19 22:32:514649files 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
4650added to B), or <code>" "</code> (space&#8201;&#8212;&#8201;unchanged) prefix, this format
Junio C Hamano00b8b632007-12-07 09:50:494651compares two or more files file1, file2,&#8230; with one file X, and
4652shows how X differs from each of fileN. One column for each of
Junio C Hamano68cf15a2010-11-06 01:01:594653fileN is prepended to the output line to note how X&#8217;s line is
Junio C Hamanoba4b9282008-07-06 05:20:314654different from it.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514655<div class="paragraph"><p>A <code>-</code> character in the column N means that the line appears in
4656fileN but it does not appear in the result. A <code>+</code> character
Junio C Hamano54bf1e22008-12-20 06:30:114657in the column N means that the line appears in the result,
Junio C Hamano00b8b632007-12-07 09:50:494658and fileN does not have that line (in other words, the line was
Junio C Hamanoba4b9282008-07-06 05:20:314659added, from the point of view of that parent).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594660<div class="paragraph"><p>In the above example output, the function signature was changed
Junio C Hamanoac12f0e2014-09-19 22:32:514661from both files (hence two <code>-</code> removals from both file1 and
4662file2, plus <code>++</code> to mean one line that was added does not appear
Junio C Hamanod75148a2014-04-08 19:48:384663in either file1 or file2). Also eight other lines are the same
Junio C Hamanoac12f0e2014-09-19 22:32:514664from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p></div>
4665<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:494666merge commit with the merge result (i.e. file1..fileN are the
Junio C Hamanoac12f0e2014-09-19 22:32:514667parents). When shown by <code>git diff-files -c</code>, it compares the
Junio C Hamano00b8b632007-12-07 09:50:494668two unresolved merge parents with the working tree file
4669(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
Junio C Hamanoba4b9282008-07-06 05:20:314670"their version").</p></div>
Junio C Hamano00b8b632007-12-07 09:50:494671</div>
Junio C Hamano9629d4f2012-12-19 00:28:274672</div>
4673<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594674<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:234675<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:594676<div class="dlist"><dl>
4677<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514678<code>git log --no-merges</code>
Junio C Hamano1a4e8412005-12-27 08:17:234679</dt>
4680<dd>
4681<p>
4682 Show the whole commit history, but skip any merges
4683</p>
4684</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594685<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514686<code>git log v2.6.12.. include/scsi drivers/scsi</code>
Junio C Hamano1a4e8412005-12-27 08:17:234687</dt>
4688<dd>
4689<p>
4690 Show all commits since version <em>v2.6.12</em> that changed any file
Junio C Hamanoac12f0e2014-09-19 22:32:514691 in the <code>include/scsi</code> or <code>drivers/scsi</code> subdirectories
Junio C Hamano1a4e8412005-12-27 08:17:234692</p>
4693</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594694<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514695<code>git log --since="2 weeks ago" -- gitk</code>
Junio C Hamano1a4e8412005-12-27 08:17:234696</dt>
4697<dd>
4698<p>
4699 Show the changes during the last two weeks to the file <em>gitk</em>.
Junio C Hamanoccb82522018-05-08 07:52:094700 The <code>--</code> is necessary to avoid confusion with the <strong>branch</strong> named
Junio C Hamano1a4e8412005-12-27 08:17:234701 <em>gitk</em>
4702</p>
4703</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594704<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514705<code>git log --name-status release..test</code>
Junio C Hamanoba7c8d82006-04-15 06:17:424706</dt>
4707<dd>
4708<p>
4709 Show the commits that are in the "test" branch but not yet
4710 in the "release" branch, along with the list of paths
4711 each commit modifies.
4712</p>
4713</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594714<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514715<code>git log --follow builtin/rev-list.c</code>
Junio C Hamano235d53f2007-07-13 00:25:154716</dt>
4717<dd>
4718<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514719 Shows the commits that changed <code>builtin/rev-list.c</code>, including
Junio C Hamano235d53f2007-07-13 00:25:154720 those commits that occurred before the file was given its
4721 present name.
4722</p>
4723</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594724<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514725<code>git log --branches --not --remotes=origin</code>
Junio C Hamano57827fb2010-01-23 03:02:504726</dt>
4727<dd>
4728<p>
4729 Shows all commits that are in any of local branches but not in
Junio C Hamano97bcb482010-11-25 03:16:074730 any of remote-tracking branches for <em>origin</em> (what you have that
Junio C Hamano68cf15a2010-11-06 01:01:594731 origin doesn&#8217;t).
Junio C Hamano57827fb2010-01-23 03:02:504732</p>
4733</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594734<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514735<code>git log master --not --remotes=*/master</code>
Junio C Hamano57827fb2010-01-23 03:02:504736</dt>
4737<dd>
4738<p>
4739 Shows all commits that are in local master but not in any remote
4740 repository master branches.
4741</p>
4742</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594743<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514744<code>git log -p -m --first-parent</code>
Junio C Hamano31667362010-03-25 00:38:534745</dt>
4746<dd>
4747<p>
4748 Shows the history including change diffs, but only from the
Junio C Hamanob73af6c2013-12-03 22:07:114749 &#8220;main branch&#8221; perspective, skipping commits that come from merged
Junio C Hamano31667362010-03-25 00:38:534750 branches, and showing full diffs of changes introduced by the merges.
4751 This makes sense only when following a strict policy of merging all
4752 topic branches when staying on a single integration branch.
4753</p>
4754</dd>
Junio C Hamano693e7092012-09-12 22:56:534755<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514756<code>git log -L '/int main/',/^}/:main.c</code>
Junio C Hamano7e590a12013-06-02 23:46:524757</dt>
4758<dd>
4759<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514760 Shows how the function <code>main()</code> in the file <code>main.c</code> evolved
Junio C Hamano7e590a12013-06-02 23:46:524761 over time.
4762</p>
4763</dd>
4764<dt class="hdlist1">
Junio C Hamanoac12f0e2014-09-19 22:32:514765<code>git log -3</code>
Junio C Hamano693e7092012-09-12 22:56:534766</dt>
4767<dd>
4768<p>
4769 Limits the number of commits to show to 3.
4770</p>
4771</dd>
Junio C Hamanoba4b9282008-07-06 05:20:314772</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:234773</div>
Junio C Hamano9629d4f2012-12-19 00:28:274774</div>
4775<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594776<h2 id="_discussion">DISCUSSION</h2>
Junio C Hamano775a0f42006-12-31 01:19:144777<div class="sectionbody">
Junio C Hamanod7ed4042015-08-03 19:43:004778<div class="paragraph"><p>Git is to some extent character encoding agnostic.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594779<div class="ulist"><ul>
Junio C Hamano775a0f42006-12-31 01:19:144780<li>
4781<p>
Junio C Hamano54bf1e22008-12-20 06:30:114782The contents of the blob objects are uninterpreted sequences
Junio C Hamano775a0f42006-12-31 01:19:144783 of bytes. There is no encoding translation at the core
4784 level.
4785</p>
4786</li>
4787<li>
4788<p>
Junio C Hamanod7ed4042015-08-03 19:43:004789Path names are encoded in UTF-8 normalization form C. This
4790 applies to tree objects, the index file, ref names, as well as
4791 path names in command line arguments, environment variables
4792 and config files (<code>.git/config</code> (see <a href="git-config.html">git-config(1)</a>),
4793 <a href="gitignore.html">gitignore(5)</a>, <a href="gitattributes.html">gitattributes(5)</a> and
4794 <a href="gitmodules.html">gitmodules(5)</a>).
4795</p>
4796<div class="paragraph"><p>Note that Git at the core level treats path names simply as
4797sequences of non-NUL bytes, there are no path name encoding
4798conversions (except on Mac and Windows). Therefore, using
4799non-ASCII path names will mostly work even on platforms and file
4800systems that use legacy extended ASCII encodings. However,
4801repositories created on such systems will not work properly on
4802UTF-8-based systems (e.g. Linux, Mac, Windows) and vice versa.
4803Additionally, many Git-based tools simply assume path names to
4804be UTF-8 and will fail to display other encodings correctly.</p></div>
4805</li>
4806<li>
4807<p>
4808Commit log messages are typically encoded in UTF-8, but other
4809 extended ASCII encodings are also supported. This includes
4810 ISO-8859-x, CP125x and many others, but <em>not</em> UTF-16/32,
4811 EBCDIC and CJK multi-byte encodings (GBK, Shift-JIS, Big5,
4812 EUC-x, CP9xx etc.).
Junio C Hamano775a0f42006-12-31 01:19:144813</p>
4814</li>
Junio C Hamanoba4b9282008-07-06 05:20:314815</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:594816<div class="paragraph"><p>Although we encourage that the commit log messages are encoded
Junio C Hamano076ffcc2013-02-06 05:13:214817in UTF-8, both the core and Git Porcelain are designed not to
Junio C Hamano775a0f42006-12-31 01:19:144818force UTF-8 on projects. If all participants of a particular
Junio C Hamano076ffcc2013-02-06 05:13:214819project find it more convenient to use legacy encodings, Git
Junio C Hamano775a0f42006-12-31 01:19:144820does not forbid it. However, there are a few things to keep in
Junio C Hamanoba4b9282008-07-06 05:20:314821mind.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594822<div class="olist arabic"><ol class="arabic">
Junio C Hamano775a0f42006-12-31 01:19:144823<li>
4824<p>
Junio C Hamano1aa40d22010-01-21 17:46:434825<em>git commit</em> and <em>git commit-tree</em> issues
Junio C Hamano14b76482008-01-05 10:32:264826 a warning if the commit log message given to it does not look
Junio C Hamano775a0f42006-12-31 01:19:144827 like a valid UTF-8 string, unless you explicitly say your
4828 project uses a legacy encoding. The way to say this is to
Junio C Hamanoac12f0e2014-09-19 22:32:514829 have i18n.commitencoding in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:144830</p>
4831<div class="listingblock">
4832<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514833<pre><code>[i18n]
Junio C Hamanobb34c102017-07-21 22:42:284834 commitEncoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:144835</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594836<div class="paragraph"><p>Commit objects created with the above setting record the value
Junio C Hamanobb34c102017-07-21 22:42:284837of <code>i18n.commitEncoding</code> in its <code>encoding</code> header. This is to
Junio C Hamano775a0f42006-12-31 01:19:144838help other people who look at them later. Lack of this header
Junio C Hamanoba4b9282008-07-06 05:20:314839implies that the commit log message is encoded in UTF-8.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144840</li>
4841<li>
4842<p>
Junio C Hamano1aa40d22010-01-21 17:46:434843<em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
Junio C Hamanoac12f0e2014-09-19 22:32:514844 <code>encoding</code> header of a commit object, and try to re-code the
Junio C Hamanoaa17c7c2008-11-03 04:36:584845 log message into UTF-8 unless otherwise specified. You can
Junio C Hamano775a0f42006-12-31 01:19:144846 specify the desired output encoding with
Junio C Hamanobb34c102017-07-21 22:42:284847 <code>i18n.logOutputEncoding</code> in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:144848</p>
4849<div class="listingblock">
4850<div class="content">
Junio C Hamanoac12f0e2014-09-19 22:32:514851<pre><code>[i18n]
Junio C Hamanobb34c102017-07-21 22:42:284852 logOutputEncoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:144853</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:594854<div class="paragraph"><p>If you do not have this configuration variable, the value of
Junio C Hamanobb34c102017-07-21 22:42:284855<code>i18n.commitEncoding</code> is used instead.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144856</li>
Junio C Hamanoba4b9282008-07-06 05:20:314857</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:594858<div class="paragraph"><p>Note that we deliberately chose not to re-code the commit log
Junio C Hamano775a0f42006-12-31 01:19:144859message when a commit is made to force UTF-8 at the commit
4860object level, because re-coding to UTF-8 is not necessarily a
Junio C Hamanoba4b9282008-07-06 05:20:314861reversible operation.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:144862</div>
Junio C Hamano9629d4f2012-12-19 00:28:274863</div>
4864<div class="sect1">
Junio C Hamano58f587a2013-07-22 19:20:594865<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamanoa574a092010-06-13 19:57:104866<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:234867<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:104868for settings related to diff generation.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:594869<div class="dlist"><dl>
4870<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104871format.pretty
4872</dt>
4873<dd>
4874<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514875 Default for the <code>--format</code> option. (See <em>Pretty Formats</em> above.)
4876 Defaults to <code>medium</code>.
Junio C Hamanoa574a092010-06-13 19:57:104877</p>
4878</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594879<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104880i18n.logOutputEncoding
4881</dt>
4882<dd>
4883<p>
Junio C Hamanob73af6c2013-12-03 22:07:114884 Encoding to use when displaying logs. (See <em>Discussion</em> above.)
Junio C Hamanoac12f0e2014-09-19 22:32:514885 Defaults to the value of <code>i18n.commitEncoding</code> if set, and UTF-8
Junio C Hamanoa574a092010-06-13 19:57:104886 otherwise.
4887</p>
4888</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594889<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104890log.date
4891</dt>
4892<dd>
4893<p>
4894 Default format for human-readable dates. (Compare the
Junio C Hamanoac12f0e2014-09-19 22:32:514895 <code>--date</code> option.) Defaults to "default", which means to write
4896 dates like <code>Sat May 8 19:35:34 2010 -0500</code>.
Junio C Hamanoa574a092010-06-13 19:57:104897</p>
Junio C Hamano23168ef2019-02-07 07:20:474898<div class="paragraph"><p>If the format is set to "auto:foo" and the pager is in use, format
4899"foo" will be the used for the date format. Otherwise "default" will
4900be used.</p></div>
Junio C Hamanoa574a092010-06-13 19:57:104901</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594902<dt class="hdlist1">
Junio C Hamanod7ed4042015-08-03 19:43:004903log.follow
4904</dt>
4905<dd>
4906<p>
Junio C Hamanob0a1e832015-10-15 23:08:314907 If <code>true</code>, <code>git log</code> will act as if the <code>--follow</code> option was used when
4908 a single &lt;path&gt; is given. This has the same limitations as <code>--follow</code>,
4909 i.e. it cannot be used to follow multiple files and does not work well
4910 on non-linear history.
Junio C Hamanod7ed4042015-08-03 19:43:004911</p>
4912</dd>
4913<dt class="hdlist1">
Junio C Hamano322c6242015-03-23 21:32:464914log.showRoot
Junio C Hamanoa574a092010-06-13 19:57:104915</dt>
4916<dd>
4917<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514918 If <code>false</code>, <code>git log</code> and related commands will not treat the
Junio C Hamanoa574a092010-06-13 19:57:104919 initial commit as a big creation event. Any root commits in
Junio C Hamanoac12f0e2014-09-19 22:32:514920 <code>git log -p</code> output would be shown without a diff attached.
4921 The default is <code>true</code>.
Junio C Hamanoa574a092010-06-13 19:57:104922</p>
4923</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594924<dt class="hdlist1">
Junio C Hamano48931e22016-07-11 20:08:474925log.showSignature
4926</dt>
4927<dd>
4928<p>
4929 If <code>true</code>, <code>git log</code> and related commands will act as if the
4930 <code>--show-signature</code> option was passed to them.
4931</p>
4932</dd>
4933<dt class="hdlist1">
Junio C Hamanoabad6da2013-01-06 09:06:324934mailmap.*
Junio C Hamanoa574a092010-06-13 19:57:104935</dt>
4936<dd>
4937<p>
Junio C Hamanoa28a9202012-06-21 07:08:234938 See <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanoa574a092010-06-13 19:57:104939</p>
4940</dd>
Junio C Hamano68cf15a2010-11-06 01:01:594941<dt class="hdlist1">
Junio C Hamanoa574a092010-06-13 19:57:104942notes.displayRef
4943</dt>
4944<dd>
4945<p>
Junio C Hamanoac12f0e2014-09-19 22:32:514946 Which refs, in addition to the default set by <code>core.notesRef</code>
Junio C Hamano042f2142016-06-27 18:05:054947 or <code>GIT_NOTES_REF</code>, to read notes from when showing commit
Junio C Hamanoac12f0e2014-09-19 22:32:514948 messages with the <code>log</code> family of commands. See
Junio C Hamanoa28a9202012-06-21 07:08:234949 <a href="git-notes.html">git-notes(1)</a>.
Junio C Hamanoa574a092010-06-13 19:57:104950</p>
Junio C Hamano68cf15a2010-11-06 01:01:594951<div class="paragraph"><p>May be an unabbreviated ref name or a glob and may be specified
Junio C Hamanoa574a092010-06-13 19:57:104952multiple times. A warning will be issued for refs that do not exist,
4953but a glob that does not match any refs is silently ignored.</p></div>
Junio C Hamanoac12f0e2014-09-19 22:32:514954<div class="paragraph"><p>This setting can be disabled by the <code>--no-notes</code> option,
Junio C Hamano042f2142016-06-27 18:05:054955overridden by the <code>GIT_NOTES_DISPLAY_REF</code> environment variable,
Junio C Hamanoac12f0e2014-09-19 22:32:514956and overridden by the <code>--notes=&lt;ref&gt;</code> option.</p></div>
Junio C Hamanoa574a092010-06-13 19:57:104957</dd>
4958</dl></div>
4959</div>
Junio C Hamano9629d4f2012-12-19 00:28:274960</div>
4961<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:314962<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:234963<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:234964<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:234965</div>
Junio C Hamano7bd050f2011-09-22 06:32:224966</div>
Junio C Hamano9629d4f2012-12-19 00:28:274967</div>
Junio C Hamano7bd050f2011-09-22 06:32:224968<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:234969<div id="footer">
4970<div id="footer-text">
Junio C Hamano2ef0ba32018-01-26 23:13:534971Last updated
Junio C Hamano68793842020-01-06 23:07:094972 2020-01-06 15:04:26 PST
Junio C Hamano1a4e8412005-12-27 08:17:234973</div>
4974</div>
4975</body>
4976</html>