blob: 84b3e71bd4ea514ac093f8ead2031acfbfb75331 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
Junio C Hamano9d971152012-12-19 00:43:115<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
6<meta name="generator" content="AsciiDoc 8.6.8" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-rev-list(1)</title>
Junio C Hamano1a4e8412005-12-27 08:17:238<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:119/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
10
11/* Default font. */
12body {
13 font-family: Georgia,serif;
14}
15
16/* Title font. */
17h1, h2, h3, h4, h5, h6,
18div.title, caption.title,
19thead, p.table.header,
20#toctitle,
21#author, #revnumber, #revdate, #revremark,
22#footer {
23 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano1a4e8412005-12-27 08:17:2324}
25
26body {
27 margin: 1em 5% 1em 5%;
28}
29
Junio C Hamanoba4b9282008-07-06 05:20:3130a {
31 color: blue;
32 text-decoration: underline;
33}
34a:visited {
35 color: fuchsia;
36}
Junio C Hamano1a4e8412005-12-27 08:17:2337
38em {
39 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5940 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2341}
42
43strong {
44 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5945 color: #083194;
Junio C Hamano1a4e8412005-12-27 08:17:2346}
47
Junio C Hamano1a4e8412005-12-27 08:17:2348h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:2350 margin-top: 1.2em;
51 margin-bottom: 0.5em;
52 line-height: 1.3;
53}
54
Junio C Hamanoba4b9282008-07-06 05:20:3155h1, h2, h3 {
Junio C Hamano1a4e8412005-12-27 08:17:2356 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamano1a4e8412005-12-27 08:17:2359 padding-top: 0.5em;
60}
Junio C Hamanoba4b9282008-07-06 05:20:3161h3 {
62 float: left;
63}
64h3 + * {
65 clear: left;
66}
Junio C Hamano9d971152012-12-19 00:43:1167h5 {
68 font-size: 1.0em;
69}
Junio C Hamano1a4e8412005-12-27 08:17:2370
71div.sectionbody {
Junio C Hamano1a4e8412005-12-27 08:17:2372 margin-left: 0;
73}
74
75hr {
76 border: 1px solid silver;
77}
78
79p {
80 margin-top: 0.5em;
81 margin-bottom: 0.5em;
82}
83
Junio C Hamano68cf15a2010-11-06 01:01:5984ul, ol, li > p {
85 margin-top: 0;
86}
Junio C Hamano9d971152012-12-19 00:43:1187ul > li { color: #aaa; }
88ul > li > * { color: black; }
Junio C Hamano68cf15a2010-11-06 01:01:5989
Junio C Hamano9d971152012-12-19 00:43:1190.monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2394 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9d971152012-12-19 00:43:1198
99#author {
Junio C Hamano1a4e8412005-12-27 08:17:23100 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23103}
Junio C Hamano9d971152012-12-19 00:43:11104#email {
Junio C Hamano1a4e8412005-12-27 08:17:23105}
Junio C Hamano9d971152012-12-19 00:43:11106#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23107}
108
Junio C Hamano9d971152012-12-19 00:43:11109#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23110 font-size: small;
111 border-top: 2px solid silver;
112 padding-top: 0.5em;
113 margin-top: 4.0em;
114}
Junio C Hamano9d971152012-12-19 00:43:11115#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9d971152012-12-19 00:43:11119#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9d971152012-12-19 00:43:11124#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59125 margin-top: 1.5em;
126 margin-bottom: 1.5em;
127}
Junio C Hamano9d971152012-12-19 00:43:11128div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23132 margin-bottom: 1.5em;
133}
134div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22135 margin-top: 2.0em;
136 margin-bottom: 2.0em;
137 margin-right: 10%;
138 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59147 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23148 font-weight: bold;
149 text-align: left;
150 margin-top: 1.0em;
151 margin-bottom: 0.5em;
152}
153div.title + * {
154 margin-top: 0;
155}
156
157td div.title:first-child {
158 margin-top: 0.0em;
159}
160div.content div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content + div.title {
164 margin-top: 0.0em;
165}
166
167div.sidebarblock > div.content {
168 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11169 border: 1px solid #dddddd;
170 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23171 padding: 0.5em;
172}
173
174div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11175 border: 1px solid #dddddd;
176 border-left: 5px solid #f0f0f0;
177 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23178 padding: 0.5em;
179}
180
Junio C Hamano7bd050f2011-09-22 06:32:22181div.quoteblock, div.verseblock {
182 padding-left: 1.0em;
183 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59184 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamano68cf15a2010-11-06 01:01:59189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23191 text-align: right;
192}
Junio C Hamano68cf15a2010-11-06 01:01:59193
Junio C Hamano9d971152012-12-19 00:43:11194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59197}
198div.verseblock > div.attribution {
199 padding-top: 0.75em;
200 text-align: left;
201}
202/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31203div.verseblock + div.attribution {
204 text-align: left;
205}
Junio C Hamano1a4e8412005-12-27 08:17:23206
207div.admonitionblock .icon {
208 vertical-align: top;
209 font-size: 1.1em;
210 font-weight: bold;
211 text-decoration: underline;
212 color: #527bbd;
213 padding-right: 0.5em;
214}
215div.admonitionblock td.content {
216 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22217 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23218}
219
220div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22221 border-left: 3px solid #dddddd;
222 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23223}
224
Junio C Hamano1a4e8412005-12-27 08:17:23225div.imageblock div.content { padding-left: 0; }
Junio C Hamano1a4e8412005-12-27 08:17:23226span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59227a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59236 font-style: normal;
237 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23238}
239dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59240 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamano68cf15a2010-11-06 01:01:59246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23250 list-style-type: lower-alpha;
251}
Junio C Hamano68cf15a2010-11-06 01:01:59252ol.upperalpha {
253 list-style-type: upper-alpha;
254}
255ol.lowerroman {
256 list-style-type: lower-roman;
257}
258ol.upperroman {
259 list-style-type: upper-roman;
260}
261
262div.compact ul, div.compact ol,
263div.compact p, div.compact p,
264div.compact div, div.compact div {
265 margin-top: 0.1em;
266 margin-bottom: 0.1em;
267}
Junio C Hamano1a4e8412005-12-27 08:17:23268
Junio C Hamano1a4e8412005-12-27 08:17:23269tfoot {
270 font-weight: bold;
271}
Junio C Hamano68cf15a2010-11-06 01:01:59272td > div.verse {
273 white-space: pre;
274}
Junio C Hamano68cf15a2010-11-06 01:01:59275
276div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamano68cf15a2010-11-06 01:01:59280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31282}
Junio C Hamano68cf15a2010-11-06 01:01:59283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23287 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59288 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23289 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59290 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23291}
Junio C Hamano68cf15a2010-11-06 01:01:59292td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23293 vertical-align: top;
294}
Junio C Hamano68cf15a2010-11-06 01:01:59295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamano1a4e8412005-12-27 08:17:23303
Junio C Hamano7bd050f2011-09-22 06:32:22304.footnote, .footnoteref {
305 font-size: 0.8em;
306}
307
308span.footnote, span.footnoteref {
309 vertical-align: super;
310}
311
312#footnotes {
313 margin: 20px 0 20px 0;
314 padding: 7px 0 0 0;
315}
316
317#footnotes div.footnote {
318 margin: 0 0 5px 0;
319}
320
321#footnotes hr {
322 border: none;
323 border-top: 1px solid silver;
324 height: 1px;
325 text-align: left;
326 margin-left: 0;
327 width: 20%;
328 min-width: 100px;
329}
330
Junio C Hamano9d971152012-12-19 00:43:11331div.colist td {
332 padding-right: 0.5em;
333 padding-bottom: 0.3em;
334 vertical-align: top;
335}
336div.colist td img {
337 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23338}
Junio C Hamanoba4b9282008-07-06 05:20:31339
Junio C Hamano9d971152012-12-19 00:43:11340@media print {
341 #footer-badges { display: none; }
342}
343
344#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22345 margin-bottom: 2.5em;
346}
347
Junio C Hamano9d971152012-12-19 00:43:11348#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31349 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31350 font-size: 1.1em;
351 font-weight: bold;
352 margin-top: 1.0em;
353 margin-bottom: 0.1em;
354}
355
Junio C Hamano9d971152012-12-19 00:43:11356div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31357 margin-top: 0;
358 margin-bottom: 0;
359}
360div.toclevel2 {
361 margin-left: 2em;
362 font-size: 0.9em;
363}
364div.toclevel3 {
365 margin-left: 4em;
366 font-size: 0.9em;
367}
368div.toclevel4 {
369 margin-left: 6em;
370 font-size: 0.9em;
371}
Junio C Hamano9d971152012-12-19 00:43:11372
373span.aqua { color: aqua; }
374span.black { color: black; }
375span.blue { color: blue; }
376span.fuchsia { color: fuchsia; }
377span.gray { color: gray; }
378span.green { color: green; }
379span.lime { color: lime; }
380span.maroon { color: maroon; }
381span.navy { color: navy; }
382span.olive { color: olive; }
383span.purple { color: purple; }
384span.red { color: red; }
385span.silver { color: silver; }
386span.teal { color: teal; }
387span.white { color: white; }
388span.yellow { color: yellow; }
389
390span.aqua-background { background: aqua; }
391span.black-background { background: black; }
392span.blue-background { background: blue; }
393span.fuchsia-background { background: fuchsia; }
394span.gray-background { background: gray; }
395span.green-background { background: green; }
396span.lime-background { background: lime; }
397span.maroon-background { background: maroon; }
398span.navy-background { background: navy; }
399span.olive-background { background: olive; }
400span.purple-background { background: purple; }
401span.red-background { background: red; }
402span.silver-background { background: silver; }
403span.teal-background { background: teal; }
404span.white-background { background: white; }
405span.yellow-background { background: yellow; }
406
407span.big { font-size: 2em; }
408span.small { font-size: 0.6em; }
409
410span.underline { text-decoration: underline; }
411span.overline { text-decoration: overline; }
412span.line-through { text-decoration: line-through; }
413
414div.unbreakable { page-break-inside: avoid; }
415
416
417/*
418 * xhtml11 specific
419 *
420 * */
421
422div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
425}
426div.tableblock > table {
427 border: 3px solid #527bbd;
428}
429thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
432}
433p.table {
434 margin-top: 0;
435}
436/* Because the table frame attribute is overriden by CSS in most browsers. */
437div.tableblock > table[frame="void"] {
438 border-style: none;
439}
440div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
443}
444div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
447}
448
449
450/*
451 * html5 specific
452 *
453 * */
454
455table.tableblock {
456 margin-top: 1.0em;
457 margin-bottom: 1.5em;
458}
459thead, p.tableblock.header {
460 font-weight: bold;
461 color: #527bbd;
462}
463p.tableblock {
464 margin-top: 0;
465}
466table.tableblock {
467 border-width: 3px;
468 border-spacing: 0px;
469 border-style: solid;
470 border-color: #527bbd;
471 border-collapse: collapse;
472}
473th.tableblock, td.tableblock {
474 border-width: 1px;
475 padding: 4px;
476 border-style: solid;
477 border-color: #527bbd;
478}
479
480table.tableblock.frame-topbot {
481 border-left-style: hidden;
482 border-right-style: hidden;
483}
484table.tableblock.frame-sides {
485 border-top-style: hidden;
486 border-bottom-style: hidden;
487}
488table.tableblock.frame-none {
489 border-style: hidden;
490}
491
492th.tableblock.halign-left, td.tableblock.halign-left {
493 text-align: left;
494}
495th.tableblock.halign-center, td.tableblock.halign-center {
496 text-align: center;
497}
498th.tableblock.halign-right, td.tableblock.halign-right {
499 text-align: right;
500}
501
502th.tableblock.valign-top, td.tableblock.valign-top {
503 vertical-align: top;
504}
505th.tableblock.valign-middle, td.tableblock.valign-middle {
506 vertical-align: middle;
507}
508th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509 vertical-align: bottom;
510}
511
512
513/*
514 * manpage specific
515 *
516 * */
517
518body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59519 padding-top: 0.5em;
520 padding-bottom: 0.5em;
521 border-top: 2px solid silver;
522 border-bottom: 2px solid silver;
523}
Junio C Hamano9d971152012-12-19 00:43:11524body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59525 border-style: none;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59529}
530
531@media print {
Junio C Hamano9d971152012-12-19 00:43:11532 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59533}
534
Junio C Hamano1a4e8412005-12-27 08:17:23535
Junio C Hamano1a4e8412005-12-27 08:17:23536</style>
Junio C Hamano7bd050f2011-09-22 06:32:22537<script type="text/javascript">
538/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22539var asciidoc = { // Namespace.
540
541/////////////////////////////////////////////////////////////////////
542// Table Of Contents generator
543/////////////////////////////////////////////////////////////////////
544
545/* Author: Mihai Bazon, September 2002
546 * http://students.infoiasi.ro/~mishoo
547 *
548 * Table Of Content generator
549 * Version: 0.4
550 *
551 * Feel free to use this script under the terms of the GNU General Public
552 * License, as long as you do not remove or alter this notice.
553 */
554
555 /* modified by Troy D. Hanson, September 2006. License: GPL */
556 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
557
558// toclevels = 1..4.
559toc: function (toclevels) {
560
561 function getText(el) {
562 var text = "";
563 for (var i = el.firstChild; i != null; i = i.nextSibling) {
564 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
565 text += i.data;
566 else if (i.firstChild != null)
567 text += getText(i);
568 }
569 return text;
570 }
571
572 function TocEntry(el, text, toclevel) {
573 this.element = el;
574 this.text = text;
575 this.toclevel = toclevel;
576 }
577
578 function tocEntries(el, toclevels) {
579 var result = new Array;
Junio C Hamano9d971152012-12-19 00:43:11580 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22581 // Function that scans the DOM tree for header elements (the DOM2
582 // nodeIterator API would be a better technique but not supported by all
583 // browsers).
584 var iterate = function (el) {
585 for (var i = el.firstChild; i != null; i = i.nextSibling) {
586 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
587 var mo = re.exec(i.tagName);
588 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
589 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
590 }
591 iterate(i);
592 }
593 }
594 }
595 iterate(el);
596 return result;
597 }
598
599 var toc = document.getElementById("toc");
Junio C Hamano9d971152012-12-19 00:43:11600 if (!toc) {
601 return;
602 }
603
604 // Delete existing TOC entries in case we're reloading the TOC.
605 var tocEntriesToRemove = [];
606 var i;
607 for (i = 0; i < toc.childNodes.length; i++) {
608 var entry = toc.childNodes[i];
609 if (entry.nodeName.toLowerCase() == 'div'
610 && entry.getAttribute("class")
611 && entry.getAttribute("class").match(/^toclevel/))
612 tocEntriesToRemove.push(entry);
613 }
614 for (i = 0; i < tocEntriesToRemove.length; i++) {
615 toc.removeChild(tocEntriesToRemove[i]);
616 }
617
618 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22619 var entries = tocEntries(document.getElementById("content"), toclevels);
620 for (var i = 0; i < entries.length; ++i) {
621 var entry = entries[i];
622 if (entry.element.id == "")
623 entry.element.id = "_toc_" + i;
624 var a = document.createElement("a");
625 a.href = "#" + entry.element.id;
626 a.appendChild(document.createTextNode(entry.text));
627 var div = document.createElement("div");
628 div.appendChild(a);
629 div.className = "toclevel" + entry.toclevel;
630 toc.appendChild(div);
631 }
632 if (entries.length == 0)
633 toc.parentNode.removeChild(toc);
634},
635
636
637/////////////////////////////////////////////////////////////////////
638// Footnotes generator
639/////////////////////////////////////////////////////////////////////
640
641/* Based on footnote generation code from:
642 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
643 */
644
645footnotes: function () {
Junio C Hamano9d971152012-12-19 00:43:11646 // Delete existing footnote entries in case we're reloading the footnodes.
647 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22648 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11649 if (!noteholder) {
650 return;
651 }
652 var entriesToRemove = [];
653 for (i = 0; i < noteholder.childNodes.length; i++) {
654 var entry = noteholder.childNodes[i];
655 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
656 entriesToRemove.push(entry);
657 }
658 for (i = 0; i < entriesToRemove.length; i++) {
659 noteholder.removeChild(entriesToRemove[i]);
660 }
661
662 // Rebuild footnote entries.
663 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22664 var spans = cont.getElementsByTagName("span");
665 var refs = {};
666 var n = 0;
667 for (i=0; i<spans.length; i++) {
668 if (spans[i].className == "footnote") {
669 n++;
Junio C Hamano9d971152012-12-19 00:43:11670 var note = spans[i].getAttribute("data-note");
671 if (!note) {
672 // Use [\s\S] in place of . so multi-line matches work.
673 // Because JavaScript has no s (dotall) regex flag.
674 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
675 spans[i].innerHTML =
676 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
677 "' title='View footnote' class='footnote'>" + n + "</a>]";
678 spans[i].setAttribute("data-note", note);
679 }
Junio C Hamano7bd050f2011-09-22 06:32:22680 noteholder.innerHTML +=
681 "<div class='footnote' id='_footnote_" + n + "'>" +
682 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
683 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22684 var id =spans[i].getAttribute("id");
685 if (id != null) refs["#"+id] = n;
686 }
687 }
688 if (n == 0)
689 noteholder.parentNode.removeChild(noteholder);
690 else {
691 // Process footnoterefs.
692 for (i=0; i<spans.length; i++) {
693 if (spans[i].className == "footnoteref") {
694 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
695 href = href.match(/#.*/)[0]; // Because IE return full URL.
696 n = refs[href];
697 spans[i].innerHTML =
698 "[<a href='#_footnote_" + n +
699 "' title='View footnote' class='footnote'>" + n + "</a>]";
700 }
701 }
702 }
Junio C Hamano9d971152012-12-19 00:43:11703},
704
705install: function(toclevels) {
706 var timerId;
707
708 function reinstall() {
709 asciidoc.footnotes();
710 if (toclevels) {
711 asciidoc.toc(toclevels);
712 }
713 }
714
715 function reinstallAndRemoveTimer() {
716 clearInterval(timerId);
717 reinstall();
718 }
719
720 timerId = setInterval(reinstall, 500);
721 if (document.addEventListener)
722 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
723 else
724 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22725}
726
727}
Junio C Hamano9d971152012-12-19 00:43:11728asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22729/*]]>*/
730</script>
Junio C Hamano1a4e8412005-12-27 08:17:23731</head>
Junio C Hamano9d971152012-12-19 00:43:11732<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23733<div id="header">
734<h1>
735git-rev-list(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-rev-list -
740 Lists commit objects in reverse chronological order
741</p>
742</div>
743</div>
Junio C Hamano7bd050f2011-09-22 06:32:22744<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11745<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23747<div class="sectionbody">
Junio C Hamano235a91e2006-01-07 01:13:58748<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11749<pre class="content"><em>git rev-list</em> [ --max-count=&lt;number&gt; ]
Junio C Hamanod2179ef2010-10-22 04:12:17750 [ --skip=&lt;number&gt; ]
751 [ --max-age=&lt;timestamp&gt; ]
752 [ --min-age=&lt;timestamp&gt; ]
Junio C Hamano235a91e2006-01-07 01:13:58753 [ --sparse ]
Junio C Hamano934e1782009-07-16 06:59:15754 [ --merges ]
Junio C Hamano235a91e2006-01-07 01:13:58755 [ --no-merges ]
Junio C Hamanof32ce262011-03-27 07:35:11756 [ --min-parents=&lt;number&gt; ]
757 [ --no-min-parents ]
758 [ --max-parents=&lt;number&gt; ]
759 [ --no-max-parents ]
Junio C Hamano554da792007-12-27 03:29:58760 [ --first-parent ]
Junio C Hamano9be18972006-01-28 08:54:57761 [ --remove-empty ]
Junio C Hamanoee695f22007-06-21 00:35:36762 [ --full-history ]
Junio C Hamano872c5682006-07-07 06:05:40763 [ --not ]
Junio C Hamano235a91e2006-01-07 01:13:58764 [ --all ]
Junio C Hamanod2179ef2010-10-22 04:12:17765 [ --branches[=&lt;pattern&gt;] ]
766 [ --tags[=&lt;pattern&gt;] ]
767 [ --remotes[=&lt;pattern&gt;] ]
768 [ --glob=&lt;glob-pattern&gt; ]
Junio C Hamano084228c2011-05-30 08:13:52769 [ --ignore-missing ]
Junio C Hamanoc9245d92006-09-06 09:35:46770 [ --stdin ]
Junio C Hamano8c5802d2007-11-15 00:13:36771 [ --quiet ]
Junio C Hamanodecf50e2006-03-05 10:51:14772 [ --topo-order ]
Junio C Hamano235a91e2006-01-07 01:13:58773 [ --parents ]
Junio C Hamanoee695f22007-06-21 00:35:36774 [ --timestamp ]
Junio C Hamano5678d692007-04-06 00:51:43775 [ --left-right ]
Junio C Hamano9a2fb2d2011-03-23 05:40:15776 [ --left-only ]
777 [ --right-only ]
778 [ --cherry-mark ]
Junio C Hamanod9e0e5d2007-04-14 16:22:04779 [ --cherry-pick ]
Junio C Hamano775a0f42006-12-31 01:19:14780 [ --encoding[=&lt;encoding&gt;] ]
Junio C Hamano47c1e3c2006-09-25 04:45:55781 [ --(author|committer|grep)=&lt;pattern&gt; ]
Junio C Hamanoa476efa2008-10-10 15:31:42782 [ --regexp-ignore-case | -i ]
783 [ --extended-regexp | -E ]
784 [ --fixed-strings | -F ]
Junio C Hamanod2179ef2010-10-22 04:12:17785 [ --date=(local|relative|default|iso|rfc|short) ]
Junio C Hamano5f327762006-03-02 09:14:51786 [ [--objects | --objects-edge] [ --unpacked ] ]
Junio C Hamano235a91e2006-01-07 01:13:58787 [ --pretty | --header ]
788 [ --bisect ]
Junio C Hamano20f64da2007-04-04 18:38:30789 [ --bisect-vars ]
Junio C Hamano1974bf22007-10-31 05:57:20790 [ --bisect-all ]
Junio C Hamano859f3b42006-08-04 10:04:30791 [ --merge ]
Junio C Hamano053827f2007-02-14 07:23:58792 [ --reverse ]
Junio C Hamanodb450ba2007-01-21 08:57:14793 [ --walk-reflogs ]
Junio C Hamanoa196f6d2007-07-24 08:10:27794 [ --no-walk ] [ --do-walk ]
Junio C Hamano9d971152012-12-19 00:43:11795 &lt;commit&gt;&#8230; [ -- &lt;paths&gt;&#8230; ]</pre>
796<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:59797</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23798</div>
Junio C Hamano9d971152012-12-19 00:43:11799</div>
800<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31801<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23802<div class="sectionbody">
Junio C Hamano9d971152012-12-19 00:43:11803<div class="paragraph"><p>List commits that are reachable by following the <code>parent</code> links from the
Junio C Hamano31cca162009-08-07 05:40:01804given commit(s), but exclude commits that are reachable from the one(s)
805given with a <em>&#94;</em> in front of them. The output is given in reverse
806chronological order by default.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59807<div class="paragraph"><p>You can think of this as a set operation. Commits given on the command
Junio C Hamano31cca162009-08-07 05:40:01808line form a set of commits that are reachable from any of them, and then
809commits reachable from any of the ones given with <em>&#94;</em> in front are
810subtracted from that set. The remaining commits are what comes out in the
Junio C Hamano68cf15a2010-11-06 01:01:59811command&#8217;s output. Various other options and paths parameters can be used
Junio C Hamano31cca162009-08-07 05:40:01812to further limit the result.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59813<div class="paragraph"><p>Thus, the following command:</p></div>
Junio C Hamano89e135d2006-09-03 06:18:25814<div class="listingblock">
815<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11816<pre><code> $ git rev-list foo bar ^baz</code></pre>
Junio C Hamano89e135d2006-09-03 06:18:25817</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59818<div class="paragraph"><p>means "list all the commits which are reachable from <em>foo</em> or <em>bar</em>, but
Junio C Hamano31cca162009-08-07 05:40:01819not from <em>baz</em>".</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59820<div class="paragraph"><p>A special notation "<em>&lt;commit1&gt;</em>..<em>&lt;commit2&gt;</em>" can be used as a
Junio C Hamano9d971152012-12-19 00:43:11821short-hand for "&#94;'&lt;commit1&gt;' <em>&lt;commit2&gt;</em>". For example, either of
Junio C Hamanoba4b9282008-07-06 05:20:31822the following may be used interchangeably:</p></div>
Junio C Hamano89e135d2006-09-03 06:18:25823<div class="listingblock">
824<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11825<pre><code> $ git rev-list origin..HEAD
826 $ git rev-list HEAD ^origin</code></pre>
Junio C Hamano89e135d2006-09-03 06:18:25827</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59828<div class="paragraph"><p>Another special notation is "<em>&lt;commit1&gt;</em>&#8230;<em>&lt;commit2&gt;</em>" which is useful
Junio C Hamano89e135d2006-09-03 06:18:25829for merges. The resulting set of commits is the symmetric difference
Junio C Hamanoba4b9282008-07-06 05:20:31830between the two operands. The following two commands are equivalent:</p></div>
Junio C Hamano872c5682006-07-07 06:05:40831<div class="listingblock">
832<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11833<pre><code> $ git rev-list A B --not $(git merge-base --all A B)
834 $ git rev-list A...B</code></pre>
Junio C Hamano872c5682006-07-07 06:05:40835</div></div>
Junio C Hamano076ffcc2013-02-06 05:13:21836<div class="paragraph"><p><em>rev-list</em> is a very essential Git command, since it
Junio C Hamano89e135d2006-09-03 06:18:25837provides the ability to build and traverse commit ancestry graphs. For
838this reason, it has a lot of different options that enables it to be
Junio C Hamano1aa40d22010-01-21 17:46:43839used by commands as different as <em>git bisect</em> and
840<em>git repack</em>.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23841</div>
Junio C Hamano9d971152012-12-19 00:43:11842</div>
843<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31844<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23845<div class="sectionbody">
Junio C Hamano9d971152012-12-19 00:43:11846<div class="sect2">
847<h3 id="_commit_limiting">Commit Limiting</h3>
Junio C Hamano68cf15a2010-11-06 01:01:59848<div class="paragraph"><p>Besides specifying a range of commits that should be listed using the
Junio C Hamano89e135d2006-09-03 06:18:25849special notations explained in the description, additional commit
Junio C Hamano8ce35d72012-09-18 22:30:42850limiting may be applied.</p></div>
851<div class="paragraph"><p>Using more options generally further limits the output (e.g.
Junio C Hamano9d971152012-12-19 00:43:11852<code>--since=&lt;date1&gt;</code> limits to commits newer than <code>&lt;date1&gt;</code>, and using it
853with <code>--grep=&lt;pattern&gt;</code> further limits to commits whose log message
854has a line that matches <code>&lt;pattern&gt;</code>), unless otherwise noted.</p></div>
Junio C Hamano8ce35d72012-09-18 22:30:42855<div class="paragraph"><p>Note that these are applied before commit
Junio C Hamano9d971152012-12-19 00:43:11856ordering and formatting options, such as <code>--reverse</code>.</p></div>
857<div class="openblock">
858<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:59859<div class="dlist"><dl>
860<dt class="hdlist1">
Junio C Hamano693e7092012-09-12 22:56:53861-&lt;number&gt;
862</dt>
863<dt class="hdlist1">
864-n &lt;number&gt;
Junio C Hamanoeb415992008-06-08 22:49:47865</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59866<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32867--max-count=&lt;number&gt;
Junio C Hamano1a4e8412005-12-27 08:17:23868</dt>
869<dd>
870<p>
Junio C Hamanoc5be4cc2011-03-09 07:20:43871 Limit the number of commits to output.
Junio C Hamano1a4e8412005-12-27 08:17:23872</p>
873</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59874<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32875--skip=&lt;number&gt;
Junio C Hamano17bbaca2006-12-25 11:36:31876</dt>
877<dd>
878<p>
879 Skip <em>number</em> commits before starting to show the commit output.
880</p>
881</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59882<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32883--since=&lt;date&gt;
Junio C Hamanoeb415992008-06-08 22:49:47884</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59885<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32886--after=&lt;date&gt;
Junio C Hamano89e135d2006-09-03 06:18:25887</dt>
888<dd>
889<p>
890 Show commits more recent than a specific date.
891</p>
892</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59893<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32894--until=&lt;date&gt;
Junio C Hamanoeb415992008-06-08 22:49:47895</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59896<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32897--before=&lt;date&gt;
Junio C Hamano89e135d2006-09-03 06:18:25898</dt>
899<dd>
900<p>
901 Show commits older than a specific date.
902</p>
903</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59904<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32905--max-age=&lt;timestamp&gt;
Junio C Hamanoeb415992008-06-08 22:49:47906</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59907<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32908--min-age=&lt;timestamp&gt;
Junio C Hamano1a4e8412005-12-27 08:17:23909</dt>
910<dd>
911<p>
912 Limit the commits output to specified time range.
913</p>
914</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59915<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32916--author=&lt;pattern&gt;
Junio C Hamanoeb415992008-06-08 22:49:47917</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59918<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32919--committer=&lt;pattern&gt;
Junio C Hamano47c1e3c2006-09-25 04:45:55920</dt>
921<dd>
922<p>
923 Limit the commits output to ones with author/committer
Junio C Hamano8ce35d72012-09-18 22:30:42924 header lines that match the specified pattern (regular
Junio C Hamano9d971152012-12-19 00:43:11925 expression). With more than one <code>--author=&lt;pattern&gt;</code>,
Junio C Hamano8ce35d72012-09-18 22:30:42926 commits whose author matches any of the given patterns are
Junio C Hamano9d971152012-12-19 00:43:11927 chosen (similarly for multiple <code>--committer=&lt;pattern&gt;</code>).
Junio C Hamano47c1e3c2006-09-25 04:45:55928</p>
929</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59930<dt class="hdlist1">
Junio C Hamano9954ed72012-10-03 04:54:00931--grep-reflog=&lt;pattern&gt;
932</dt>
933<dd>
934<p>
935 Limit the commits output to ones with reflog entries that
936 match the specified pattern (regular expression). With
Junio C Hamano9d971152012-12-19 00:43:11937 more than one <code>--grep-reflog</code>, commits whose reflog message
Junio C Hamano9954ed72012-10-03 04:54:00938 matches any of the given patterns are chosen. It is an
Junio C Hamano9d971152012-12-19 00:43:11939 error to use this option unless <code>--walk-reflogs</code> is in use.
Junio C Hamano9954ed72012-10-03 04:54:00940</p>
941</dd>
942<dt class="hdlist1">
Junio C Hamanob4a9ede2009-04-08 07:36:32943--grep=&lt;pattern&gt;
Junio C Hamano47c1e3c2006-09-25 04:45:55944</dt>
945<dd>
946<p>
947 Limit the commits output to ones with log message that
Junio C Hamano8ce35d72012-09-18 22:30:42948 matches the specified pattern (regular expression). With
Junio C Hamano9d971152012-12-19 00:43:11949 more than one <code>--grep=&lt;pattern&gt;</code>, commits whose message
Junio C Hamano8ce35d72012-09-18 22:30:42950 matches any of the given patterns are chosen (but see
Junio C Hamano9d971152012-12-19 00:43:11951 <code>--all-match</code>).
Junio C Hamano47c1e3c2006-09-25 04:45:55952</p>
Junio C Hamano9d971152012-12-19 00:43:11953<div class="paragraph"><p>When <code>--show-notes</code> is in effect, the message from the notes as
Junio C Hamano9954ed72012-10-03 04:54:00954if it is part of the log message.</p></div>
Junio C Hamano47c1e3c2006-09-25 04:45:55955</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59956<dt class="hdlist1">
Junio C Hamanoaa17c7c2008-11-03 04:36:58957--all-match
958</dt>
959<dd>
960<p>
961 Limit the commits output to ones that match all given --grep,
Junio C Hamano8ce35d72012-09-18 22:30:42962 instead of ones that match at least one.
Junio C Hamanoaa17c7c2008-11-03 04:36:58963</p>
964</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59965<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47966-i
967</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59968<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47969--regexp-ignore-case
Junio C Hamanoa5c02c52007-05-21 06:14:27970</dt>
971<dd>
972<p>
973 Match the regexp limiting patterns without regard to letters case.
974</p>
975</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59976<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:04977--basic-regexp
978</dt>
979<dd>
980<p>
981 Consider the limiting patterns to be basic regular expressions;
982 this is the default.
983</p>
984</dd>
985<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47986-E
987</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59988<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47989--extended-regexp
Junio C Hamanoa5c02c52007-05-21 06:14:27990</dt>
991<dd>
992<p>
993 Consider the limiting patterns to be extended regular expressions
994 instead of the default basic regular expressions.
995</p>
996</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59997<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47998-F
999</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591000<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471001--fixed-strings
Junio C Hamano24bc09a2008-02-28 00:27:441002</dt>
1003<dd>
1004<p>
Junio C Hamano68cf15a2010-11-06 01:01:591005 Consider the limiting patterns to be fixed strings (don&#8217;t interpret
Junio C Hamano24bc09a2008-02-28 00:27:441006 pattern as a regular expression).
1007</p>
1008</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591009<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:041010--perl-regexp
1011</dt>
1012<dd>
1013<p>
1014 Consider the limiting patterns to be Perl-compatible regexp.
1015 Requires libpcre to be compiled in.
1016</p>
1017</dd>
1018<dt class="hdlist1">
Junio C Hamano9be18972006-01-28 08:54:571019--remove-empty
1020</dt>
1021<dd>
1022<p>
1023 Stop when a given path disappears from the tree.
1024</p>
1025</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591026<dt class="hdlist1">
Junio C Hamano934e1782009-07-16 06:59:151027--merges
1028</dt>
1029<dd>
1030<p>
Junio C Hamano9d971152012-12-19 00:43:111031 Print only merge commits. This is exactly the same as <code>--min-parents=2</code>.
Junio C Hamano934e1782009-07-16 06:59:151032</p>
1033</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591034<dt class="hdlist1">
Junio C Hamano7ccb9fd2006-07-15 01:38:401035--no-merges
1036</dt>
1037<dd>
1038<p>
Junio C Hamanof32ce262011-03-27 07:35:111039 Do not print commits with more than one parent. This is
Junio C Hamano9d971152012-12-19 00:43:111040 exactly the same as <code>--max-parents=1</code>.
Junio C Hamano7ccb9fd2006-07-15 01:38:401041</p>
1042</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591043<dt class="hdlist1">
Junio C Hamanof32ce262011-03-27 07:35:111044--min-parents=&lt;number&gt;
1045</dt>
1046<dt class="hdlist1">
1047--max-parents=&lt;number&gt;
1048</dt>
1049<dt class="hdlist1">
1050--no-min-parents
1051</dt>
1052<dt class="hdlist1">
1053--no-max-parents
1054</dt>
1055<dd>
1056<p>
1057 Show only commits which have at least (or at most) that many
Junio C Hamano9d971152012-12-19 00:43:111058 commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>,
1059 <code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code>
1060 gives all root commits and <code>--min-parents=3</code> all octopus merges.
Junio C Hamanof32ce262011-03-27 07:35:111061</p>
Junio C Hamano9d971152012-12-19 00:43:111062<div class="paragraph"><p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit)
1063again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more
1064parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p></div>
Junio C Hamanof32ce262011-03-27 07:35:111065</dd>
1066<dt class="hdlist1">
Junio C Hamano554da792007-12-27 03:29:581067--first-parent
1068</dt>
1069<dd>
1070<p>
1071 Follow only the first parent commit upon seeing a merge
1072 commit. This option can give a better overview when
1073 viewing the evolution of a particular topic branch,
1074 because merges into a topic branch tend to be only about
1075 adjusting to updated upstream from time to time, and
1076 this option allows you to ignore the individual commits
1077 brought in to your history by such a merge.
1078</p>
1079</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591080<dt class="hdlist1">
Junio C Hamano872c5682006-07-07 06:05:401081--not
1082</dt>
1083<dd>
1084<p>
Junio C Hamano6926bef2007-06-16 09:54:051085 Reverses the meaning of the <em>&#94;</em> prefix (or lack thereof)
Junio C Hamano89e135d2006-09-03 06:18:251086 for all following revision specifiers, up to the next <em>--not</em>.
Junio C Hamano872c5682006-07-07 06:05:401087</p>
1088</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591089<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231090--all
1091</dt>
1092<dd>
1093<p>
Junio C Hamano9d971152012-12-19 00:43:111094 Pretend as if all the refs in <code>refs/</code> are listed on the
Junio C Hamano89e135d2006-09-03 06:18:251095 command line as <em>&lt;commit&gt;</em>.
Junio C Hamano1a4e8412005-12-27 08:17:231096</p>
1097</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591098<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171099--branches[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561100</dt>
1101<dd>
1102<p>
Junio C Hamano9d971152012-12-19 00:43:111103 Pretend as if all the refs in <code>refs/heads</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171104 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:501105 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
Junio C Hamano81d540a2012-03-02 19:52:471106 <em>&#42;</em>, or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561107</p>
1108</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591109<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171110--tags[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561111</dt>
1112<dd>
1113<p>
Junio C Hamano9d971152012-12-19 00:43:111114 Pretend as if all the refs in <code>refs/tags</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171115 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:471116 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>&#42;</em>,
1117 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561118</p>
1119</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591120<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171121--remotes[=&lt;pattern&gt;]
Junio C Hamano50819852008-11-19 02:07:561122</dt>
1123<dd>
1124<p>
Junio C Hamano9d971152012-12-19 00:43:111125 Pretend as if all the refs in <code>refs/remotes</code> are listed
Junio C Hamanod2179ef2010-10-22 04:12:171126 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:071127 remote-tracking branches to ones matching given shell glob.
Junio C Hamano81d540a2012-03-02 19:52:471128 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:501129</p>
1130</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591131<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171132--glob=&lt;glob-pattern&gt;
Junio C Hamano57827fb2010-01-23 03:02:501133</dt>
1134<dd>
1135<p>
Junio C Hamanod2179ef2010-10-22 04:12:171136 Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
Junio C Hamano57827fb2010-01-23 03:02:501137 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
Junio C Hamano81d540a2012-03-02 19:52:471138 is automatically prepended if missing. If pattern lacks <em>?</em>, <em>&#42;</em>,
1139 or <em>[</em>, <em>/&#42;</em> at the end is implied.
Junio C Hamano50819852008-11-19 02:07:561140</p>
1141</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591142<dt class="hdlist1">
Junio C Hamano084228c2011-05-30 08:13:521143--ignore-missing
1144</dt>
1145<dd>
1146<p>
1147 Upon seeing an invalid object name in the input, pretend as if
1148 the bad input was not given.
1149</p>
1150</dd>
1151<dt class="hdlist1">
Junio C Hamanoc9245d92006-09-06 09:35:461152--stdin
1153</dt>
1154<dd>
1155<p>
1156 In addition to the <em>&lt;commit&gt;</em> listed on the command
Junio C Hamano5706e0b2009-11-24 10:54:161157 line, read them from the standard input. If a <em>--</em> separator is
1158 seen, stop reading commits and start reading paths to limit the
1159 result.
Junio C Hamanoc9245d92006-09-06 09:35:461160</p>
1161</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591162<dt class="hdlist1">
Junio C Hamano8c5802d2007-11-15 00:13:361163--quiet
1164</dt>
1165<dd>
1166<p>
Junio C Hamano68cf15a2010-11-06 01:01:591167 Don&#8217;t print anything to standard output. This form
Junio C Hamanob0e02952008-01-19 08:02:001168 is primarily meant to allow the caller to
Junio C Hamano8c5802d2007-11-15 00:13:361169 test the exit status to see if a range of objects is fully
1170 connected (or not). It is faster than redirecting stdout
1171 to /dev/null as the output does not have to be formatted.
1172</p>
1173</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591174<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151175--cherry-mark
1176</dt>
1177<dd>
1178<p>
Junio C Hamano9d971152012-12-19 00:43:111179 Like <code>--cherry-pick</code> (see below) but mark equivalent commits
1180 with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151181</p>
1182</dd>
1183<dt class="hdlist1">
Junio C Hamanod9e0e5d2007-04-14 16:22:041184--cherry-pick
1185</dt>
1186<dd>
1187<p>
1188 Omit any commit that introduces the same change as
1189 another commit on the "other side" when the set of
Junio C Hamano68cf15a2010-11-06 01:01:591190 commits are limited with symmetric difference.
1191</p>
Junio C Hamano9d971152012-12-19 00:43:111192<div class="paragraph"><p>For example, if you have two branches, <code>A</code> and <code>B</code>, a usual way
Junio C Hamanod9e0e5d2007-04-14 16:22:041193to list all commits on only one side of them is with
Junio C Hamano9d971152012-12-19 00:43:111194<code>--left-right</code> (see the example below in the description of
1195the <code>--left-right</code> option). It however shows the commits that were cherry-picked
Junio C Hamanod9e0e5d2007-04-14 16:22:041196from the other branch (for example, "3rd on b" may be cherry-picked
1197from branch A). With this option, such pairs of commits are
Junio C Hamano68cf15a2010-11-06 01:01:591198excluded from the output.</p></div>
Junio C Hamanod9e0e5d2007-04-14 16:22:041199</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591200<dt class="hdlist1">
Junio C Hamano9a2fb2d2011-03-23 05:40:151201--left-only
1202</dt>
1203<dt class="hdlist1">
1204--right-only
1205</dt>
1206<dd>
1207<p>
1208 List only commits on the respective side of a symmetric range,
Junio C Hamano9d971152012-12-19 00:43:111209 i.e. only those which would be marked <code>&lt;</code> resp. <code>&gt;</code> by
1210 <code>--left-right</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151211</p>
Junio C Hamano9d971152012-12-19 00:43:111212<div class="paragraph"><p>For example, <code>--cherry-pick --right-only A...B</code> omits those
1213commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in
1214<code>A</code>. In other words, this lists the <code>+</code> commits from <code>git cherry A B</code>.
1215More precisely, <code>--cherry-pick --right-only --no-merges</code> gives the exact
Junio C Hamano9a2fb2d2011-03-23 05:40:151216list.</p></div>
1217</dd>
1218<dt class="hdlist1">
1219--cherry
1220</dt>
1221<dd>
1222<p>
Junio C Hamano9d971152012-12-19 00:43:111223 A synonym for <code>--right-only --cherry-mark --no-merges</code>; useful to
Junio C Hamano9a2fb2d2011-03-23 05:40:151224 limit the output to the commits on our side and mark those that
1225 have been applied to the other side of a forked history with
Junio C Hamano9d971152012-12-19 00:43:111226 <code>git log --cherry upstream...mybranch</code>, similar to
1227 <code>git cherry upstream mybranch</code>.
Junio C Hamano9a2fb2d2011-03-23 05:40:151228</p>
1229</dd>
1230<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471231-g
1232</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591233<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471234--walk-reflogs
Junio C Hamanodb450ba2007-01-21 08:57:141235</dt>
1236<dd>
1237<p>
1238 Instead of walking the commit ancestry chain, walk
1239 reflog entries from the most recent one to older ones.
1240 When this option is used you cannot specify commits to
Junio C Hamano6926bef2007-06-16 09:54:051241 exclude (that is, <em>&#94;commit</em>, <em>commit1..commit2</em>,
Junio C Hamano68cf15a2010-11-06 01:01:591242 nor <em>commit1...commit2</em> notations cannot be used).
1243</p>
1244<div class="paragraph"><p>With <em>--pretty</em> format other than oneline (for obvious reasons),
Junio C Hamanodb450ba2007-01-21 08:57:141245this causes the output to have two extra lines of information
Junio C Hamano1d90cb02007-07-03 07:05:311246taken from the reflog. By default, <em>commit@{Nth}</em> notation is
Junio C Hamanodb450ba2007-01-21 08:57:141247used in the output. When the starting commit is specified as
Junio C Hamano1d368882008-08-11 22:03:101248<em>commit@{now}</em>, output also uses <em>commit@{timestamp}</em> notation
Junio C Hamanodb450ba2007-01-21 08:57:141249instead. Under <em>--pretty=oneline</em>, the commit message is
Junio C Hamanobdebabb2007-08-23 00:25:091250prefixed with this information on the same line.
Junio C Hamano1d368882008-08-11 22:03:101251This option cannot be combined with <em>--reverse</em>.
Junio C Hamanoa28a9202012-06-21 07:08:231252See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div>
Junio C Hamanodb450ba2007-01-21 08:57:141253</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591254<dt class="hdlist1">
Junio C Hamano859f3b42006-08-04 10:04:301255--merge
1256</dt>
1257<dd>
1258<p>
1259 After a failed merge, show refs that touch files having a
Junio C Hamano68cf15a2010-11-06 01:01:591260 conflict and don&#8217;t exist on all heads to merge.
Junio C Hamano859f3b42006-08-04 10:04:301261</p>
1262</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591263<dt class="hdlist1">
Junio C Hamano89e135d2006-09-03 06:18:251264--boundary
Junio C Hamanoa0778c92006-08-29 04:03:111265</dt>
1266<dd>
1267<p>
Junio C Hamano89e135d2006-09-03 06:18:251268 Output uninteresting commits at the boundary, which are usually
1269 not shown.
1270</p>
1271</dd>
Junio C Hamanoa76cb0d2008-08-13 20:04:101272</dl></div>
Junio C Hamano9d971152012-12-19 00:43:111273</div></div>
1274</div>
1275<div class="sect2">
1276<h3 id="_history_simplification">History Simplification</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591277<div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the
Junio C Hamano28363492008-11-14 08:26:311278commits modifying a particular &lt;path&gt;. But there are two parts of
1279<em>History Simplification</em>, one part is selecting the commits and the other
1280is how to do it, as there are various strategies to simplify the history.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591281<div class="paragraph"><p>The following options select the commits to be shown:</p></div>
1282<div class="dlist"><dl>
1283<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311284&lt;paths&gt;
1285</dt>
1286<dd>
1287<p>
1288 Commits modifying the given &lt;paths&gt; are selected.
1289</p>
1290</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591291<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311292--simplify-by-decoration
1293</dt>
1294<dd>
1295<p>
1296 Commits that are referred by some branch or tag are selected.
1297</p>
1298</dd>
1299</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591300<div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div>
1301<div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div>
1302<div class="dlist"><dl>
1303<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311304Default mode
1305</dt>
1306<dd>
1307<p>
1308 Simplifies the history to the simplest history explaining the
1309 final state of the tree. Simplest because it prunes some side
1310 branches if the end result is the same (i.e. merging branches
1311 with the same content)
1312</p>
1313</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591314<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311315--full-history
1316</dt>
1317<dd>
1318<p>
Junio C Hamano15567bc2011-07-23 00:51:591319 Same as the default mode, but does not prune some history.
Junio C Hamano28363492008-11-14 08:26:311320</p>
1321</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591322<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311323--dense
1324</dt>
1325<dd>
1326<p>
1327 Only the selected commits are shown, plus some to have a
1328 meaningful history.
1329</p>
1330</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591331<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311332--sparse
1333</dt>
1334<dd>
1335<p>
1336 All commits in the simplified history are shown.
1337</p>
1338</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591339<dt class="hdlist1">
Junio C Hamano28363492008-11-14 08:26:311340--simplify-merges
1341</dt>
1342<dd>
1343<p>
1344 Additional option to <em>--full-history</em> to remove some needless
1345 merges from the resulting history, as there are no selected
1346 commits contributing to this merge.
1347</p>
1348</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591349<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551350--ancestry-path
1351</dt>
1352<dd>
1353<p>
1354 When given a range of commits to display (e.g. <em>commit1..commit2</em>
1355 or <em>commit2 &#94;commit1</em>), only display commits that exist
1356 directly on the ancestry chain between the <em>commit1</em> and
1357 <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>,
1358 and ancestors of <em>commit2</em>.
1359</p>
1360</dd>
Junio C Hamano28363492008-11-14 08:26:311361</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591362<div class="paragraph"><p>A more detailed explanation follows.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111363<div class="paragraph"><p>Suppose you specified <code>foo</code> as the &lt;paths&gt;. We shall call commits
1364that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff
1365filtered for <code>foo</code>, they look different and equal, respectively.)</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591366<div class="paragraph"><p>In the following, we will always refer to the same example history to
Junio C Hamanoa76cb0d2008-08-13 20:04:101367illustrate the differences between simplification settings. We assume
Junio C Hamano9d971152012-12-19 00:43:111368that you are filtering for a file <code>foo</code> in this commit graph:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101369<div class="listingblock">
1370<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111371<pre><code> .-A---M---N---O---P
Junio C Hamanoa76cb0d2008-08-13 20:04:101372 / / / / /
1373 I B C D E
1374 \ / / / /
Junio C Hamano9d971152012-12-19 00:43:111375 `-------------'</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101376</div></div>
Junio C Hamano360e3a12011-07-13 23:51:561377<div class="paragraph"><p>The horizontal line of history A---P is taken to be the first parent of
Junio C Hamanoa76cb0d2008-08-13 20:04:101378each merge. The commits are:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591379<div class="ulist"><ul>
Junio C Hamanoa76cb0d2008-08-13 20:04:101380<li>
1381<p>
Junio C Hamano9d971152012-12-19 00:43:111382<code>I</code> is the initial commit, in which <code>foo</code> exists with contents
1383 "asdf", and a file <code>quux</code> exists with contents "quux". Initial
1384 commits are compared to an empty tree, so <code>I</code> is !TREESAME.
Junio C Hamanoa76cb0d2008-08-13 20:04:101385</p>
1386</li>
1387<li>
1388<p>
Junio C Hamano9d971152012-12-19 00:43:111389In <code>A</code>, <code>foo</code> contains just "foo".
Junio C Hamanoa76cb0d2008-08-13 20:04:101390</p>
1391</li>
1392<li>
1393<p>
Junio C Hamano9d971152012-12-19 00:43:111394<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:101395 hence TREESAME to all parents.
1396</p>
1397</li>
1398<li>
1399<p>
Junio C Hamano9d971152012-12-19 00:43:111400<code>C</code> does not change <code>foo</code>, but its merge <code>N</code> changes it to "foobar",
Junio C Hamanoa76cb0d2008-08-13 20:04:101401 so it is not TREESAME to any parent.
1402</p>
1403</li>
1404<li>
1405<p>
Junio C Hamano9d971152012-12-19 00:43:111406<code>D</code> sets <code>foo</code> to "baz". Its merge <code>O</code> combines the strings from
1407 <code>N</code> and <code>D</code> to "foobarbaz"; i.e., it is not TREESAME to any parent.
Junio C Hamanoa76cb0d2008-08-13 20:04:101408</p>
1409</li>
1410<li>
1411<p>
Junio C Hamano9d971152012-12-19 00:43:111412<code>E</code> changes <code>quux</code> to "xyzzy", and its merge <code>P</code> combines the
1413 strings to "quux xyzzy". Despite appearing interesting, <code>P</code> is
Junio C Hamanoa76cb0d2008-08-13 20:04:101414 TREESAME to all parents.
1415</p>
1416</li>
1417</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:591418<div class="paragraph"><p><em>rev-list</em> walks backwards through history, including or excluding
Junio C Hamanoa76cb0d2008-08-13 20:04:101419commits based on whether <em>--full-history</em> and/or parent rewriting
1420(via <em>--parents</em> or <em>--children</em>) are used. The following settings
1421are available.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591422<div class="dlist"><dl>
1423<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101424Default mode
1425</dt>
1426<dd>
1427<p>
1428 Commits are included if they are not TREESAME to any parent
1429 (though this can be changed, see <em>--sparse</em> below). If the
1430 commit was a merge, and it was TREESAME to one parent, follow
1431 only that parent. (Even if there are several TREESAME
1432 parents, follow only one of them.) Otherwise, follow all
1433 parents.
1434</p>
Junio C Hamano68cf15a2010-11-06 01:01:591435<div class="paragraph"><p>This results in:</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101436<div class="listingblock">
1437<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111438<pre><code> .-A---N---O
Junio C Hamano89a57342010-06-22 23:22:551439 / / /
Junio C Hamano9d971152012-12-19 00:43:111440 I---------D</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101441</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591442<div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is
Junio C Hamano9d971152012-12-19 00:43:111443available, removed <code>B</code> from consideration entirely. <code>C</code> was
1444considered via <code>N</code>, but is TREESAME. Root commits are compared to an
1445empty tree, so <code>I</code> is !TREESAME.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591446<div class="paragraph"><p>Parent/child relations are only visible with --parents, but that does
Junio C Hamanoa76cb0d2008-08-13 20:04:101447not affect the commits selected in default mode, so we have shown the
1448parent lines.</p></div>
1449</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591450<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101451--full-history without parent rewriting
1452</dt>
1453<dd>
1454<p>
1455 This mode differs from the default in one point: always follow
1456 all parents of a merge, even if it is TREESAME to one of them.
1457 Even if more than one side of the merge has commits that are
1458 included, this does not imply that the merge itself is! In
1459 the example, we get
1460</p>
1461<div class="listingblock">
1462<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111463<pre><code> I A B N D O</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101464</div></div>
Junio C Hamano9d971152012-12-19 00:43:111465<div class="paragraph"><p><code>P</code> and <code>M</code> were excluded because they are TREESAME to a parent. <code>E</code>,
1466<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:101467do not appear.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591468<div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk
Junio C Hamanoa76cb0d2008-08-13 20:04:101469about the parent/child relationships between the commits, so we show
1470them disconnected.</p></div>
1471</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591472<dt class="hdlist1">
Junio C Hamanoa76cb0d2008-08-13 20:04:101473--full-history with parent rewriting
1474</dt>
1475<dd>
1476<p>
1477 Ordinary commits are only included if they are !TREESAME
1478 (though this can be changed, see <em>--sparse</em> below).
1479</p>
Junio C Hamano68cf15a2010-11-06 01:01:591480<div class="paragraph"><p>Merges are always included. However, their parent list is rewritten:
Junio C Hamanoa76cb0d2008-08-13 20:04:101481Along each parent, prune away commits that are not included
1482themselves. This results in</p></div>
1483<div class="listingblock">
1484<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111485<pre><code> .-A---M---N---O---P
Junio C Hamanoa76cb0d2008-08-13 20:04:101486 / / / / /
1487 I B / D /
1488 \ / / / /
Junio C Hamano9d971152012-12-19 00:43:111489 `-------------'</code></pre>
Junio C Hamanoa76cb0d2008-08-13 20:04:101490</div></div>
Junio C Hamano9d971152012-12-19 00:43:111491<div class="paragraph"><p>Compare to <em>--full-history</em> without rewriting above. Note that <code>E</code>
Junio C Hamanoa76cb0d2008-08-13 20:04:101492was pruned away because it is TREESAME, but the parent list of P was
Junio C Hamano9d971152012-12-19 00:43:111493rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and
1494<code>N</code>. Note also that <code>P</code> was included despite being TREESAME.</p></div>
Junio C Hamanoa76cb0d2008-08-13 20:04:101495</dd>
1496</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591497<div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME
Junio C Hamanoa76cb0d2008-08-13 20:04:101498affects inclusion:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591499<div class="dlist"><dl>
1500<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471501--dense
1502</dt>
Junio C Hamanoa76cb0d2008-08-13 20:04:101503<dd>
1504<p>
1505 Commits that are walked are included if they are not TREESAME
1506 to any parent.
1507</p>
1508</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591509<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471510--sparse
Junio C Hamano89e135d2006-09-03 06:18:251511</dt>
1512<dd>
1513<p>
Junio C Hamanoa76cb0d2008-08-13 20:04:101514 All commits that are walked are included.
Junio C Hamano89e135d2006-09-03 06:18:251515</p>
Junio C Hamano68cf15a2010-11-06 01:01:591516<div class="paragraph"><p>Note that without <em>--full-history</em>, this still simplifies merges: if
Junio C Hamanoa76cb0d2008-08-13 20:04:101517one of the parents is TREESAME, we follow only that one, so the other
1518sides of the merge are never walked.</p></div>
Junio C Hamano89e135d2006-09-03 06:18:251519</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591520<dt class="hdlist1">
Junio C Hamanoa2f46622008-09-03 05:20:311521--simplify-merges
1522</dt>
1523<dd>
1524<p>
1525 First, build a history graph in the same way that
1526 <em>--full-history</em> with parent rewriting does (see above).
1527</p>
Junio C Hamano9d971152012-12-19 00:43:111528<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:311529history according to the following rules:</p></div>
Junio C Hamano9d971152012-12-19 00:43:111530<div class="openblock">
1531<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591532<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311533<li>
1534<p>
Junio C Hamano9d971152012-12-19 00:43:111535Set <code>C'</code> to <code>C</code>.
Junio C Hamanoa2f46622008-09-03 05:20:311536</p>
1537</li>
1538<li>
1539<p>
Junio C Hamano9d971152012-12-19 00:43:111540Replace each parent <code>P</code> of <code>C'</code> with its simplification <code>P'</code>. In
Junio C Hamanoa2f46622008-09-03 05:20:311541 the process, drop parents that are ancestors of other parents, and
Junio C Hamano68cf15a2010-11-06 01:01:591542 remove duplicates.
Junio C Hamanoa2f46622008-09-03 05:20:311543</p>
1544</li>
1545<li>
1546<p>
Junio C Hamano9d971152012-12-19 00:43:111547If after this parent rewriting, <code>C'</code> is a root or merge commit (has
Junio C Hamanoa2f46622008-09-03 05:20:311548 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1549 Otherwise, it is replaced with its only parent.
1550</p>
1551</li>
1552</ul></div>
Junio C Hamano9d971152012-12-19 00:43:111553</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591554<div class="paragraph"><p>The effect of this is best shown by way of comparing to
Junio C Hamanoa2f46622008-09-03 05:20:311555<em>--full-history</em> with parent rewriting. The example turns into:</p></div>
1556<div class="listingblock">
1557<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111558<pre><code> .-A---M---N---O
Junio C Hamanoa2f46622008-09-03 05:20:311559 / / /
1560 I B D
1561 \ / /
Junio C Hamano9d971152012-12-19 00:43:111562 `---------'</code></pre>
Junio C Hamanoa2f46622008-09-03 05:20:311563</div></div>
Junio C Hamano9d971152012-12-19 00:43:111564<div class="paragraph"><p>Note the major differences in <code>N</code> and <code>P</code> over <em>--full-history</em>:</p></div>
1565<div class="openblock">
1566<div class="content">
Junio C Hamano68cf15a2010-11-06 01:01:591567<div class="ulist"><ul>
Junio C Hamanoa2f46622008-09-03 05:20:311568<li>
1569<p>
Junio C Hamano9d971152012-12-19 00:43:111570<code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the
1571 other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME.
Junio C Hamanoa2f46622008-09-03 05:20:311572</p>
1573</li>
1574<li>
1575<p>
Junio C Hamano9d971152012-12-19 00:43:111576<code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then
Junio C Hamanoa2f46622008-09-03 05:20:311577 removed completely, because it had one parent and is TREESAME.
1578</p>
1579</li>
1580</ul></div>
Junio C Hamano9d971152012-12-19 00:43:111581</div></div>
Junio C Hamanoa2f46622008-09-03 05:20:311582</dd>
1583</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591584<div class="paragraph"><p>Finally, there is a fifth simplification mode available:</p></div>
1585<div class="dlist"><dl>
1586<dt class="hdlist1">
Junio C Hamano89a57342010-06-22 23:22:551587--ancestry-path
1588</dt>
1589<dd>
1590<p>
1591 Limit the displayed commits to those directly on the ancestry
1592 chain between the "from" and "to" commits in the given commit
1593 range. I.e. only display commits that are ancestor of the "to"
1594 commit, and descendants of the "from" commit.
1595</p>
Junio C Hamano68cf15a2010-11-06 01:01:591596<div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
Junio C Hamano89a57342010-06-22 23:22:551597<div class="listingblock">
1598<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111599<pre><code> D---E-------F
Junio C Hamano89a57342010-06-22 23:22:551600 / \ \
1601 B---C---G---H---I---J
1602 / \
Junio C Hamano9d971152012-12-19 00:43:111603 A-------K---------------L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551604</div></div>
Junio C Hamano9d971152012-12-19 00:43:111605<div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>,
1606but excludes the ones that are ancestors of <code>D</code>. This is useful to see
1607what happened to the history leading to <code>M</code> since <code>D</code>, in the sense
1608that "what does <code>M</code> have that did not exist in <code>D</code>". The result in this
1609example 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:551610of course).</p></div>
Junio C Hamano9d971152012-12-19 00:43:111611<div class="paragraph"><p>When we want to find out what commits in <code>M</code> are contaminated with the
1612bug introduced by <code>D</code> and need fixing, however, we might want to view
1613only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e.
1614excluding <code>C</code> and <code>K</code>. This is exactly what the <em>--ancestry-path</em>
Junio C Hamano89a57342010-06-22 23:22:551615option does. Applied to the <em>D..M</em> range, it results in:</p></div>
1616<div class="listingblock">
1617<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111618<pre><code> E-------F
Junio C Hamano89a57342010-06-22 23:22:551619 \ \
1620 G---H---I---J
1621 \
Junio C Hamano9d971152012-12-19 00:43:111622 L--M</code></pre>
Junio C Hamano89a57342010-06-22 23:22:551623</div></div>
1624</dd>
1625</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:591626<div class="paragraph"><p>The <em>--simplify-by-decoration</em> option allows you to view only the
Junio C Hamano28363492008-11-14 08:26:311627big picture of the topology of the history, by omitting commits
1628that are not referenced by tags. Commits are marked as !TREESAME
1629(in other words, kept after history simplification rules described
1630above) if (1) they are referenced by tags, or (2) they change the
1631contents of the paths given on the command line. All other
1632commits are marked as TREESAME (subject to be simplified away).</p></div>
Junio C Hamano9d971152012-12-19 00:43:111633</div>
1634<div class="sect2">
1635<h3 id="_bisection_helpers">Bisection Helpers</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591636<div class="dlist"><dl>
1637<dt class="hdlist1">
Junio C Hamano89e135d2006-09-03 06:18:251638--bisect
1639</dt>
1640<dd>
1641<p>
1642Limit output to the one commit object which is roughly halfway between
Junio C Hamano5706e0b2009-11-24 10:54:161643included and excluded commits. Note that the bad bisection ref
Junio C Hamano9d971152012-12-19 00:43:111644<code>refs/bisect/bad</code> is added to the included commits (if it
1645exists) and the good bisection refs <code>refs/bisect/good-*</code> are
Junio C Hamano5706e0b2009-11-24 10:54:161646added to the excluded commits (if they exist). Thus, supposing there
Junio C Hamano9d971152012-12-19 00:43:111647are no refs in <code>refs/bisect/</code>, if
Junio C Hamano89e135d2006-09-03 06:18:251648</p>
Junio C Hamanoa76cb0d2008-08-13 20:04:101649</dd>
1650</dl></div>
Junio C Hamano89e135d2006-09-03 06:18:251651<div class="listingblock">
1652<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111653<pre><code> $ git rev-list --bisect foo ^bar ^baz</code></pre>
Junio C Hamano89e135d2006-09-03 06:18:251654</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591655<div class="paragraph"><p>outputs <em>midpoint</em>, the output of the two commands</p></div>
Junio C Hamano89e135d2006-09-03 06:18:251656<div class="listingblock">
1657<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111658<pre><code> $ git rev-list foo ^midpoint
1659 $ git rev-list midpoint ^bar ^baz</code></pre>
Junio C Hamano89e135d2006-09-03 06:18:251660</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591661<div class="paragraph"><p>would be of roughly the same length. Finding the change which
Junio C Hamano89e135d2006-09-03 06:18:251662introduces a regression is thus reduced to a binary search: repeatedly
Junio C Hamano68cf15a2010-11-06 01:01:591663generate and test new 'midpoint&#8217;s until the commit chain is of length
Junio C Hamanoba4b9282008-07-06 05:20:311664one.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591665<div class="dlist"><dl>
1666<dt class="hdlist1">
Junio C Hamano20f64da2007-04-04 18:38:301667--bisect-vars
1668</dt>
1669<dd>
1670<p>
Junio C Hamano9d971152012-12-19 00:43:111671This calculates the same as <code>--bisect</code>, except that refs in
1672<code>refs/bisect/</code> are not used, and except that this outputs
Junio C Hamano68cf15a2010-11-06 01:01:591673text ready to be eval&#8217;ed by the shell. These lines will assign the
Junio C Hamano9d971152012-12-19 00:43:111674name of the midpoint revision to the variable <code>bisect_rev</code>, and the
1675expected number of commits to be tested after <code>bisect_rev</code> is tested
1676to <code>bisect_nr</code>, the expected number of commits to be tested if
1677<code>bisect_rev</code> turns out to be good to <code>bisect_good</code>, the expected
1678number of commits to be tested if <code>bisect_rev</code> turns out to be bad to
1679<code>bisect_bad</code>, and the number of commits we are bisecting right now to
1680<code>bisect_all</code>.
Junio C Hamano20f64da2007-04-04 18:38:301681</p>
1682</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591683<dt class="hdlist1">
Junio C Hamano1974bf22007-10-31 05:57:201684--bisect-all
1685</dt>
1686<dd>
1687<p>
1688This outputs all the commit objects between the included and excluded
1689commits, ordered by their distance to the included and excluded
Junio C Hamano9d971152012-12-19 00:43:111690commits. Refs in <code>refs/bisect/</code> are not used. The farthest
Junio C Hamano5706e0b2009-11-24 10:54:161691from them is displayed first. (This is the only one displayed by
Junio C Hamano9d971152012-12-19 00:43:111692<code>--bisect</code>.)
Junio C Hamano1974bf22007-10-31 05:57:201693</p>
Junio C Hamano68cf15a2010-11-06 01:01:591694<div class="paragraph"><p>This is useful because it makes it easy to choose a good commit to
Junio C Hamano1974bf22007-10-31 05:57:201695test when you want to avoid to test some of them for some reason (they
Junio C Hamanoba4b9282008-07-06 05:20:311696may not compile for example).</p></div>
Junio C Hamano9d971152012-12-19 00:43:111697<div class="paragraph"><p>This option can be used along with <code>--bisect-vars</code>, in this case,
Junio C Hamano1974bf22007-10-31 05:57:201698after all the sorted commit objects, there will be the same text as if
Junio C Hamano9d971152012-12-19 00:43:111699<code>--bisect-vars</code> had been used alone.</p></div>
Junio C Hamano792c5a92009-03-08 08:45:131700</dd>
1701</dl></div>
Junio C Hamano9d971152012-12-19 00:43:111702</div>
1703<div class="sect2">
1704<h3 id="_commit_ordering">Commit Ordering</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591705<div class="paragraph"><p>By default, the commits are shown in reverse chronological order.</p></div>
1706<div class="dlist"><dl>
1707<dt class="hdlist1">
Junio C Hamano89e135d2006-09-03 06:18:251708--date-order
1709</dt>
1710<dd>
1711<p>
Junio C Hamanod0316112012-08-22 19:55:291712 Show no parents before all of its children are shown, but
1713 otherwise show commits in the commit timestamp order.
Junio C Hamano89e135d2006-09-03 06:18:251714</p>
1715</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591716<dt class="hdlist1">
Junio C Hamanod0316112012-08-22 19:55:291717--topo-order
1718</dt>
1719<dd>
1720<p>
1721 Show no parents before all of its children are shown, and
1722 avoid showing commits on multiple lines of history
1723 intermixed.
1724</p>
1725<div class="paragraph"><p>For example, in a commit history like this:</p></div>
1726<div class="listingblock">
1727<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111728<pre><code> ---1----2----4----7
Junio C Hamanod0316112012-08-22 19:55:291729 \ \
Junio C Hamano9d971152012-12-19 00:43:111730 3----5----6----8---</code></pre>
Junio C Hamanod0316112012-08-22 19:55:291731</div></div>
Junio C Hamano9d971152012-12-19 00:43:111732<div class="paragraph"><p>where the numbers denote the order of commit timestamps, <code>git
1733rev-list</code> and friends with <code>--date-order</code> show the commits in the
Junio C Hamanod0316112012-08-22 19:55:291734timestamp order: 8 7 6 5 4 3 2 1.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111735<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:2917363 1); some older commits are shown before newer ones in order to
1737avoid showing the commits from two parallel development track mixed
1738together.</p></div>
1739</dd>
1740<dt class="hdlist1">
Junio C Hamano053827f2007-02-14 07:23:581741--reverse
1742</dt>
1743<dd>
1744<p>
1745 Output the commits in reverse order.
Junio C Hamanobdebabb2007-08-23 00:25:091746 Cannot be combined with <em>--walk-reflogs</em>.
Junio C Hamano053827f2007-02-14 07:23:581747</p>
1748</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311749</dl></div>
Junio C Hamano9d971152012-12-19 00:43:111750</div>
1751<div class="sect2">
1752<h3 id="_object_traversal">Object Traversal</h3>
Junio C Hamano076ffcc2013-02-06 05:13:211753<div class="paragraph"><p>These options are mostly targeted for packing of Git repositories.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591754<div class="dlist"><dl>
1755<dt class="hdlist1">
Junio C Hamano89e135d2006-09-03 06:18:251756--objects
1757</dt>
1758<dd>
1759<p>
1760 Print the object IDs of any object referenced by the listed
Junio C Hamanob0e02952008-01-19 08:02:001761 commits. <em>--objects foo ^bar</em> thus means "send me
Junio C Hamano89e135d2006-09-03 06:18:251762 all object IDs which I need to download if I have the commit
1763 object <em>bar</em>, but not <em>foo</em>".
1764</p>
1765</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591766<dt class="hdlist1">
Junio C Hamano89e135d2006-09-03 06:18:251767--objects-edge
1768</dt>
1769<dd>
1770<p>
1771 Similar to <em>--objects</em>, but also print the IDs of excluded
1772 commits prefixed with a "-" character. This is used by
Junio C Hamanoa28a9202012-06-21 07:08:231773 <a href="git-pack-objects.html">git-pack-objects(1)</a> to build "thin" pack, which records
Junio C Hamano89e135d2006-09-03 06:18:251774 objects in deltified form based on objects contained in these
1775 excluded commits to reduce network traffic.
1776</p>
1777</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591778<dt class="hdlist1">
Junio C Hamano89e135d2006-09-03 06:18:251779--unpacked
1780</dt>
1781<dd>
1782<p>
1783 Only useful with <em>--objects</em>; print the object IDs that are not
1784 in packs.
Junio C Hamanoa0778c92006-08-29 04:03:111785</p>
1786</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591787<dt class="hdlist1">
Junio C Hamanoeccdd4a2012-09-10 23:28:171788--no-walk[=(sorted|unsorted)]
Junio C Hamanoa196f6d2007-07-24 08:10:271789</dt>
1790<dd>
1791<p>
Junio C Hamanoeccdd4a2012-09-10 23:28:171792 Only show the given commits, but do not traverse their ancestors.
1793 This has no effect if a range is specified. If the argument
1794 "unsorted" is given, the commits are show in the order they were
1795 given on the command line. Otherwise (if "sorted" or no argument
1796 was given), the commits are show in reverse chronological order
1797 by commit time.
Junio C Hamanoa196f6d2007-07-24 08:10:271798</p>
1799</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591800<dt class="hdlist1">
Junio C Hamanoa196f6d2007-07-24 08:10:271801--do-walk
1802</dt>
1803<dd>
1804<p>
1805 Overrides a previous --no-walk.
1806</p>
1807</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311808</dl></div>
Junio C Hamano9d971152012-12-19 00:43:111809</div>
1810<div class="sect2">
1811<h3 id="_commit_formatting">Commit Formatting</h3>
Junio C Hamanoa28a9202012-06-21 07:08:231812<div class="paragraph"><p>Using these options, <a href="git-rev-list.html">git-rev-list(1)</a> will act similar to the
1813more specialized family of commit log tools: <a href="git-log.html">git-log(1)</a>,
1814<a href="git-show.html">git-show(1)</a>, and <a href="git-whatchanged.html">git-whatchanged(1)</a></p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221815<div class="dlist"><dl>
1816<dt class="hdlist1">
1817--pretty[=&lt;format&gt;]
1818</dt>
1819<dt class="hdlist1">
1820--format=&lt;format&gt;
1821</dt>
1822<dd>
1823<p>
1824 Pretty-print the contents of the commit logs in a given format,
1825 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
1826 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:&lt;string&gt;</em>. See
1827 the "PRETTY FORMATS" section for some additional details for each
1828 format. When omitted, the format defaults to <em>medium</em>.
1829</p>
1830<div class="paragraph"><p>Note: you can specify the default pretty format in the repository
Junio C Hamanoa28a9202012-06-21 07:08:231831configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221832</dd>
1833<dt class="hdlist1">
1834--abbrev-commit
1835</dt>
1836<dd>
1837<p>
1838 Instead of showing the full 40-byte hexadecimal commit object
1839 name, show only a partial prefix. Non default number of
1840 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
1841 diff output, if it is displayed).
1842</p>
1843<div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
1844people using 80-column terminals.</p></div>
1845</dd>
1846<dt class="hdlist1">
Junio C Hamanof93530e2011-05-25 23:59:591847--no-abbrev-commit
1848</dt>
1849<dd>
1850<p>
1851 Show the full 40-byte hexadecimal commit object name. This negates
Junio C Hamano9d971152012-12-19 00:43:111852 <code>--abbrev-commit</code> and those options which imply it such as
Junio C Hamanof93530e2011-05-25 23:59:591853 "--oneline". It also overrides the <em>log.abbrevCommit</em> variable.
1854</p>
1855</dd>
1856<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221857--oneline
1858</dt>
1859<dd>
1860<p>
1861 This is a shorthand for "--pretty=oneline --abbrev-commit"
1862 used together.
1863</p>
1864</dd>
1865<dt class="hdlist1">
1866--encoding[=&lt;encoding&gt;]
1867</dt>
1868<dd>
1869<p>
1870 The commit objects record the encoding used for the log message
1871 in their encoding header; this option can be used to tell the
1872 command to re-code the commit log message in the encoding
1873 preferred by the user. For non plumbing commands this
1874 defaults to UTF-8.
1875</p>
1876</dd>
1877<dt class="hdlist1">
Junio C Hamano60033462011-05-03 00:48:431878--notes[=&lt;ref&gt;]
Junio C Hamanod2c978f2011-03-20 19:42:221879</dt>
1880<dd>
1881<p>
Junio C Hamanoa28a9202012-06-21 07:08:231882 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
Junio C Hamanod2c978f2011-03-20 19:42:221883 commit, when showing the commit log message. This is the default
Junio C Hamano9d971152012-12-19 00:43:111884 for <code>git log</code>, <code>git show</code> and <code>git whatchanged</code> commands when
1885 there is no <code>--pretty</code>, <code>--format</code> nor <code>--oneline</code> option given
Junio C Hamano60033462011-05-03 00:48:431886 on the command line.
Junio C Hamanod2c978f2011-03-20 19:42:221887</p>
Junio C Hamano60033462011-05-03 00:48:431888<div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the
1889<em>core.notesRef</em> and <em>notes.displayRef</em> variables (or corresponding
Junio C Hamanoa28a9202012-06-21 07:08:231890environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div>
Junio C Hamano60033462011-05-03 00:48:431891<div class="paragraph"><p>With an optional <em>&lt;ref&gt;</em> argument, show this notes ref instead of the
Junio C Hamano9d971152012-12-19 00:43:111892default notes ref(s). The ref is taken to be in <code>refs/notes/</code> if it
Junio C Hamano60033462011-05-03 00:48:431893is not qualified.</p></div>
1894<div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
1895being displayed. Examples: "--notes=foo" will show only notes from
1896"refs/notes/foo"; "--notes=foo --notes" will show both notes from
1897"refs/notes/foo" and from the default notes ref(s).</p></div>
Junio C Hamanod2c978f2011-03-20 19:42:221898</dd>
1899<dt class="hdlist1">
Junio C Hamano60033462011-05-03 00:48:431900--no-notes
1901</dt>
1902<dd>
1903<p>
Junio C Hamano9d971152012-12-19 00:43:111904 Do not show notes. This negates the above <code>--notes</code> option, by
Junio C Hamano60033462011-05-03 00:48:431905 resetting the list of notes refs from which notes are shown.
1906 Options are parsed in the order given on the command line, so e.g.
1907 "--notes --notes=foo --no-notes --notes=bar" will only show notes
1908 from "refs/notes/bar".
1909</p>
1910</dd>
1911<dt class="hdlist1">
1912--show-notes[=&lt;ref&gt;]
1913</dt>
1914<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221915--[no-]standard-notes
1916</dt>
1917<dd>
1918<p>
Junio C Hamano60033462011-05-03 00:48:431919 These options are deprecated. Use the above --notes/--no-notes
1920 options instead.
Junio C Hamanod2c978f2011-03-20 19:42:221921</p>
1922</dd>
1923<dt class="hdlist1">
Junio C Hamano0acb1ae2012-09-24 21:28:131924--show-signature
1925</dt>
1926<dd>
1927<p>
1928 Check the validity of a signed commit object by passing the signature
Junio C Hamano9d971152012-12-19 00:43:111929 to <code>gpg --verify</code> and show the output.
Junio C Hamano0acb1ae2012-09-24 21:28:131930</p>
1931</dd>
1932<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221933--relative-date
1934</dt>
1935<dd>
1936<p>
Junio C Hamano9d971152012-12-19 00:43:111937 Synonym for <code>--date=relative</code>.
Junio C Hamanod2c978f2011-03-20 19:42:221938</p>
1939</dd>
1940<dt class="hdlist1">
1941--date=(relative|local|default|iso|rfc|short|raw)
1942</dt>
1943<dd>
1944<p>
1945 Only takes effect for dates shown in human-readable format, such
Junio C Hamano9d971152012-12-19 00:43:111946 as when using "--pretty". <code>log.date</code> config variable sets a default
Junio C Hamanod2c978f2011-03-20 19:42:221947 value for log command&#8217;s --date option.
1948</p>
Junio C Hamano9d971152012-12-19 00:43:111949<div class="paragraph"><p><code>--date=relative</code> shows dates relative to the current time,
Junio C Hamanod2c978f2011-03-20 19:42:221950e.g. "2 hours ago".</p></div>
Junio C Hamano9d971152012-12-19 00:43:111951<div class="paragraph"><p><code>--date=local</code> shows timestamps in user&#8217;s local timezone.</p></div>
1952<div class="paragraph"><p><code>--date=iso</code> (or <code>--date=iso8601</code>) shows timestamps in ISO 8601 format.</p></div>
1953<div class="paragraph"><p><code>--date=rfc</code> (or <code>--date=rfc2822</code>) shows timestamps in RFC 2822
Junio C Hamanod2c978f2011-03-20 19:42:221954format, often found in E-mail messages.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111955<div class="paragraph"><p><code>--date=short</code> shows only date but not time, in <code>YYYY-MM-DD</code> format.</p></div>
Junio C Hamano076ffcc2013-02-06 05:13:211956<div class="paragraph"><p><code>--date=raw</code> shows the date in the internal raw Git format <code>%s %z</code> format.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111957<div class="paragraph"><p><code>--date=default</code> shows timestamps in the original timezone
Junio C Hamanod2c978f2011-03-20 19:42:221958(either committer&#8217;s or author&#8217;s).</p></div>
1959</dd>
1960<dt class="hdlist1">
1961--header
1962</dt>
1963<dd>
1964<p>
1965 Print the contents of the commit in raw-format; each record is
1966 separated with a NUL character.
1967</p>
1968</dd>
1969<dt class="hdlist1">
1970--parents
1971</dt>
1972<dd>
1973<p>
1974 Print also the parents of the commit (in the form "commit parent&#8230;").
1975 Also enables parent rewriting, see <em>History Simplification</em> below.
1976</p>
1977</dd>
1978<dt class="hdlist1">
1979--children
1980</dt>
1981<dd>
1982<p>
1983 Print also the children of the commit (in the form "commit child&#8230;").
1984 Also enables parent rewriting, see <em>History Simplification</em> below.
1985</p>
1986</dd>
1987<dt class="hdlist1">
1988--timestamp
1989</dt>
1990<dd>
1991<p>
1992 Print the raw commit timestamp.
1993</p>
1994</dd>
1995<dt class="hdlist1">
1996--left-right
1997</dt>
1998<dd>
1999<p>
2000 Mark which side of a symmetric diff a commit is reachable from.
Junio C Hamano9d971152012-12-19 00:43:112001 Commits from the left side are prefixed with <code>&lt;</code> and those from
2002 the right with <code>&gt;</code>. If combined with <code>--boundary</code>, those
2003 commits are prefixed with <code>-</code>.
Junio C Hamanod2c978f2011-03-20 19:42:222004</p>
2005<div class="paragraph"><p>For example, if you have this topology:</p></div>
2006<div class="listingblock">
2007<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112008<pre><code> y---b---b branch B
Junio C Hamanod2c978f2011-03-20 19:42:222009 / \ /
2010 / .
2011 / / \
Junio C Hamano9d971152012-12-19 00:43:112012 o---x---a---a branch A</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222013</div></div>
2014<div class="paragraph"><p>you would get an output like this:</p></div>
2015<div class="listingblock">
2016<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112017<pre><code> $ git rev-list --left-right --boundary --pretty=oneline A...B
Junio C Hamanod2c978f2011-03-20 19:42:222018
2019 &gt;bbbbbbb... 3rd on b
2020 &gt;bbbbbbb... 2nd on b
2021 &lt;aaaaaaa... 3rd on a
2022 &lt;aaaaaaa... 2nd on a
2023 -yyyyyyy... 1st on b
Junio C Hamano9d971152012-12-19 00:43:112024 -xxxxxxx... 1st on a</code></pre>
Junio C Hamanod2c978f2011-03-20 19:42:222025</div></div>
2026</dd>
2027<dt class="hdlist1">
2028--graph
2029</dt>
2030<dd>
2031<p>
2032 Draw a text-based graphical representation of the commit history
2033 on the left hand side of the output. This may cause extra lines
2034 to be printed in between commits, in order for the graph history
2035 to be drawn properly.
2036</p>
2037<div class="paragraph"><p>This enables parent rewriting, see <em>History Simplification</em> below.</p></div>
2038<div class="paragraph"><p>This implies the <em>--topo-order</em> option by default, but the
2039<em>--date-order</em> option may also be specified.</p></div>
2040</dd>
2041<dt class="hdlist1">
2042--count
2043</dt>
2044<dd>
2045<p>
2046 Print a number stating how many commits would have been
2047 listed, and suppress all other output. When used together
2048 with <em>--left-right</em>, instead print the counts for left and
Junio C Hamanob77f8192011-05-05 01:30:382049 right commits, separated by a tab. When used together with
2050 <em>--cherry-mark</em>, omit patch equivalent commits from these
2051 counts and print the count for equivalent commits separated
2052 by a tab.
Junio C Hamanod2c978f2011-03-20 19:42:222053</p>
2054</dd>
2055</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:232056</div>
Junio C Hamano9d971152012-12-19 00:43:112057</div>
2058</div>
2059<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312060<h2 id="_pretty_formats">PRETTY FORMATS</h2>
Junio C Hamano0430e3a2007-05-15 03:13:172061<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:592062<div class="paragraph"><p>If the commit is a merge, and if the pretty-format
Junio C Hamano0430e3a2007-05-15 03:13:172063is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
2064inserted before the <em>Author:</em> line. This line begins with
2065"Merge: " and the sha1s of ancestral commits are printed,
2066separated by spaces. Note that the listed commits may not
2067necessarily be the list of the <strong>direct</strong> parent commits if you
2068have limited your view of history: for example, if you are
2069only interested in changes related to a certain directory or
Junio C Hamanoba4b9282008-07-06 05:20:312070file.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592071<div class="paragraph"><p>There are several built-in formats, and you can define
Junio C Hamanoa574a092010-06-13 19:57:102072additional formats by setting a pretty.&lt;name&gt;
2073config option to either another format name, or a
2074<em>format:</em> string, as described below (see
Junio C Hamanoa28a9202012-06-21 07:08:232075<a href="git-config.html">git-config(1)</a>). Here are the details of the
Junio C Hamanoa574a092010-06-13 19:57:102076built-in formats:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592077<div class="ulist"><ul>
Junio C Hamano0430e3a2007-05-15 03:13:172078<li>
2079<p>
2080<em>oneline</em>
2081</p>
2082<div class="literalblock">
2083<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112084<pre><code>&lt;sha1&gt; &lt;title line&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172085</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592086<div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
Junio C Hamano0430e3a2007-05-15 03:13:172087</li>
2088<li>
2089<p>
2090<em>short</em>
2091</p>
2092<div class="literalblock">
2093<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112094<pre><code>commit &lt;sha1&gt;
2095Author: &lt;author&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172096</div></div>
2097<div class="literalblock">
2098<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112099<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172100</div></div>
2101</li>
2102<li>
2103<p>
2104<em>medium</em>
2105</p>
2106<div class="literalblock">
2107<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112108<pre><code>commit &lt;sha1&gt;
Junio C Hamano0430e3a2007-05-15 03:13:172109Author: &lt;author&gt;
Junio C Hamano9d971152012-12-19 00:43:112110Date: &lt;author date&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172111</div></div>
2112<div class="literalblock">
2113<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112114<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172115</div></div>
2116<div class="literalblock">
2117<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112118<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172119</div></div>
2120</li>
2121<li>
2122<p>
2123<em>full</em>
2124</p>
2125<div class="literalblock">
2126<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112127<pre><code>commit &lt;sha1&gt;
Junio C Hamano0430e3a2007-05-15 03:13:172128Author: &lt;author&gt;
Junio C Hamano9d971152012-12-19 00:43:112129Commit: &lt;committer&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172130</div></div>
2131<div class="literalblock">
2132<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112133<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172134</div></div>
2135<div class="literalblock">
2136<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112137<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172138</div></div>
2139</li>
2140<li>
2141<p>
2142<em>fuller</em>
2143</p>
2144<div class="literalblock">
2145<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112146<pre><code>commit &lt;sha1&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182147Author: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312148AuthorDate: &lt;author date&gt;
Junio C Hamano6a3c8272008-12-19 21:38:182149Commit: &lt;committer&gt;
Junio C Hamano9d971152012-12-19 00:43:112150CommitDate: &lt;committer date&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172151</div></div>
2152<div class="literalblock">
2153<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112154<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172155</div></div>
2156<div class="literalblock">
2157<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112158<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172159</div></div>
2160</li>
2161<li>
2162<p>
2163<em>email</em>
2164</p>
2165<div class="literalblock">
2166<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112167<pre><code>From &lt;sha1&gt; &lt;date&gt;
Junio C Hamano0430e3a2007-05-15 03:13:172168From: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:312169Date: &lt;author date&gt;
Junio C Hamano9d971152012-12-19 00:43:112170Subject: [PATCH] &lt;title line&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172171</div></div>
2172<div class="literalblock">
2173<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112174<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamano0430e3a2007-05-15 03:13:172175</div></div>
2176</li>
2177<li>
2178<p>
2179<em>raw</em>
2180</p>
Junio C Hamano68cf15a2010-11-06 01:01:592181<div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
Junio C Hamano0430e3a2007-05-15 03:13:172182stored in the commit object. Notably, the SHA1s are
2183displayed in full, regardless of whether --abbrev or
2184--no-abbrev are used, and <em>parents</em> information show the
2185true parent commits, without taking grafts nor history
Junio C Hamanoba4b9282008-07-06 05:20:312186simplification into account.</p></div>
Junio C Hamano0430e3a2007-05-15 03:13:172187</li>
2188<li>
2189<p>
Junio C Hamanoe32ec8b2010-06-02 23:32:312190<em>format:&lt;string&gt;</em>
Junio C Hamano0430e3a2007-05-15 03:13:172191</p>
Junio C Hamano68cf15a2010-11-06 01:01:592192<div class="paragraph"><p>The <em>format:&lt;string&gt;</em> format allows you to specify which information
Junio C Hamano0430e3a2007-05-15 03:13:172193you want to show. It works a little bit like printf format,
2194with the notable exception that you get a newline with <em>%n</em>
Junio C Hamanoba4b9282008-07-06 05:20:312195instead of <em>\n</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592196<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:312197would show something like this:</p></div>
Junio C Hamano0430e3a2007-05-15 03:13:172198<div class="listingblock">
2199<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112200<pre><code>The author of fe6e0ee was Junio C Hamano, 23 hours ago
2201The 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:172202</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:592203<div class="paragraph"><p>The placeholders are:</p></div>
2204<div class="ulist"><ul>
Junio C Hamano0430e3a2007-05-15 03:13:172205<li>
2206<p>
2207<em>%H</em>: commit hash
2208</p>
2209</li>
2210<li>
2211<p>
2212<em>%h</em>: abbreviated commit hash
2213</p>
2214</li>
2215<li>
2216<p>
2217<em>%T</em>: tree hash
2218</p>
2219</li>
2220<li>
2221<p>
2222<em>%t</em>: abbreviated tree hash
2223</p>
2224</li>
2225<li>
2226<p>
2227<em>%P</em>: parent hashes
2228</p>
2229</li>
2230<li>
2231<p>
2232<em>%p</em>: abbreviated parent hashes
2233</p>
2234</li>
2235<li>
2236<p>
2237<em>%an</em>: author name
2238</p>
2239</li>
2240<li>
2241<p>
Junio C Hamanoa28a9202012-06-21 07:08:232242<em>%aN</em>: author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamanof5a93622008-07-16 03:23:572243</p>
2244</li>
2245<li>
2246<p>
Junio C Hamano0430e3a2007-05-15 03:13:172247<em>%ae</em>: author email
2248</p>
2249</li>
2250<li>
2251<p>
Junio C Hamanoa28a9202012-06-21 07:08:232252<em>%aE</em>: author email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamano8bc410e2009-02-15 10:38:192253</p>
2254</li>
2255<li>
2256<p>
Junio C Hamanoa387df32008-08-29 08:56:582257<em>%ad</em>: author date (format respects --date= option)
Junio C Hamano0430e3a2007-05-15 03:13:172258</p>
2259</li>
2260<li>
2261<p>
2262<em>%aD</em>: author date, RFC2822 style
2263</p>
2264</li>
2265<li>
2266<p>
2267<em>%ar</em>: author date, relative
2268</p>
2269</li>
2270<li>
2271<p>
2272<em>%at</em>: author date, UNIX timestamp
2273</p>
2274</li>
2275<li>
2276<p>
Junio C Hamano02f130b2007-07-14 08:26:562277<em>%ai</em>: author date, ISO 8601 format
2278</p>
2279</li>
2280<li>
2281<p>
Junio C Hamano0430e3a2007-05-15 03:13:172282<em>%cn</em>: committer name
2283</p>
2284</li>
2285<li>
2286<p>
Junio C Hamanoa28a9202012-06-21 07:08:232287<em>%cN</em>: committer name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamanof5a93622008-07-16 03:23:572288</p>
2289</li>
2290<li>
2291<p>
Junio C Hamano0430e3a2007-05-15 03:13:172292<em>%ce</em>: committer email
2293</p>
2294</li>
2295<li>
2296<p>
Junio C Hamanoa28a9202012-06-21 07:08:232297<em>%cE</em>: committer email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamano8bc410e2009-02-15 10:38:192298</p>
2299</li>
2300<li>
2301<p>
Junio C Hamano0430e3a2007-05-15 03:13:172302<em>%cd</em>: committer date
2303</p>
2304</li>
2305<li>
2306<p>
2307<em>%cD</em>: committer date, RFC2822 style
2308</p>
2309</li>
2310<li>
2311<p>
2312<em>%cr</em>: committer date, relative
2313</p>
2314</li>
2315<li>
2316<p>
2317<em>%ct</em>: committer date, UNIX timestamp
2318</p>
2319</li>
2320<li>
2321<p>
Junio C Hamano02f130b2007-07-14 08:26:562322<em>%ci</em>: committer date, ISO 8601 format
2323</p>
2324</li>
2325<li>
2326<p>
Junio C Hamanoa28a9202012-06-21 07:08:232327<em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
Junio C Hamano5e4d8de2008-09-19 06:27:022328</p>
2329</li>
2330<li>
2331<p>
Junio C Hamano0430e3a2007-05-15 03:13:172332<em>%e</em>: encoding
2333</p>
2334</li>
2335<li>
2336<p>
2337<em>%s</em>: subject
2338</p>
2339</li>
2340<li>
2341<p>
Junio C Hamano5f9a6f02009-04-06 08:26:562342<em>%f</em>: sanitized subject line, suitable for a filename
2343</p>
2344</li>
2345<li>
2346<p>
Junio C Hamano0430e3a2007-05-15 03:13:172347<em>%b</em>: body
2348</p>
2349</li>
2350<li>
2351<p>
Junio C Hamanocb39aea2010-05-09 07:24:482352<em>%B</em>: raw body (unwrapped subject and body)
2353</p>
2354</li>
2355<li>
2356<p>
Junio C Hamano3b70d3c2009-11-21 17:37:372357<em>%N</em>: commit notes
2358</p>
2359</li>
2360<li>
2361<p>
Junio C Hamano0acb1ae2012-09-24 21:28:132362<em>%GG</em>: raw verification message from GPG for a signed commit
2363</p>
2364</li>
2365<li>
2366<p>
2367<em>%G?</em>: show either "G" for Good or "B" for Bad for a signed commit
2368</p>
2369</li>
2370<li>
2371<p>
2372<em>%GS</em>: show the name of the signer for a signed commit
2373</p>
2374</li>
2375<li>
2376<p>
Junio C Hamano9d971152012-12-19 00:43:112377<em>%gD</em>: reflog selector, e.g., <code>refs/stash@{1}</code>
Junio C Hamanoc21ab052009-10-31 04:03:552378</p>
2379</li>
2380<li>
2381<p>
Junio C Hamano9d971152012-12-19 00:43:112382<em>%gd</em>: shortened reflog selector, e.g., <code>stash@{1}</code>
Junio C Hamanoc21ab052009-10-31 04:03:552383</p>
2384</li>
2385<li>
2386<p>
Junio C Hamano962f3a32011-12-22 20:21:442387<em>%gn</em>: reflog identity name
2388</p>
2389</li>
2390<li>
2391<p>
Junio C Hamanoa28a9202012-06-21 07:08:232392<em>%gN</em>: reflog identity name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamano962f3a32011-12-22 20:21:442393</p>
2394</li>
2395<li>
2396<p>
2397<em>%ge</em>: reflog identity email
2398</p>
2399</li>
2400<li>
2401<p>
Junio C Hamanoa28a9202012-06-21 07:08:232402<em>%gE</em>: reflog identity email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
Junio C Hamano962f3a32011-12-22 20:21:442403</p>
2404</li>
2405<li>
2406<p>
Junio C Hamanoc21ab052009-10-31 04:03:552407<em>%gs</em>: reflog subject
2408</p>
2409</li>
2410<li>
2411<p>
Junio C Hamano0430e3a2007-05-15 03:13:172412<em>%Cred</em>: switch color to red
2413</p>
2414</li>
2415<li>
2416<p>
2417<em>%Cgreen</em>: switch color to green
2418</p>
2419</li>
2420<li>
2421<p>
2422<em>%Cblue</em>: switch color to blue
2423</p>
2424</li>
2425<li>
2426<p>
2427<em>%Creset</em>: reset color
2428</p>
2429</li>
2430<li>
2431<p>
Junio C Hamanoabad6da2013-01-06 09:06:322432<em>%C(&#8230;)</em>: color specification, as described in color.branch.* config option;
2433 adding <code>auto,</code> at the beginning will emit color only when colors are
2434 enabled for log output (by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and
2435 respecting the <code>auto</code> settings of the former if we are going to a
2436 terminal)
Junio C Hamanocc0cb312009-01-22 03:38:502437</p>
2438</li>
2439<li>
2440<p>
Junio C Hamano0430e3a2007-05-15 03:13:172441<em>%m</em>: left, right or boundary mark
2442</p>
2443</li>
2444<li>
2445<p>
2446<em>%n</em>: newline
2447</p>
2448</li>
Junio C Hamanob78d2592008-04-09 09:39:082449<li>
2450<p>
Junio C Hamanoa9701f02010-01-21 00:42:162451<em>%%</em>: a raw <em>%</em>
2452</p>
2453</li>
2454<li>
2455<p>
Junio C Hamanob78d2592008-04-09 09:39:082456<em>%x00</em>: print a byte from a hex code
2457</p>
2458</li>
Junio C Hamanobf984de2009-11-23 06:11:192459<li>
2460<p>
2461<em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>: switch line wrapping, like the -w option of
Junio C Hamanoa28a9202012-06-21 07:08:232462 <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanobf984de2009-11-23 06:11:192463</p>
2464</li>
Junio C Hamanoba4b9282008-07-06 05:20:312465</ul></div>
Junio C Hamano0430e3a2007-05-15 03:13:172466</li>
Junio C Hamanoc21ab052009-10-31 04:03:552467</ul></div>
2468<div class="admonitionblock">
2469<table><tr>
2470<td class="icon">
2471<div class="title">Note</div>
2472</td>
2473<td class="content">Some placeholders may depend on other options given to the
Junio C Hamano9d971152012-12-19 00:43:112474revision traversal engine. For example, the <code>%g*</code> reflog options will
Junio C Hamanoc21ab052009-10-31 04:03:552475insert an empty string unless we are traversing reflog entries (e.g., by
Junio C Hamano9d971152012-12-19 00:43:112476<code>git log -g</code>). The <code>%d</code> placeholder will use the "short" decoration
2477format if <code>--decorate</code> was not already provided on the command line.</td>
Junio C Hamanoc21ab052009-10-31 04:03:552478</tr></table>
2479</div>
Junio C Hamano9d971152012-12-19 00:43:112480<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:592481is inserted immediately before the expansion if and only if the
2482placeholder expands to a non-empty string.</p></div>
Junio C Hamano9d971152012-12-19 00:43:112483<div class="paragraph"><p>If you add a <code>-</code> (minus sign) after <em>%</em> of a placeholder, line-feeds that
Junio C Hamano2bd8a742009-12-01 21:16:592484immediately precede the expansion are deleted if and only if the
2485placeholder expands to an empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592486<div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
Junio C Hamano89a57342010-06-22 23:22:552487is inserted immediately before the expansion if and only if the
2488placeholder expands to a non-empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:592489<div class="ulist"><ul>
Junio C Hamano6fb124c2008-06-13 10:04:012490<li>
2491<p>
2492<em>tformat:</em>
2493</p>
Junio C Hamano68cf15a2010-11-06 01:01:592494<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:012495provides "terminator" semantics instead of "separator" semantics. In
2496other words, each commit has the message terminator character (usually a
2497newline) appended, rather than a separator placed between entries.
2498This means that the final entry of a single-line format will be properly
2499terminated with a new line, just as the "oneline" format does.
Junio C Hamanoba4b9282008-07-06 05:20:312500For example:</p></div>
Junio C Hamano6fb124c2008-06-13 10:04:012501<div class="listingblock">
2502<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112503<pre><code>$ git log -2 --pretty=format:%h 4da45bef \
Junio C Hamano6fb124c2008-06-13 10:04:012504 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
25054da45be
25067134973 -- NO NEWLINE
2507
2508$ git log -2 --pretty=tformat:%h 4da45bef \
2509 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
25104da45be
Junio C Hamano9d971152012-12-19 00:43:1125117134973</code></pre>
Junio C Hamano6fb124c2008-06-13 10:04:012512</div></div>
Junio C Hamano9d971152012-12-19 00:43:112513<div class="paragraph"><p>In addition, any unrecognized string that has a <code>%</code> in it is interpreted
2514as if it has <code>tformat:</code> in front of it. For example, these two are
Junio C Hamano0a235222009-03-06 08:21:092515equivalent:</p></div>
2516<div class="listingblock">
2517<div class="content">
Junio C Hamano9d971152012-12-19 00:43:112518<pre><code>$ git log -2 --pretty=tformat:%h 4da45bef
2519$ git log -2 --pretty=%h 4da45bef</code></pre>
Junio C Hamano0a235222009-03-06 08:21:092520</div></div>
Junio C Hamano6fb124c2008-06-13 10:04:012521</li>
Junio C Hamanoba4b9282008-07-06 05:20:312522</ul></div>
Junio C Hamano0430e3a2007-05-15 03:13:172523</div>
Junio C Hamano9d971152012-12-19 00:43:112524</div>
2525<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:312526<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:232527<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:232528<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:232529</div>
Junio C Hamano7bd050f2011-09-22 06:32:222530</div>
Junio C Hamano9d971152012-12-19 00:43:112531</div>
Junio C Hamano7bd050f2011-09-22 06:32:222532<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:232533<div id="footer">
2534<div id="footer-text">
Junio C Hamano076ffcc2013-02-06 05:13:212535Last updated 2013-02-05 21:07:26 PST
Junio C Hamano1a4e8412005-12-27 08:17:232536</div>
2537</div>
2538</body>
2539</html>