blob: 7bcf928cf0f3d887140560f899d85620d2381c37 [file] [log] [blame]
Junio C Hamanod9d71c02006-02-08 00:52:331<!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-show(1)</title>
Junio C Hamanod9d71c02006-02-08 00:52:338<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 Hamanod9d71c02006-02-08 00:52:3324}
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 Hamanod9d71c02006-02-08 00:52:3337
38em {
39 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5940 color: navy;
Junio C Hamanod9d71c02006-02-08 00:52:3341}
42
43strong {
44 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5945 color: #083194;
Junio C Hamanod9d71c02006-02-08 00:52:3346}
47
Junio C Hamanod9d71c02006-02-08 00:52:3348h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamanod9d71c02006-02-08 00:52:3350 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 Hamanod9d71c02006-02-08 00:52:3356 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamanod9d71c02006-02-08 00:52:3359 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 Hamanod9d71c02006-02-08 00:52:3370
71div.sectionbody {
Junio C Hamanod9d71c02006-02-08 00:52:3372 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 Hamanod9d71c02006-02-08 00:52:3394 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9d971152012-12-19 00:43:1198
99#author {
Junio C Hamanod9d71c02006-02-08 00:52:33100 color: #527bbd;
Junio C Hamanod9d71c02006-02-08 00:52:33101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamanod9d71c02006-02-08 00:52:33103}
Junio C Hamano9d971152012-12-19 00:43:11104#email {
Junio C Hamanod9d71c02006-02-08 00:52:33105}
Junio C Hamano9d971152012-12-19 00:43:11106#revnumber, #revdate, #revremark {
Junio C Hamanod9d71c02006-02-08 00:52:33107}
108
Junio C Hamano9d971152012-12-19 00:43:11109#footer {
Junio C Hamanod9d71c02006-02-08 00:52:33110 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 Hamanod9d71c02006-02-08 00:52:33116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9d971152012-12-19 00:43:11119#footer-badges {
Junio C Hamanod9d71c02006-02-08 00:52:33120 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 Hamanod9d71c02006-02-08 00:52:33129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamanod9d71c02006-02-08 00:52:33132 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 Hamanod9d71c02006-02-08 00:52:33139}
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 Hamanod9d71c02006-02-08 00:52:33148 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 Hamanod9d71c02006-02-08 00:52:33171 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 Hamanod9d71c02006-02-08 00:52:33178 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 Hamanod9d71c02006-02-08 00:52:33187}
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 Hamanod9d71c02006-02-08 00:52:33191 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 Hamanod9d71c02006-02-08 00:52:33206
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 Hamanod9d71c02006-02-08 00:52:33218}
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 Hamanod9d71c02006-02-08 00:52:33223}
224
Junio C Hamanod9d71c02006-02-08 00:52:33225div.imageblock div.content { padding-left: 0; }
Junio C Hamanod9d71c02006-02-08 00:52:33226span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59227a.image:visited { color: white; }
Junio C Hamanod9d71c02006-02-08 00:52:33228
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 Hamanod9d71c02006-02-08 00:52:33238}
239dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59240 margin-top: 0.1em;
Junio C Hamanod9d71c02006-02-08 00:52:33241}
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 Hamanod9d71c02006-02-08 00:52:33250 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 Hamanod9d71c02006-02-08 00:52:33268
Junio C Hamanod9d71c02006-02-08 00:52:33269tfoot {
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 Hamanod9d71c02006-02-08 00:52:33277 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 Hamanod9d71c02006-02-08 00:52:33287 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59288 font-style: normal;
Junio C Hamanod9d71c02006-02-08 00:52:33289 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59290 color: navy;
Junio C Hamanod9d71c02006-02-08 00:52:33291}
Junio C Hamano68cf15a2010-11-06 01:01:59292td.hdlist2 {
Junio C Hamanod9d71c02006-02-08 00:52:33293 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 Hamanod9d71c02006-02-08 00:52:33303
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 Hamanod9d71c02006-02-08 00:52:33338}
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 Hamanod9d71c02006-02-08 00:52:33535
Junio C Hamanod9d71c02006-02-08 00:52:33536</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 Hamanod9d71c02006-02-08 00:52:33731</head>
Junio C Hamano9d971152012-12-19 00:43:11732<body class="manpage">
Junio C Hamanod9d71c02006-02-08 00:52:33733<div id="header">
734<h1>
735git-show(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-show -
Junio C Hamano7d23f5e2006-12-16 07:44:04740 Show various types of objects
Junio C Hamanod9d71c02006-02-08 00:52:33741</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 Hamanod9d71c02006-02-08 00:52:33747<div class="sectionbody">
Junio C Hamano15567bc2011-07-23 00:51:59748<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11749<pre class="content"><em>git show</em> [options] &lt;object&gt;&#8230;</pre>
750<div class="attribution">
Junio C Hamano15567bc2011-07-23 00:51:59751</div></div>
Junio C Hamanod9d71c02006-02-08 00:52:33752</div>
Junio C Hamano9d971152012-12-19 00:43:11753</div>
754<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31755<h2 id="_description">DESCRIPTION</h2>
Junio C Hamanod9d71c02006-02-08 00:52:33756<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59757<div class="paragraph"><p>Shows one or more objects (blobs, trees, tags and commits).</p></div>
758<div class="paragraph"><p>For commits it shows the log message and textual diff. It also
Junio C Hamano7d23f5e2006-12-16 07:44:04759presents the merge commit in a special format as produced by
Junio C Hamano1aa40d22010-01-21 17:46:43760<em>git diff-tree --cc</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59761<div class="paragraph"><p>For tags, it shows the tag message and the referenced objects.</p></div>
762<div class="paragraph"><p>For trees, it shows the names (equivalent to <em>git ls-tree</em>
Junio C Hamanoba4b9282008-07-06 05:20:31763with --name-only).</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59764<div class="paragraph"><p>For plain blobs, it shows the plain contents.</p></div>
765<div class="paragraph"><p>The command takes options applicable to the <em>git diff-tree</em> command to
Junio C Hamanoba4b9282008-07-06 05:20:31766control how the changes the commit introduces are shown.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59767<div class="paragraph"><p>This manual page describes only the most frequently used options.</p></div>
Junio C Hamanod9d71c02006-02-08 00:52:33768</div>
Junio C Hamano9d971152012-12-19 00:43:11769</div>
770<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31771<h2 id="_options">OPTIONS</h2>
Junio C Hamanod9d71c02006-02-08 00:52:33772<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59773<div class="dlist"><dl>
774<dt class="hdlist1">
Junio C Hamano9e395072008-07-31 22:11:21775&lt;object&gt;&#8230;
Junio C Hamanod9d71c02006-02-08 00:52:33776</dt>
777<dd>
778<p>
Junio C Hamano9e395072008-07-31 22:11:21779 The names of objects to show.
Junio C Hamano2d47c622007-01-18 06:24:10780 For a more complete list of ways to spell object names, see
Junio C Hamanoa28a9202012-06-21 07:08:23781 "SPECIFYING REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>.
Junio C Hamanod9d71c02006-02-08 00:52:33782</p>
783</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59784<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17785--pretty[=&lt;format&gt;]
Junio C Hamanod9d71c02006-02-08 00:52:33786</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59787<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17788--format=&lt;format&gt;
Junio C Hamano0a235222009-03-06 08:21:09789</dt>
Junio C Hamanod9d71c02006-02-08 00:52:33790<dd>
791<p>
Junio C Hamanoa3770f92007-07-25 08:53:33792 Pretty-print the contents of the commit logs in a given format,
Junio C Hamano0430e3a2007-05-15 03:13:17793 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
Junio C Hamanoe32ec8b2010-06-02 23:32:31794 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:&lt;string&gt;</em>. See
795 the "PRETTY FORMATS" section for some additional details for each
796 format. When omitted, the format defaults to <em>medium</em>.
Junio C Hamanod9d71c02006-02-08 00:52:33797</p>
Junio C Hamano68cf15a2010-11-06 01:01:59798<div class="paragraph"><p>Note: you can specify the default pretty format in the repository
Junio C Hamanoa28a9202012-06-21 07:08:23799configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
Junio C Hamano0430e3a2007-05-15 03:13:17800</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59801<dt class="hdlist1">
Junio C Hamanoee695f22007-06-21 00:35:36802--abbrev-commit
803</dt>
804<dd>
805<p>
806 Instead of showing the full 40-byte hexadecimal commit object
Junio C Hamano6efe3022009-01-13 16:47:56807 name, show only a partial prefix. Non default number of
Junio C Hamanoee695f22007-06-21 00:35:36808 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
809 diff output, if it is displayed).
810</p>
Junio C Hamano68cf15a2010-11-06 01:01:59811<div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
Junio C Hamanoba4b9282008-07-06 05:20:31812people using 80-column terminals.</p></div>
Junio C Hamanoee695f22007-06-21 00:35:36813</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59814<dt class="hdlist1">
Junio C Hamanof93530e2011-05-25 23:59:59815--no-abbrev-commit
816</dt>
817<dd>
818<p>
819 Show the full 40-byte hexadecimal commit object name. This negates
Junio C Hamano9d971152012-12-19 00:43:11820 <code>--abbrev-commit</code> and those options which imply it such as
Junio C Hamanof93530e2011-05-25 23:59:59821 "--oneline". It also overrides the <em>log.abbrevCommit</em> variable.
822</p>
823</dd>
824<dt class="hdlist1">
Junio C Hamano0a235222009-03-06 08:21:09825--oneline
826</dt>
827<dd>
828<p>
829 This is a shorthand for "--pretty=oneline --abbrev-commit"
830 used together.
831</p>
832</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59833<dt class="hdlist1">
Junio C Hamano0430e3a2007-05-15 03:13:17834--encoding[=&lt;encoding&gt;]
835</dt>
836<dd>
837<p>
838 The commit objects record the encoding used for the log message
839 in their encoding header; this option can be used to tell the
840 command to re-code the commit log message in the encoding
841 preferred by the user. For non plumbing commands this
842 defaults to UTF-8.
843</p>
844</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59845<dt class="hdlist1">
Junio C Hamano60033462011-05-03 00:48:43846--notes[=&lt;ref&gt;]
Junio C Hamano57827fb2010-01-23 03:02:50847</dt>
848<dd>
849<p>
Junio C Hamanoa28a9202012-06-21 07:08:23850 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
Junio C Hamano57827fb2010-01-23 03:02:50851 commit, when showing the commit log message. This is the default
Junio C Hamano9d971152012-12-19 00:43:11852 for <code>git log</code>, <code>git show</code> and <code>git whatchanged</code> commands when
853 there is no <code>--pretty</code>, <code>--format</code> nor <code>--oneline</code> option given
Junio C Hamano60033462011-05-03 00:48:43854 on the command line.
Junio C Hamano57827fb2010-01-23 03:02:50855</p>
Junio C Hamano60033462011-05-03 00:48:43856<div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the
857<em>core.notesRef</em> and <em>notes.displayRef</em> variables (or corresponding
Junio C Hamanoa28a9202012-06-21 07:08:23858environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div>
Junio C Hamano60033462011-05-03 00:48:43859<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:11860default notes ref(s). The ref is taken to be in <code>refs/notes/</code> if it
Junio C Hamano60033462011-05-03 00:48:43861is not qualified.</p></div>
862<div class="paragraph"><p>Multiple --notes options can be combined to control which notes are
863being displayed. Examples: "--notes=foo" will show only notes from
864"refs/notes/foo"; "--notes=foo --notes" will show both notes from
865"refs/notes/foo" and from the default notes ref(s).</p></div>
Junio C Hamano31667362010-03-25 00:38:53866</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59867<dt class="hdlist1">
Junio C Hamano60033462011-05-03 00:48:43868--no-notes
869</dt>
870<dd>
871<p>
Junio C Hamano9d971152012-12-19 00:43:11872 Do not show notes. This negates the above <code>--notes</code> option, by
Junio C Hamano60033462011-05-03 00:48:43873 resetting the list of notes refs from which notes are shown.
874 Options are parsed in the order given on the command line, so e.g.
875 "--notes --notes=foo --no-notes --notes=bar" will only show notes
876 from "refs/notes/bar".
877</p>
878</dd>
879<dt class="hdlist1">
880--show-notes[=&lt;ref&gt;]
881</dt>
882<dt class="hdlist1">
Junio C Hamano31667362010-03-25 00:38:53883--[no-]standard-notes
884</dt>
885<dd>
886<p>
Junio C Hamano60033462011-05-03 00:48:43887 These options are deprecated. Use the above --notes/--no-notes
888 options instead.
Junio C Hamano31667362010-03-25 00:38:53889</p>
Junio C Hamano57827fb2010-01-23 03:02:50890</dd>
Junio C Hamano0acb1ae2012-09-24 21:28:13891<dt class="hdlist1">
892--show-signature
893</dt>
894<dd>
895<p>
896 Check the validity of a signed commit object by passing the signature
Junio C Hamano9d971152012-12-19 00:43:11897 to <code>gpg --verify</code> and show the output.
Junio C Hamano0acb1ae2012-09-24 21:28:13898</p>
899</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31900</dl></div>
Junio C Hamano0430e3a2007-05-15 03:13:17901</div>
Junio C Hamano9d971152012-12-19 00:43:11902</div>
903<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31904<h2 id="_pretty_formats">PRETTY FORMATS</h2>
Junio C Hamano0430e3a2007-05-15 03:13:17905<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59906<div class="paragraph"><p>If the commit is a merge, and if the pretty-format
Junio C Hamano0430e3a2007-05-15 03:13:17907is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
908inserted before the <em>Author:</em> line. This line begins with
909"Merge: " and the sha1s of ancestral commits are printed,
910separated by spaces. Note that the listed commits may not
911necessarily be the list of the <strong>direct</strong> parent commits if you
912have limited your view of history: for example, if you are
913only interested in changes related to a certain directory or
Junio C Hamanoba4b9282008-07-06 05:20:31914file.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59915<div class="paragraph"><p>There are several built-in formats, and you can define
Junio C Hamanoa574a092010-06-13 19:57:10916additional formats by setting a pretty.&lt;name&gt;
917config option to either another format name, or a
918<em>format:</em> string, as described below (see
Junio C Hamanoa28a9202012-06-21 07:08:23919<a href="git-config.html">git-config(1)</a>). Here are the details of the
Junio C Hamanoa574a092010-06-13 19:57:10920built-in formats:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59921<div class="ulist"><ul>
Junio C Hamanoa340aaa2006-11-23 02:47:33922<li>
923<p>
924<em>oneline</em>
925</p>
926<div class="literalblock">
927<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11928<pre><code>&lt;sha1&gt; &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33929</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59930<div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:33931</li>
932<li>
933<p>
934<em>short</em>
935</p>
936<div class="literalblock">
937<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11938<pre><code>commit &lt;sha1&gt;
939Author: &lt;author&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33940</div></div>
941<div class="literalblock">
942<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11943<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33944</div></div>
945</li>
946<li>
947<p>
948<em>medium</em>
949</p>
950<div class="literalblock">
951<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11952<pre><code>commit &lt;sha1&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:33953Author: &lt;author&gt;
Junio C Hamano9d971152012-12-19 00:43:11954Date: &lt;author date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33955</div></div>
956<div class="literalblock">
957<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11958<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33959</div></div>
960<div class="literalblock">
961<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11962<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33963</div></div>
964</li>
965<li>
966<p>
967<em>full</em>
968</p>
969<div class="literalblock">
970<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11971<pre><code>commit &lt;sha1&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:33972Author: &lt;author&gt;
Junio C Hamano9d971152012-12-19 00:43:11973Commit: &lt;committer&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33974</div></div>
975<div class="literalblock">
976<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11977<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33978</div></div>
979<div class="literalblock">
980<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11981<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33982</div></div>
983</li>
984<li>
985<p>
986<em>fuller</em>
987</p>
988<div class="literalblock">
989<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11990<pre><code>commit &lt;sha1&gt;
Junio C Hamano6a3c8272008-12-19 21:38:18991Author: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:31992AuthorDate: &lt;author date&gt;
Junio C Hamano6a3c8272008-12-19 21:38:18993Commit: &lt;committer&gt;
Junio C Hamano9d971152012-12-19 00:43:11994CommitDate: &lt;committer date&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33995</div></div>
996<div class="literalblock">
997<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11998<pre><code>&lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:33999</div></div>
1000<div class="literalblock">
1001<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111002<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:331003</div></div>
1004</li>
1005<li>
1006<p>
1007<em>email</em>
1008</p>
1009<div class="literalblock">
1010<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111011<pre><code>From &lt;sha1&gt; &lt;date&gt;
Junio C Hamanoa340aaa2006-11-23 02:47:331012From: &lt;author&gt;
Junio C Hamanoba4b9282008-07-06 05:20:311013Date: &lt;author date&gt;
Junio C Hamano9d971152012-12-19 00:43:111014Subject: [PATCH] &lt;title line&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:331015</div></div>
1016<div class="literalblock">
1017<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111018<pre><code>&lt;full commit message&gt;</code></pre>
Junio C Hamanoa340aaa2006-11-23 02:47:331019</div></div>
1020</li>
1021<li>
1022<p>
1023<em>raw</em>
1024</p>
Junio C Hamano68cf15a2010-11-06 01:01:591025<div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
Junio C Hamanoa340aaa2006-11-23 02:47:331026stored in the commit object. Notably, the SHA1s are
1027displayed in full, regardless of whether --abbrev or
1028--no-abbrev are used, and <em>parents</em> information show the
1029true parent commits, without taking grafts nor history
Junio C Hamanoba4b9282008-07-06 05:20:311030simplification into account.</p></div>
Junio C Hamanoa340aaa2006-11-23 02:47:331031</li>
Junio C Hamanoa3fd83c2007-03-02 10:34:361032<li>
1033<p>
Junio C Hamanoe32ec8b2010-06-02 23:32:311034<em>format:&lt;string&gt;</em>
Junio C Hamanoa3fd83c2007-03-02 10:34:361035</p>
Junio C Hamano68cf15a2010-11-06 01:01:591036<div class="paragraph"><p>The <em>format:&lt;string&gt;</em> format allows you to specify which information
Junio C Hamanoa3fd83c2007-03-02 10:34:361037you want to show. It works a little bit like printf format,
1038with the notable exception that you get a newline with <em>%n</em>
Junio C Hamanoba4b9282008-07-06 05:20:311039instead of <em>\n</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591040<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:311041would show something like this:</p></div>
Junio C Hamano0430e3a2007-05-15 03:13:171042<div class="listingblock">
1043<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111044<pre><code>The author of fe6e0ee was Junio C Hamano, 23 hours ago
1045The 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:171046</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591047<div class="paragraph"><p>The placeholders are:</p></div>
1048<div class="ulist"><ul>
Junio C Hamanoa3fd83c2007-03-02 10:34:361049<li>
1050<p>
1051<em>%H</em>: commit hash
1052</p>
1053</li>
1054<li>
1055<p>
1056<em>%h</em>: abbreviated commit hash
1057</p>
1058</li>
1059<li>
1060<p>
1061<em>%T</em>: tree hash
1062</p>
1063</li>
1064<li>
1065<p>
1066<em>%t</em>: abbreviated tree hash
1067</p>
1068</li>
1069<li>
1070<p>
1071<em>%P</em>: parent hashes
1072</p>
1073</li>
1074<li>
1075<p>
1076<em>%p</em>: abbreviated parent hashes
1077</p>
1078</li>
1079<li>
1080<p>
1081<em>%an</em>: author name
1082</p>
1083</li>
1084<li>
1085<p>
Junio C Hamanoa28a9202012-06-21 07:08:231086<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:571087</p>
1088</li>
1089<li>
1090<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:361091<em>%ae</em>: author email
1092</p>
1093</li>
1094<li>
1095<p>
Junio C Hamanoa28a9202012-06-21 07:08:231096<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:191097</p>
1098</li>
1099<li>
1100<p>
Junio C Hamanoa387df32008-08-29 08:56:581101<em>%ad</em>: author date (format respects --date= option)
Junio C Hamanoa3fd83c2007-03-02 10:34:361102</p>
1103</li>
1104<li>
1105<p>
1106<em>%aD</em>: author date, RFC2822 style
1107</p>
1108</li>
1109<li>
1110<p>
1111<em>%ar</em>: author date, relative
1112</p>
1113</li>
1114<li>
1115<p>
1116<em>%at</em>: author date, UNIX timestamp
1117</p>
1118</li>
1119<li>
1120<p>
Junio C Hamano02f130b2007-07-14 08:26:561121<em>%ai</em>: author date, ISO 8601 format
1122</p>
1123</li>
1124<li>
1125<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:361126<em>%cn</em>: committer name
1127</p>
1128</li>
1129<li>
1130<p>
Junio C Hamanoa28a9202012-06-21 07:08:231131<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:571132</p>
1133</li>
1134<li>
1135<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:361136<em>%ce</em>: committer email
1137</p>
1138</li>
1139<li>
1140<p>
Junio C Hamanoa28a9202012-06-21 07:08:231141<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:191142</p>
1143</li>
1144<li>
1145<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:361146<em>%cd</em>: committer date
1147</p>
1148</li>
1149<li>
1150<p>
1151<em>%cD</em>: committer date, RFC2822 style
1152</p>
1153</li>
1154<li>
1155<p>
1156<em>%cr</em>: committer date, relative
1157</p>
1158</li>
1159<li>
1160<p>
1161<em>%ct</em>: committer date, UNIX timestamp
1162</p>
1163</li>
1164<li>
1165<p>
Junio C Hamano02f130b2007-07-14 08:26:561166<em>%ci</em>: committer date, ISO 8601 format
1167</p>
1168</li>
1169<li>
1170<p>
Junio C Hamanoa28a9202012-06-21 07:08:231171<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:021172</p>
1173</li>
1174<li>
1175<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:361176<em>%e</em>: encoding
1177</p>
1178</li>
1179<li>
1180<p>
1181<em>%s</em>: subject
1182</p>
1183</li>
1184<li>
1185<p>
Junio C Hamano5f9a6f02009-04-06 08:26:561186<em>%f</em>: sanitized subject line, suitable for a filename
1187</p>
1188</li>
1189<li>
1190<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:361191<em>%b</em>: body
1192</p>
1193</li>
1194<li>
1195<p>
Junio C Hamanocb39aea2010-05-09 07:24:481196<em>%B</em>: raw body (unwrapped subject and body)
1197</p>
1198</li>
1199<li>
1200<p>
Junio C Hamano3b70d3c2009-11-21 17:37:371201<em>%N</em>: commit notes
1202</p>
1203</li>
1204<li>
1205<p>
Junio C Hamano0acb1ae2012-09-24 21:28:131206<em>%GG</em>: raw verification message from GPG for a signed commit
1207</p>
1208</li>
1209<li>
1210<p>
1211<em>%G?</em>: show either "G" for Good or "B" for Bad for a signed commit
1212</p>
1213</li>
1214<li>
1215<p>
1216<em>%GS</em>: show the name of the signer for a signed commit
1217</p>
1218</li>
1219<li>
1220<p>
Junio C Hamano5e7f1312013-03-21 22:49:011221<em>%GK</em>: show the key used to sign a signed commit
1222</p>
1223</li>
1224<li>
1225<p>
Junio C Hamano9d971152012-12-19 00:43:111226<em>%gD</em>: reflog selector, e.g., <code>refs/stash@{1}</code>
Junio C Hamanoc21ab052009-10-31 04:03:551227</p>
1228</li>
1229<li>
1230<p>
Junio C Hamano9d971152012-12-19 00:43:111231<em>%gd</em>: shortened reflog selector, e.g., <code>stash@{1}</code>
Junio C Hamanoc21ab052009-10-31 04:03:551232</p>
1233</li>
1234<li>
1235<p>
Junio C Hamano962f3a32011-12-22 20:21:441236<em>%gn</em>: reflog identity name
1237</p>
1238</li>
1239<li>
1240<p>
Junio C Hamanoa28a9202012-06-21 07:08:231241<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:441242</p>
1243</li>
1244<li>
1245<p>
1246<em>%ge</em>: reflog identity email
1247</p>
1248</li>
1249<li>
1250<p>
Junio C Hamanoa28a9202012-06-21 07:08:231251<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:441252</p>
1253</li>
1254<li>
1255<p>
Junio C Hamanoc21ab052009-10-31 04:03:551256<em>%gs</em>: reflog subject
1257</p>
1258</li>
1259<li>
1260<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:361261<em>%Cred</em>: switch color to red
1262</p>
1263</li>
1264<li>
1265<p>
1266<em>%Cgreen</em>: switch color to green
1267</p>
1268</li>
1269<li>
1270<p>
1271<em>%Cblue</em>: switch color to blue
1272</p>
1273</li>
1274<li>
1275<p>
1276<em>%Creset</em>: reset color
1277</p>
1278</li>
1279<li>
1280<p>
Junio C Hamanoabad6da2013-01-06 09:06:321281<em>%C(&#8230;)</em>: color specification, as described in color.branch.* config option;
1282 adding <code>auto,</code> at the beginning will emit color only when colors are
1283 enabled for log output (by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and
1284 respecting the <code>auto</code> settings of the former if we are going to a
1285 terminal)
Junio C Hamanocc0cb312009-01-22 03:38:501286</p>
1287</li>
1288<li>
1289<p>
Junio C Hamanod9e0e5d2007-04-14 16:22:041290<em>%m</em>: left, right or boundary mark
1291</p>
1292</li>
1293<li>
1294<p>
Junio C Hamanoa3fd83c2007-03-02 10:34:361295<em>%n</em>: newline
1296</p>
Junio C Hamano0430e3a2007-05-15 03:13:171297</li>
Junio C Hamanob78d2592008-04-09 09:39:081298<li>
1299<p>
Junio C Hamanoa9701f02010-01-21 00:42:161300<em>%%</em>: a raw <em>%</em>
1301</p>
1302</li>
1303<li>
1304<p>
Junio C Hamanob78d2592008-04-09 09:39:081305<em>%x00</em>: print a byte from a hex code
1306</p>
1307</li>
Junio C Hamanobf984de2009-11-23 06:11:191308<li>
1309<p>
1310<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:231311 <a href="git-shortlog.html">git-shortlog(1)</a>.
Junio C Hamanobf984de2009-11-23 06:11:191312</p>
1313</li>
Junio C Hamanoba4b9282008-07-06 05:20:311314</ul></div>
Junio C Hamanoa3fd83c2007-03-02 10:34:361315</li>
Junio C Hamanoc21ab052009-10-31 04:03:551316</ul></div>
1317<div class="admonitionblock">
1318<table><tr>
1319<td class="icon">
1320<div class="title">Note</div>
1321</td>
1322<td class="content">Some placeholders may depend on other options given to the
Junio C Hamano9d971152012-12-19 00:43:111323revision traversal engine. For example, the <code>%g*</code> reflog options will
Junio C Hamanoc21ab052009-10-31 04:03:551324insert an empty string unless we are traversing reflog entries (e.g., by
Junio C Hamano9d971152012-12-19 00:43:111325<code>git log -g</code>). The <code>%d</code> placeholder will use the "short" decoration
1326format if <code>--decorate</code> was not already provided on the command line.</td>
Junio C Hamanoc21ab052009-10-31 04:03:551327</tr></table>
1328</div>
Junio C Hamano9d971152012-12-19 00:43:111329<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:591330is inserted immediately before the expansion if and only if the
1331placeholder expands to a non-empty string.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111332<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:591333immediately precede the expansion are deleted if and only if the
1334placeholder expands to an empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591335<div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
Junio C Hamano89a57342010-06-22 23:22:551336is inserted immediately before the expansion if and only if the
1337placeholder expands to a non-empty string.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591338<div class="ulist"><ul>
Junio C Hamano6fb124c2008-06-13 10:04:011339<li>
1340<p>
1341<em>tformat:</em>
1342</p>
Junio C Hamano68cf15a2010-11-06 01:01:591343<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:011344provides "terminator" semantics instead of "separator" semantics. In
1345other words, each commit has the message terminator character (usually a
1346newline) appended, rather than a separator placed between entries.
1347This means that the final entry of a single-line format will be properly
1348terminated with a new line, just as the "oneline" format does.
Junio C Hamanoba4b9282008-07-06 05:20:311349For example:</p></div>
Junio C Hamano6fb124c2008-06-13 10:04:011350<div class="listingblock">
1351<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111352<pre><code>$ git log -2 --pretty=format:%h 4da45bef \
Junio C Hamano6fb124c2008-06-13 10:04:011353 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
13544da45be
13557134973 -- NO NEWLINE
1356
1357$ git log -2 --pretty=tformat:%h 4da45bef \
1358 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
13594da45be
Junio C Hamano9d971152012-12-19 00:43:1113607134973</code></pre>
Junio C Hamano6fb124c2008-06-13 10:04:011361</div></div>
Junio C Hamano9d971152012-12-19 00:43:111362<div class="paragraph"><p>In addition, any unrecognized string that has a <code>%</code> in it is interpreted
1363as if it has <code>tformat:</code> in front of it. For example, these two are
Junio C Hamano0a235222009-03-06 08:21:091364equivalent:</p></div>
1365<div class="listingblock">
1366<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111367<pre><code>$ git log -2 --pretty=tformat:%h 4da45bef
1368$ git log -2 --pretty=%h 4da45bef</code></pre>
Junio C Hamano0a235222009-03-06 08:21:091369</div></div>
Junio C Hamano6fb124c2008-06-13 10:04:011370</li>
Junio C Hamanoba4b9282008-07-06 05:20:311371</ul></div>
Junio C Hamanod9d71c02006-02-08 00:52:331372</div>
Junio C Hamano9d971152012-12-19 00:43:111373</div>
1374<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311375<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano7d23f5e2006-12-16 07:44:041376<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591377<div class="dlist"><dl>
1378<dt class="hdlist1">
Junio C Hamano9d971152012-12-19 00:43:111379<code>git show v1.0.0</code>
Junio C Hamano7d23f5e2006-12-16 07:44:041380</dt>
1381<dd>
1382<p>
Junio C Hamano9d971152012-12-19 00:43:111383 Shows the tag <code>v1.0.0</code>, along with the object the tags
Junio C Hamano775a0f42006-12-31 01:19:141384 points at.
Junio C Hamano7d23f5e2006-12-16 07:44:041385</p>
1386</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591387<dt class="hdlist1">
Junio C Hamano9d971152012-12-19 00:43:111388<code>git show v1.0.0^{tree}</code>
Junio C Hamano7d23f5e2006-12-16 07:44:041389</dt>
1390<dd>
1391<p>
Junio C Hamano9d971152012-12-19 00:43:111392 Shows the tree pointed to by the tag <code>v1.0.0</code>.
Junio C Hamano7d23f5e2006-12-16 07:44:041393</p>
1394</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591395<dt class="hdlist1">
Junio C Hamano9d971152012-12-19 00:43:111396<code>git show -s --format=%s v1.0.0^{commit}</code>
Junio C Hamanoc3fda572010-11-09 19:41:301397</dt>
1398<dd>
1399<p>
1400 Shows the subject of the commit pointed to by the
Junio C Hamano9d971152012-12-19 00:43:111401 tag <code>v1.0.0</code>.
Junio C Hamanoc3fda572010-11-09 19:41:301402</p>
1403</dd>
1404<dt class="hdlist1">
Junio C Hamano9d971152012-12-19 00:43:111405<code>git show next~10:Documentation/README</code>
Junio C Hamanodb911ee2007-02-28 08:13:521406</dt>
1407<dd>
1408<p>
Junio C Hamano9d971152012-12-19 00:43:111409 Shows the contents of the file <code>Documentation/README</code> as
Junio C Hamano7d23f5e2006-12-16 07:44:041410 they were current in the 10th last commit of the branch
Junio C Hamano9d971152012-12-19 00:43:111411 <code>next</code>.
Junio C Hamanodb911ee2007-02-28 08:13:521412</p>
1413</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591414<dt class="hdlist1">
Junio C Hamano9d971152012-12-19 00:43:111415<code>git show master:Makefile master:t/Makefile</code>
Junio C Hamanodb911ee2007-02-28 08:13:521416</dt>
1417<dd>
1418<p>
Junio C Hamano7d23f5e2006-12-16 07:44:041419 Concatenates the contents of said Makefiles in the head
Junio C Hamano9d971152012-12-19 00:43:111420 of the branch <code>master</code>.
Junio C Hamanodb911ee2007-02-28 08:13:521421</p>
1422</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311423</dl></div>
Junio C Hamano7d23f5e2006-12-16 07:44:041424</div>
Junio C Hamano9d971152012-12-19 00:43:111425</div>
1426<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311427<h2 id="_discussion">Discussion</h2>
Junio C Hamano775a0f42006-12-31 01:19:141428<div class="sectionbody">
Junio C Hamano076ffcc2013-02-06 05:13:211429<div class="paragraph"><p>At the core level, Git is character encoding agnostic.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591430<div class="ulist"><ul>
Junio C Hamano775a0f42006-12-31 01:19:141431<li>
1432<p>
1433The pathnames recorded in the index and in the tree objects
1434 are treated as uninterpreted sequences of non-NUL bytes.
1435 What readdir(2) returns are what are recorded and compared
Junio C Hamano076ffcc2013-02-06 05:13:211436 with the data Git keeps track of, which in turn are expected
Junio C Hamano775a0f42006-12-31 01:19:141437 to be what lstat(2) and creat(2) accepts. There is no such
1438 thing as pathname encoding translation.
1439</p>
1440</li>
1441<li>
1442<p>
Junio C Hamano54bf1e22008-12-20 06:30:111443The contents of the blob objects are uninterpreted sequences
Junio C Hamano775a0f42006-12-31 01:19:141444 of bytes. There is no encoding translation at the core
1445 level.
1446</p>
1447</li>
1448<li>
1449<p>
Junio C Hamano54bf1e22008-12-20 06:30:111450The commit log messages are uninterpreted sequences of non-NUL
Junio C Hamano775a0f42006-12-31 01:19:141451 bytes.
1452</p>
1453</li>
Junio C Hamanoba4b9282008-07-06 05:20:311454</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:591455<div class="paragraph"><p>Although we encourage that the commit log messages are encoded
Junio C Hamano076ffcc2013-02-06 05:13:211456in UTF-8, both the core and Git Porcelain are designed not to
Junio C Hamano775a0f42006-12-31 01:19:141457force UTF-8 on projects. If all participants of a particular
Junio C Hamano076ffcc2013-02-06 05:13:211458project find it more convenient to use legacy encodings, Git
Junio C Hamano775a0f42006-12-31 01:19:141459does not forbid it. However, there are a few things to keep in
Junio C Hamanoba4b9282008-07-06 05:20:311460mind.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591461<div class="olist arabic"><ol class="arabic">
Junio C Hamano775a0f42006-12-31 01:19:141462<li>
1463<p>
Junio C Hamano1aa40d22010-01-21 17:46:431464<em>git commit</em> and <em>git commit-tree</em> issues
Junio C Hamano14b76482008-01-05 10:32:261465 a warning if the commit log message given to it does not look
Junio C Hamano775a0f42006-12-31 01:19:141466 like a valid UTF-8 string, unless you explicitly say your
1467 project uses a legacy encoding. The way to say this is to
Junio C Hamano9d971152012-12-19 00:43:111468 have i18n.commitencoding in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:141469</p>
1470<div class="listingblock">
1471<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111472<pre><code>[i18n]
1473 commitencoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:141474</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591475<div class="paragraph"><p>Commit objects created with the above setting record the value
Junio C Hamano9d971152012-12-19 00:43:111476of <code>i18n.commitencoding</code> in its <code>encoding</code> header. This is to
Junio C Hamano775a0f42006-12-31 01:19:141477help other people who look at them later. Lack of this header
Junio C Hamanoba4b9282008-07-06 05:20:311478implies that the commit log message is encoded in UTF-8.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:141479</li>
1480<li>
1481<p>
Junio C Hamano1aa40d22010-01-21 17:46:431482<em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
Junio C Hamano9d971152012-12-19 00:43:111483 <code>encoding</code> header of a commit object, and try to re-code the
Junio C Hamanoaa17c7c2008-11-03 04:36:581484 log message into UTF-8 unless otherwise specified. You can
Junio C Hamano775a0f42006-12-31 01:19:141485 specify the desired output encoding with
Junio C Hamano9d971152012-12-19 00:43:111486 <code>i18n.logoutputencoding</code> in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:141487</p>
1488<div class="listingblock">
1489<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111490<pre><code>[i18n]
1491 logoutputencoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:141492</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591493<div class="paragraph"><p>If you do not have this configuration variable, the value of
Junio C Hamano9d971152012-12-19 00:43:111494<code>i18n.commitencoding</code> is used instead.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:141495</li>
Junio C Hamanoba4b9282008-07-06 05:20:311496</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:591497<div class="paragraph"><p>Note that we deliberately chose not to re-code the commit log
Junio C Hamano775a0f42006-12-31 01:19:141498message when a commit is made to force UTF-8 at the commit
1499object level, because re-coding to UTF-8 is not necessarily a
Junio C Hamanoba4b9282008-07-06 05:20:311500reversible operation.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:141501</div>
Junio C Hamano9d971152012-12-19 00:43:111502</div>
1503<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311504<h2 id="_git">GIT</h2>
Junio C Hamanod9d71c02006-02-08 00:52:331505<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231506<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamanod9d71c02006-02-08 00:52:331507</div>
Junio C Hamano7bd050f2011-09-22 06:32:221508</div>
Junio C Hamano9d971152012-12-19 00:43:111509</div>
Junio C Hamano7bd050f2011-09-22 06:32:221510<div id="footnotes"><hr /></div>
Junio C Hamanod9d71c02006-02-08 00:52:331511<div id="footer">
1512<div id="footer-text">
Junio C Hamanob76a6862012-05-02 22:02:461513Last updated 2012-05-02 15:00:44 PDT
Junio C Hamanod9d71c02006-02-08 00:52:331514</div>
1515</div>
1516</body>
1517</html>