blob: 8bd37e73f1d1bc5fa730ad5a56cbeca940a7337e [file] [log] [blame]
Junio C Hamanob33fb4f2006-04-18 21:30:511<!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 Hamanoed69a742010-12-01 03:09:237<title>git-blame(1)</title>
Junio C Hamanob33fb4f2006-04-18 21:30:518<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 Hamanob33fb4f2006-04-18 21:30:5124}
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 Hamanob33fb4f2006-04-18 21:30:5137
38em {
39 font-style: italic;
Junio C Hamanoed69a742010-12-01 03:09:2340 color: navy;
Junio C Hamanob33fb4f2006-04-18 21:30:5141}
42
43strong {
44 font-weight: bold;
Junio C Hamanoed69a742010-12-01 03:09:2345 color: #083194;
Junio C Hamanob33fb4f2006-04-18 21:30:5146}
47
Junio C Hamanob33fb4f2006-04-18 21:30:5148h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamanob33fb4f2006-04-18 21:30:5150 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 Hamanob33fb4f2006-04-18 21:30:5156 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamanob33fb4f2006-04-18 21:30:5159 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 Hamanob33fb4f2006-04-18 21:30:5170
71div.sectionbody {
Junio C Hamanob33fb4f2006-04-18 21:30:5172 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 Hamanoed69a742010-12-01 03:09:2384ul, 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 Hamanoed69a742010-12-01 03:09:2389
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 Hamanob33fb4f2006-04-18 21:30:5194 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9d971152012-12-19 00:43:1198
99#author {
Junio C Hamanob33fb4f2006-04-18 21:30:51100 color: #527bbd;
Junio C Hamanob33fb4f2006-04-18 21:30:51101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamanob33fb4f2006-04-18 21:30:51103}
Junio C Hamano9d971152012-12-19 00:43:11104#email {
Junio C Hamanob33fb4f2006-04-18 21:30:51105}
Junio C Hamano9d971152012-12-19 00:43:11106#revnumber, #revdate, #revremark {
Junio C Hamanob33fb4f2006-04-18 21:30:51107}
108
Junio C Hamano9d971152012-12-19 00:43:11109#footer {
Junio C Hamanob33fb4f2006-04-18 21:30:51110 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 Hamanob33fb4f2006-04-18 21:30:51116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9d971152012-12-19 00:43:11119#footer-badges {
Junio C Hamanob33fb4f2006-04-18 21:30:51120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9d971152012-12-19 00:43:11124#preamble {
Junio C Hamanoed69a742010-12-01 03:09:23125 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 Hamanob33fb4f2006-04-18 21:30:51129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamanob33fb4f2006-04-18 21:30:51132 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 Hamanob33fb4f2006-04-18 21:30:51139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamanoed69a742010-12-01 03:09:23147 color: #527bbd;
Junio C Hamanob33fb4f2006-04-18 21:30:51148 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 Hamanob33fb4f2006-04-18 21:30:51171 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 Hamanob33fb4f2006-04-18 21:30:51178 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 Hamanoed69a742010-12-01 03:09:23184 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamanob33fb4f2006-04-18 21:30:51187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamanoed69a742010-12-01 03:09:23189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamanob33fb4f2006-04-18 21:30:51191 text-align: right;
192}
Junio C Hamanoed69a742010-12-01 03:09:23193
Junio C Hamano9d971152012-12-19 00:43:11194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamanoed69a742010-12-01 03:09:23197}
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 Hamanob33fb4f2006-04-18 21:30:51206
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 Hamanob33fb4f2006-04-18 21:30:51218}
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 Hamanob33fb4f2006-04-18 21:30:51223}
224
Junio C Hamanob33fb4f2006-04-18 21:30:51225div.imageblock div.content { padding-left: 0; }
Junio C Hamanob33fb4f2006-04-18 21:30:51226span.image img { border-style: none; }
Junio C Hamanoed69a742010-12-01 03:09:23227a.image:visited { color: white; }
Junio C Hamanob33fb4f2006-04-18 21:30:51228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamanoed69a742010-12-01 03:09:23236 font-style: normal;
237 color: navy;
Junio C Hamanob33fb4f2006-04-18 21:30:51238}
239dd > *:first-child {
Junio C Hamanoed69a742010-12-01 03:09:23240 margin-top: 0.1em;
Junio C Hamanob33fb4f2006-04-18 21:30:51241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamanoed69a742010-12-01 03:09:23246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamanob33fb4f2006-04-18 21:30:51250 list-style-type: lower-alpha;
251}
Junio C Hamanoed69a742010-12-01 03:09:23252ol.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 Hamanob33fb4f2006-04-18 21:30:51268
Junio C Hamanob33fb4f2006-04-18 21:30:51269tfoot {
270 font-weight: bold;
271}
Junio C Hamanoed69a742010-12-01 03:09:23272td > div.verse {
273 white-space: pre;
274}
Junio C Hamanoed69a742010-12-01 03:09:23275
276div.hdlist {
Junio C Hamanob33fb4f2006-04-18 21:30:51277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamanoed69a742010-12-01 03:09:23280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31282}
Junio C Hamanoed69a742010-12-01 03:09:23283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamanob33fb4f2006-04-18 21:30:51287 vertical-align: top;
Junio C Hamanoed69a742010-12-01 03:09:23288 font-style: normal;
Junio C Hamanob33fb4f2006-04-18 21:30:51289 padding-right: 0.8em;
Junio C Hamanoed69a742010-12-01 03:09:23290 color: navy;
Junio C Hamanob33fb4f2006-04-18 21:30:51291}
Junio C Hamanoed69a742010-12-01 03:09:23292td.hdlist2 {
Junio C Hamanob33fb4f2006-04-18 21:30:51293 vertical-align: top;
294}
Junio C Hamanoed69a742010-12-01 03:09:23295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamanob33fb4f2006-04-18 21:30:51303
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 Hamanob33fb4f2006-04-18 21:30:51338}
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 Hamanoed69a742010-12-01 03:09:23519 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 Hamanoed69a742010-12-01 03:09:23525 border-style: none;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamanoed69a742010-12-01 03:09:23529}
530
531@media print {
Junio C Hamano9d971152012-12-19 00:43:11532 body.manpage div#toc { display: none; }
Junio C Hamanoed69a742010-12-01 03:09:23533}
534
Junio C Hamanob33fb4f2006-04-18 21:30:51535
Junio C Hamanob33fb4f2006-04-18 21:30:51536</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 Hamanob33fb4f2006-04-18 21:30:51731</head>
Junio C Hamano9d971152012-12-19 00:43:11732<body class="manpage">
Junio C Hamanob33fb4f2006-04-18 21:30:51733<div id="header">
734<h1>
735git-blame(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-blame -
Junio C Hamano6b2cee12006-08-26 08:43:31740 Show what revision and author last modified each line of a file
Junio C Hamanob33fb4f2006-04-18 21:30:51741</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 Hamanoed69a742010-12-01 03:09:23746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamanob33fb4f2006-04-18 21:30:51747<div class="sectionbody">
Junio C Hamanoe1aa7472006-11-09 07:37:50748<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11749<pre class="content"><em>git blame</em> [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental] [-L n,m]
Junio C Hamano209ebe82011-04-27 21:09:59750 [-S &lt;revs-file&gt;] [-M] [-C] [-C] [-C] [--since=&lt;date&gt;] [--abbrev=&lt;n&gt;]
Junio C Hamano9d971152012-12-19 00:43:11751 [&lt;rev&gt; | --contents &lt;file&gt; | --reverse &lt;rev&gt;] [--] &lt;file&gt;</pre>
752<div class="attribution">
Junio C Hamanoed69a742010-12-01 03:09:23753</div></div>
Junio C Hamanob33fb4f2006-04-18 21:30:51754</div>
Junio C Hamano9d971152012-12-19 00:43:11755</div>
756<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31757<h2 id="_description">DESCRIPTION</h2>
Junio C Hamanob33fb4f2006-04-18 21:30:51758<div class="sectionbody">
Junio C Hamanoed69a742010-12-01 03:09:23759<div class="paragraph"><p>Annotates each line in the given file with information from the revision which
Junio C Hamanoba4b9282008-07-06 05:20:31760last modified the line. Optionally, start annotating from the given revision.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:23761<div class="paragraph"><p>The command can also limit the range of lines annotated.</p></div>
Junio C Hamano6a8a8482012-10-01 20:59:41762<div class="paragraph"><p>The origin of lines is automatically followed across whole-file
763renames (currently there is no option to turn the rename-following
764off). To follow lines moved from one file to another, or to follow
765lines that were copied and pasted from another file, etc., see the
Junio C Hamano9d971152012-12-19 00:43:11766<code>-C</code> and <code>-M</code> options.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:23767<div class="paragraph"><p>The report does not tell you anything about lines which have been deleted or
Junio C Hamano1aa40d22010-01-21 17:46:43768replaced; you need to use a tool such as <em>git diff</em> or the "pickaxe"
Junio C Hamanoba4b9282008-07-06 05:20:31769interface briefly mentioned in the following paragraph.</p></div>
Junio C Hamano076ffcc2013-02-06 05:13:21770<div class="paragraph"><p>Apart from supporting file annotation, Git also supports searching the
Junio C Hamanof9771f62007-01-17 17:42:30771development history for when a code snippet occurred in a change. This makes it
Junio C Hamano6b2cee12006-08-26 08:43:31772possible to track when a code snippet was added to a file, moved or copied
773between files, and eventually deleted or replaced. It works by searching for
Junio C Hamanoba4b9282008-07-06 05:20:31774a text string in the diff. A small example:</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:31775<div class="listingblock">
776<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11777<pre><code>$ git log --pretty=oneline -S'blame_usage'
Junio C Hamano6b2cee12006-08-26 08:43:317785040f17eba15504bad66b14a645bddd9b015ebb7 blame -S &lt;ancestry-file&gt;
Junio C Hamano9d971152012-12-19 00:43:11779ea4c7f9bf69e781dd0cd88d2bccb2bf5cc15c9a7 git-blame: Make the output</code></pre>
Junio C Hamano6b2cee12006-08-26 08:43:31780</div></div>
Junio C Hamanob33fb4f2006-04-18 21:30:51781</div>
Junio C Hamano9d971152012-12-19 00:43:11782</div>
783<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31784<h2 id="_options">OPTIONS</h2>
Junio C Hamanob33fb4f2006-04-18 21:30:51785<div class="sectionbody">
Junio C Hamanoed69a742010-12-01 03:09:23786<div class="dlist"><dl>
787<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11788-b
Junio C Hamanob33fb4f2006-04-18 21:30:51789</dt>
790<dd>
791<p>
Junio C Hamano0e3cb532007-04-17 08:28:11792 Show blank SHA-1 for boundary commits. This can also
Junio C Hamano9d971152012-12-19 00:43:11793 be controlled via the <code>blame.blankboundary</code> config option.
Junio C Hamano0e3cb532007-04-17 08:28:11794</p>
795</dd>
Junio C Hamanoed69a742010-12-01 03:09:23796<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11797--root
798</dt>
799<dd>
800<p>
801 Do not treat root commits as boundaries. This can also be
Junio C Hamano9d971152012-12-19 00:43:11802 controlled via the <code>blame.showroot</code> config option.
Junio C Hamano0e3cb532007-04-17 08:28:11803</p>
804</dd>
Junio C Hamanoed69a742010-12-01 03:09:23805<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11806--show-stats
807</dt>
808<dd>
809<p>
810 Include additional statistics at the end of blame output.
Junio C Hamanob33fb4f2006-04-18 21:30:51811</p>
812</dd>
Junio C Hamanoed69a742010-12-01 03:09:23813<dt class="hdlist1">
Junio C Hamano9882a522007-04-27 08:22:22814-L &lt;start&gt;,&lt;end&gt;
Junio C Hamanoe1aa7472006-11-09 07:37:50815</dt>
816<dd>
817<p>
Junio C Hamano9882a522007-04-27 08:22:22818 Annotate only the given line range. &lt;start&gt; and &lt;end&gt; can take
819 one of these forms:
Junio C Hamanoe1aa7472006-11-09 07:37:50820</p>
Junio C Hamanoed69a742010-12-01 03:09:23821<div class="ulist"><ul>
Junio C Hamano9882a522007-04-27 08:22:22822<li>
823<p>
824number
825</p>
Junio C Hamanoed69a742010-12-01 03:09:23826<div class="paragraph"><p>If &lt;start&gt; or &lt;end&gt; is a number, it specifies an
Junio C Hamanoba4b9282008-07-06 05:20:31827absolute line number (lines count from 1).</p></div>
Junio C Hamano9882a522007-04-27 08:22:22828</li>
829<li>
830<p>
831/regex/
832</p>
Junio C Hamanoed69a742010-12-01 03:09:23833<div class="paragraph"><p>This form will use the first line matching the given
Junio C Hamano9882a522007-04-27 08:22:22834POSIX regex. If &lt;end&gt; is a regex, it will search
Junio C Hamanoba4b9282008-07-06 05:20:31835starting at the line given by &lt;start&gt;.</p></div>
Junio C Hamano9882a522007-04-27 08:22:22836</li>
837<li>
838<p>
839+offset or -offset
840</p>
Junio C Hamanoed69a742010-12-01 03:09:23841<div class="paragraph"><p>This is only valid for &lt;end&gt; and will specify a number
Junio C Hamanoba4b9282008-07-06 05:20:31842of lines before or after the line given by &lt;start&gt;.</p></div>
Junio C Hamano9882a522007-04-27 08:22:22843</li>
Junio C Hamanoba4b9282008-07-06 05:20:31844</ul></div>
Junio C Hamanoe1aa7472006-11-09 07:37:50845</dd>
Junio C Hamanoed69a742010-12-01 03:09:23846<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11847-l
Junio C Hamanob33fb4f2006-04-18 21:30:51848</dt>
849<dd>
850<p>
Junio C Hamano3fd90c82006-06-18 00:22:01851 Show long rev (Default: off).
852</p>
853</dd>
Junio C Hamanoed69a742010-12-01 03:09:23854<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11855-t
Junio C Hamano3fd90c82006-06-18 00:22:01856</dt>
857<dd>
858<p>
859 Show raw timestamp (Default: off).
Junio C Hamanob33fb4f2006-04-18 21:30:51860</p>
861</dd>
Junio C Hamanoed69a742010-12-01 03:09:23862<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11863-S &lt;revs-file&gt;
Junio C Hamanob33fb4f2006-04-18 21:30:51864</dt>
865<dd>
866<p>
Junio C Hamanoa28a9202012-06-21 07:08:23867 Use revisions from revs-file instead of calling <a href="git-rev-list.html">git-rev-list(1)</a>.
Junio C Hamanob33fb4f2006-04-18 21:30:51868</p>
869</dd>
Junio C Hamanoed69a742010-12-01 03:09:23870<dt class="hdlist1">
Junio C Hamanoa6455f62009-02-20 08:33:08871--reverse
872</dt>
873<dd>
874<p>
875 Walk history forward instead of backward. Instead of showing
876 the revision in which a line appeared, this shows the last
877 revision in which a line has existed. This requires a range of
878 revision like START..END where the path to blame exists in
879 START.
880</p>
881</dd>
Junio C Hamanoed69a742010-12-01 03:09:23882<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47883-p
884</dt>
Junio C Hamanoed69a742010-12-01 03:09:23885<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47886--porcelain
Junio C Hamanoff4b4312006-10-25 22:55:31887</dt>
888<dd>
889<p>
890 Show in a format designed for machine consumption.
891</p>
892</dd>
Junio C Hamanoed69a742010-12-01 03:09:23893<dt class="hdlist1">
Junio C Hamano2a294cd2011-05-23 23:06:31894--line-porcelain
895</dt>
896<dd>
897<p>
898 Show the porcelain format, but output commit information for
899 each line, not just the first time a commit is referenced.
900 Implies --porcelain.
901</p>
902</dd>
903<dt class="hdlist1">
Junio C Hamano5a702332007-01-28 20:55:22904--incremental
905</dt>
906<dd>
907<p>
908 Show the result incrementally in a format designed for
909 machine consumption.
910</p>
911</dd>
Junio C Hamanoed69a742010-12-01 03:09:23912<dt class="hdlist1">
Junio C Hamanoaa17c7c2008-11-03 04:36:58913--encoding=&lt;encoding&gt;
914</dt>
915<dd>
916<p>
917 Specifies the encoding used to output author names
Junio C Hamano9d971152012-12-19 00:43:11918 and commit summaries. Setting it to <code>none</code> makes blame
Junio C Hamanoaa17c7c2008-11-03 04:36:58919 output unconverted data. For more information see the
Junio C Hamanoa28a9202012-06-21 07:08:23920 discussion about encoding in the <a href="git-log.html">git-log(1)</a>
Junio C Hamanoaa17c7c2008-11-03 04:36:58921 manual page.
922</p>
923</dd>
Junio C Hamanoed69a742010-12-01 03:09:23924<dt class="hdlist1">
Junio C Hamano42f855f2007-02-06 00:09:38925--contents &lt;file&gt;
926</dt>
927<dd>
928<p>
929 When &lt;rev&gt; is not specified, the command annotates the
930 changes starting backwards from the working tree copy.
931 This flag makes the command pretend as if the working
Junio C Hamano49dccaf2008-02-10 10:48:01932 tree copy has the contents of the named file (specify
Junio C Hamano9d971152012-12-19 00:43:11933 <code>-</code> to make the command read from the standard input).
Junio C Hamano42f855f2007-02-06 00:09:38934</p>
935</dd>
Junio C Hamanoed69a742010-12-01 03:09:23936<dt class="hdlist1">
Junio C Hamanoea6a7642009-03-11 23:56:19937--date &lt;format&gt;
938</dt>
939<dd>
940<p>
941 The value is one of the following alternatives:
942 {relative,local,default,iso,rfc,short}. If --date is not
943 provided, the value of the blame.date config variable is
944 used. If the blame.date config variable is also not set, the
945 iso format is used. For more information, See the discussion
Junio C Hamanoa28a9202012-06-21 07:08:23946 of the --date option at <a href="git-log.html">git-log(1)</a>.
Junio C Hamanoea6a7642009-03-11 23:56:19947</p>
948</dd>
Junio C Hamanoed69a742010-12-01 03:09:23949<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11950-M|&lt;num&gt;|
Junio C Hamanoe1aa7472006-11-09 07:37:50951</dt>
952<dd>
953<p>
Junio C Hamano0e8c0b02010-04-12 15:45:55954 Detect moved or copied lines within a file. When a commit
955 moves or copies a block of lines (e.g. the original file
956 has A and then B, and the commit changes it to B and then
957 A), the traditional <em>blame</em> algorithm notices only half of
958 the movement and typically blames the lines that were moved
959 up (i.e. B) to the parent and assigns blame to the lines that
960 were moved down (i.e. A) to the child commit. With this
961 option, both groups of lines are blamed on the parent by
962 running extra passes of inspection.
Junio C Hamanoe1aa7472006-11-09 07:37:50963</p>
Junio C Hamanoed69a742010-12-01 03:09:23964<div class="paragraph"><p>&lt;num&gt; is optional but it is the lower bound on the number of
Junio C Hamano076ffcc2013-02-06 05:13:21965alphanumeric characters that Git must detect as moving/copying
Junio C Hamano0e3cb532007-04-17 08:28:11966within a file for it to associate those lines with the parent
Junio C Hamanocc7636a2010-05-21 14:57:53967commit. The default value is 20.</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:50968</dd>
Junio C Hamanoed69a742010-12-01 03:09:23969<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11970-C|&lt;num&gt;|
Junio C Hamanoe1aa7472006-11-09 07:37:50971</dt>
972<dd>
973<p>
Junio C Hamano9d971152012-12-19 00:43:11974 In addition to <code>-M</code>, detect lines moved or copied from other
Junio C Hamanoe1aa7472006-11-09 07:37:50975 files that were modified in the same commit. This is
976 useful when you reorganize your program and move code
977 around across files. When this option is given twice,
Junio C Hamano5ca1dd12010-01-17 02:44:04978 the command additionally looks for copies from other
979 files in the commit that creates the file. When this
980 option is given three times, the command additionally
981 looks for copies from other files in any commit.
Junio C Hamanoe1aa7472006-11-09 07:37:50982</p>
Junio C Hamanoed69a742010-12-01 03:09:23983<div class="paragraph"><p>&lt;num&gt; is optional but it is the lower bound on the number of
Junio C Hamano076ffcc2013-02-06 05:13:21984alphanumeric characters that Git must detect as moving/copying
Junio C Hamano0e3cb532007-04-17 08:28:11985between files for it to associate those lines with the parent
Junio C Hamanocc7636a2010-05-21 14:57:53986commit. And the default value is 40. If there are more than one
Junio C Hamano9d971152012-12-19 00:43:11987<code>-C</code> options given, the &lt;num&gt; argument of the last <code>-C</code> will
Junio C Hamanocc7636a2010-05-21 14:57:53988take effect.</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:50989</dd>
Junio C Hamanoed69a742010-12-01 03:09:23990<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47991-h
992</dt>
Junio C Hamanob33fb4f2006-04-18 21:30:51993<dd>
994<p>
995 Show help message.
996</p>
997</dd>
Junio C Hamanoed69a742010-12-01 03:09:23998<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11999-c
1000</dt>
1001<dd>
1002<p>
Junio C Hamanoa28a9202012-06-21 07:08:231003 Use the same output mode as <a href="git-annotate.html">git-annotate(1)</a> (Default: off).
Junio C Hamano0e3cb532007-04-17 08:28:111004</p>
1005</dd>
Junio C Hamanoed69a742010-12-01 03:09:231006<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:111007--score-debug
1008</dt>
1009<dd>
1010<p>
1011 Include debugging information related to the movement of
Junio C Hamano9d971152012-12-19 00:43:111012 lines between files (see <code>-C</code>) and lines moved within a
1013 file (see <code>-M</code>). The first number listed is the score.
Junio C Hamano0e3cb532007-04-17 08:28:111014 This is the number of alphanumeric characters detected
Junio C Hamanofd83b8e2009-03-22 08:21:411015 as having been moved between or within files. This must be above
Junio C Hamano1aa40d22010-01-21 17:46:431016 a certain threshold for <em>git blame</em> to consider those lines
Junio C Hamano0e3cb532007-04-17 08:28:111017 of code to have been moved.
1018</p>
1019</dd>
Junio C Hamanoed69a742010-12-01 03:09:231020<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471021-f
1022</dt>
Junio C Hamanoed69a742010-12-01 03:09:231023<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471024--show-name
Junio C Hamano0e3cb532007-04-17 08:28:111025</dt>
1026<dd>
1027<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411028 Show the filename in the original commit. By default
1029 the filename is shown if there is any line that came from a
1030 file with a different name, due to rename detection.
Junio C Hamano0e3cb532007-04-17 08:28:111031</p>
1032</dd>
Junio C Hamanoed69a742010-12-01 03:09:231033<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471034-n
1035</dt>
Junio C Hamanoed69a742010-12-01 03:09:231036<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471037--show-number
Junio C Hamano0e3cb532007-04-17 08:28:111038</dt>
1039<dd>
1040<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411041 Show the line number in the original commit (Default: off).
Junio C Hamano0e3cb532007-04-17 08:28:111042</p>
1043</dd>
Junio C Hamanoed69a742010-12-01 03:09:231044<dt class="hdlist1">
Junio C Hamano469d60e2007-04-29 18:30:341045-s
1046</dt>
1047<dd>
1048<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411049 Suppress the author name and timestamp from the output.
Junio C Hamano469d60e2007-04-29 18:30:341050</p>
1051</dd>
Junio C Hamanoed69a742010-12-01 03:09:231052<dt class="hdlist1">
1053-e
1054</dt>
1055<dt class="hdlist1">
1056--show-email
1057</dt>
1058<dd>
1059<p>
1060 Show the author email instead of author name (Default: off).
1061</p>
1062</dd>
1063<dt class="hdlist1">
Junio C Hamano9e52d4e2007-06-13 08:29:331064-w
1065</dt>
1066<dd>
1067<p>
Junio C Hamanoed69a742010-12-01 03:09:231068 Ignore whitespace when comparing the parent&#8217;s version and
1069 the child&#8217;s to find where the lines came from.
Junio C Hamano9e52d4e2007-06-13 08:29:331070</p>
1071</dd>
Junio C Hamano209ebe82011-04-27 21:09:591072<dt class="hdlist1">
1073--abbrev=&lt;n&gt;
1074</dt>
1075<dd>
1076<p>
1077 Instead of using the default 7+1 hexadecimal digits as the
1078 abbreviated object name, use &lt;n&gt;+1 digits. Note that 1 column
1079 is used for a caret to mark the boundary commit.
1080</p>
1081</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311082</dl></div>
Junio C Hamanob33fb4f2006-04-18 21:30:511083</div>
Junio C Hamano9d971152012-12-19 00:43:111084</div>
1085<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311086<h2 id="_the_porcelain_format">THE PORCELAIN FORMAT</h2>
Junio C Hamanoff4b4312006-10-25 22:55:311087<div class="sectionbody">
Junio C Hamanoed69a742010-12-01 03:09:231088<div class="paragraph"><p>In this format, each line is output after a header; the
Junio C Hamanoba4b9282008-07-06 05:20:311089header at the minimum has the first line which has:</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231090<div class="ulist"><ul>
Junio C Hamanoff4b4312006-10-25 22:55:311091<li>
1092<p>
109340-byte SHA-1 of the commit the line is attributed to;
1094</p>
1095</li>
1096<li>
1097<p>
1098the line number of the line in the original file;
1099</p>
1100</li>
1101<li>
1102<p>
1103the line number of the line in the final file;
1104</p>
1105</li>
1106<li>
1107<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411108on a line that starts a group of lines from a different
Junio C Hamanoff4b4312006-10-25 22:55:311109 commit than the previous one, the number of lines in this
1110 group. On subsequent lines this field is absent.
1111</p>
1112</li>
Junio C Hamanoba4b9282008-07-06 05:20:311113</ul></div>
Junio C Hamanoed69a742010-12-01 03:09:231114<div class="paragraph"><p>This header line is followed by the following information
Junio C Hamanoba4b9282008-07-06 05:20:311115at least once for each commit:</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231116<div class="ulist"><ul>
Junio C Hamanoff4b4312006-10-25 22:55:311117<li>
1118<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411119the author name ("author"), email ("author-mail"), time
Junio C Hamanoff4b4312006-10-25 22:55:311120 ("author-time"), and timezone ("author-tz"); similarly
1121 for committer.
1122</p>
1123</li>
1124<li>
1125<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411126the filename in the commit that the line is attributed to.
Junio C Hamanoff4b4312006-10-25 22:55:311127</p>
1128</li>
1129<li>
1130<p>
1131the first line of the commit log message ("summary").
1132</p>
1133</li>
Junio C Hamanoba4b9282008-07-06 05:20:311134</ul></div>
Junio C Hamanoed69a742010-12-01 03:09:231135<div class="paragraph"><p>The contents of the actual line is output after the above
Junio C Hamanoff4b4312006-10-25 22:55:311136header, prefixed by a TAB. This is to allow adding more
Junio C Hamanoba4b9282008-07-06 05:20:311137header elements later.</p></div>
Junio C Hamano2a294cd2011-05-23 23:06:311138<div class="paragraph"><p>The porcelain format generally suppresses commit information that has
1139already been seen. For example, two lines that are blamed to the same
1140commit will both be shown, but the details for that commit will be shown
1141only once. This is more efficient, but may require more state be kept by
Junio C Hamano9d971152012-12-19 00:43:111142the reader. The <code>--line-porcelain</code> option can be used to output full
Junio C Hamano2a294cd2011-05-23 23:06:311143commit information for each line, allowing simpler (but less efficient)
1144usage like:</p></div>
1145<div class="literalblock">
1146<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111147<pre><code># count the number of lines attributed to each author
Junio C Hamano2a294cd2011-05-23 23:06:311148git blame --line-porcelain file |
1149sed -n 's/^author //p' |
Junio C Hamano9d971152012-12-19 00:43:111150sort | uniq -c | sort -rn</code></pre>
Junio C Hamano2a294cd2011-05-23 23:06:311151</div></div>
Junio C Hamanoff4b4312006-10-25 22:55:311152</div>
Junio C Hamano9d971152012-12-19 00:43:111153</div>
1154<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311155<h2 id="_specifying_ranges">SPECIFYING RANGES</h2>
Junio C Hamanoe1aa7472006-11-09 07:37:501156<div class="sectionbody">
Junio C Hamanoed69a742010-12-01 03:09:231157<div class="paragraph"><p>Unlike <em>git blame</em> and <em>git annotate</em> in older versions of git, the extent
Junio C Hamanofd83b8e2009-03-22 08:21:411158of the annotation can be limited to both line ranges and revision
Junio C Hamanoe1aa7472006-11-09 07:37:501159ranges. When you are interested in finding the origin for
Junio C Hamano9d971152012-12-19 00:43:111160lines 40-60 for file <code>foo</code>, you can use the <code>-L</code> option like so
Junio C Hamanoed69a742010-12-01 03:09:231161(they mean the same thing&#8201;&#8212;&#8201;both ask for 21 lines starting at
Junio C Hamanoba4b9282008-07-06 05:20:311162line 40):</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:501163<div class="literalblock">
1164<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111165<pre><code>git blame -L 40,60 foo
1166git blame -L 40,+21 foo</code></pre>
Junio C Hamanoe1aa7472006-11-09 07:37:501167</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231168<div class="paragraph"><p>Also you can use a regular expression to specify the line range:</p></div>
Junio C Hamano4a345d22006-11-09 18:45:321169<div class="literalblock">
1170<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111171<pre><code>git blame -L '/^sub hello {/,/^}$/' foo</code></pre>
Junio C Hamano4a345d22006-11-09 18:45:321172</div></div>
Junio C Hamano9d971152012-12-19 00:43:111173<div class="paragraph"><p>which limits the annotation to the body of the <code>hello</code> subroutine.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231174<div class="paragraph"><p>When you are not interested in changes older than version
Junio C Hamanoe1aa7472006-11-09 07:37:501175v2.6.18, or changes older than 3 weeks, you can use revision
Junio C Hamano1aa40d22010-01-21 17:46:431176range specifiers similar to <em>git rev-list</em>:</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:501177<div class="literalblock">
1178<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111179<pre><code>git blame v2.6.18.. -- foo
1180git blame --since=3.weeks -- foo</code></pre>
Junio C Hamanoe1aa7472006-11-09 07:37:501181</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231182<div class="paragraph"><p>When revision range specifiers are used to limit the annotation,
Junio C Hamanoe1aa7472006-11-09 07:37:501183lines that have not changed since the range boundary (either the
1184commit v2.6.18 or the most recent commit that is more than 3
1185weeks old in the above example) are blamed for that range
Junio C Hamanoba4b9282008-07-06 05:20:311186boundary commit.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231187<div class="paragraph"><p>A particularly useful way is to see if an added file has lines
Junio C Hamanoe1aa7472006-11-09 07:37:501188created by copy-and-paste from existing files. Sometimes this
1189indicates that the developer was being sloppy and did not
1190refactor the code properly. You can first find the commit that
Junio C Hamanoba4b9282008-07-06 05:20:311191introduced the file with:</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:501192<div class="literalblock">
1193<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111194<pre><code>git log --diff-filter=A --pretty=short -- foo</code></pre>
Junio C Hamanoe1aa7472006-11-09 07:37:501195</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231196<div class="paragraph"><p>and then annotate the change between the commit and its
Junio C Hamano9d971152012-12-19 00:43:111197parents, using <code>commit^!</code> notation:</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:501198<div class="literalblock">
1199<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111200<pre><code>git blame -C -C -f $commit^! -- foo</code></pre>
Junio C Hamanoe1aa7472006-11-09 07:37:501201</div></div>
1202</div>
Junio C Hamano9d971152012-12-19 00:43:111203</div>
1204<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311205<h2 id="_incremental_output">INCREMENTAL OUTPUT</h2>
Junio C Hamano5a702332007-01-28 20:55:221206<div class="sectionbody">
Junio C Hamano9d971152012-12-19 00:43:111207<div class="paragraph"><p>When called with <code>--incremental</code> option, the command outputs the
Junio C Hamano5a702332007-01-28 20:55:221208result as it is built. The output generally will talk about
1209lines touched by more recent commits first (i.e. the lines will
1210be annotated out of order) and is meant to be used by
Junio C Hamanoba4b9282008-07-06 05:20:311211interactive viewers.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231212<div class="paragraph"><p>The output format is similar to the Porcelain format, but it
Junio C Hamano5a702332007-01-28 20:55:221213does not contain the actual lines from the file that is being
Junio C Hamanoba4b9282008-07-06 05:20:311214annotated.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231215<div class="olist arabic"><ol class="arabic">
Junio C Hamano5a702332007-01-28 20:55:221216<li>
1217<p>
1218Each blame entry always starts with a line of:
1219</p>
1220<div class="literalblock">
1221<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111222<pre><code>&lt;40-byte hex sha1&gt; &lt;sourceline&gt; &lt;resultline&gt; &lt;num_lines&gt;</code></pre>
Junio C Hamano5a702332007-01-28 20:55:221223</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231224<div class="paragraph"><p>Line numbers count from 1.</p></div>
Junio C Hamano5a702332007-01-28 20:55:221225</li>
1226<li>
1227<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411228The first time that a commit shows up in the stream, it has various
Junio C Hamano5a702332007-01-28 20:55:221229 other information about it printed out with a one-word tag at the
Junio C Hamanofd83b8e2009-03-22 08:21:411230 beginning of each line describing the extra commit information (author,
1231 email, committer, dates, summary, etc.).
Junio C Hamano5a702332007-01-28 20:55:221232</p>
1233</li>
1234<li>
1235<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411236Unlike the Porcelain format, the filename information is always
Junio C Hamano5a702332007-01-28 20:55:221237 given and terminates the entry:
1238</p>
1239<div class="literalblock">
1240<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111241<pre><code>"filename" &lt;whitespace-quoted-filename-goes-here&gt;</code></pre>
Junio C Hamano5a702332007-01-28 20:55:221242</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231243<div class="paragraph"><p>and thus it is really quite easy to parse for some line- and word-oriented
Junio C Hamanoba4b9282008-07-06 05:20:311244parser (which should be quite natural for most scripting languages).</p></div>
Junio C Hamano5a702332007-01-28 20:55:221245<div class="admonitionblock">
1246<table><tr>
1247<td class="icon">
1248<div class="title">Note</div>
1249</td>
1250<td class="content">For people who do parsing: to make it more robust, just ignore any
Junio C Hamanofd83b8e2009-03-22 08:21:411251lines between the first and last one ("&lt;sha1&gt;" and "filename" lines)
1252where you do not recognize the tag words (or care about that particular
Junio C Hamano5a702332007-01-28 20:55:221253one) at the beginning of the "extended information" lines. That way, if
1254there is ever added information (like the commit encoding or extended
Junio C Hamanofd83b8e2009-03-22 08:21:411255commit commentary), a blame viewer will not care.</td>
Junio C Hamano5a702332007-01-28 20:55:221256</tr></table>
1257</div>
1258</li>
Junio C Hamanoba4b9282008-07-06 05:20:311259</ol></div>
Junio C Hamano5a702332007-01-28 20:55:221260</div>
Junio C Hamano9d971152012-12-19 00:43:111261</div>
1262<div class="sect1">
Junio C Hamano8bc410e2009-02-15 10:38:191263<h2 id="_mapping_authors">MAPPING AUTHORS</h2>
1264<div class="sectionbody">
Junio C Hamano9d971152012-12-19 00:43:111265<div class="paragraph"><p>If the file <code>.mailmap</code> exists at the toplevel of the repository, or at
Junio C Hamanoabad6da2013-01-06 09:06:321266the location pointed to by the mailmap.file or mailmap.blob
1267configuration options, it
Junio C Hamano8bc410e2009-02-15 10:38:191268is used to map author and committer names and email addresses to
1269canonical real names and email addresses.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231270<div class="paragraph"><p>In the simple form, each line in the file consists of the canonical
Junio C Hamano8bc410e2009-02-15 10:38:191271real name of an author, whitespace, and an email address used in the
Junio C Hamanofd83b8e2009-03-22 08:21:411272commit (enclosed by <em>&lt;</em> and <em>&gt;</em>) to map to the name. For example:</p></div>
Junio C Hamano9d971152012-12-19 00:43:111273<div class="openblock">
1274<div class="content">
Junio C Hamano8bc410e2009-02-15 10:38:191275<div class="literalblock">
1276<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111277<pre><code>Proper Name &lt;commit@email.xx&gt;</code></pre>
1278</div></div>
Junio C Hamano8bc410e2009-02-15 10:38:191279</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231280<div class="paragraph"><p>The more complex forms are:</p></div>
Junio C Hamano9d971152012-12-19 00:43:111281<div class="openblock">
1282<div class="content">
Junio C Hamano8bc410e2009-02-15 10:38:191283<div class="literalblock">
1284<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111285<pre><code>&lt;proper@email.xx&gt; &lt;commit@email.xx&gt;</code></pre>
1286</div></div>
Junio C Hamano8bc410e2009-02-15 10:38:191287</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231288<div class="paragraph"><p>which allows mailmap to replace only the email part of a commit, and:</p></div>
Junio C Hamano9d971152012-12-19 00:43:111289<div class="openblock">
1290<div class="content">
Junio C Hamano8bc410e2009-02-15 10:38:191291<div class="literalblock">
1292<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111293<pre><code>Proper Name &lt;proper@email.xx&gt; &lt;commit@email.xx&gt;</code></pre>
1294</div></div>
Junio C Hamano8bc410e2009-02-15 10:38:191295</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231296<div class="paragraph"><p>which allows mailmap to replace both the name and the email of a
Junio C Hamanofd83b8e2009-03-22 08:21:411297commit matching the specified commit email address, and:</p></div>
Junio C Hamano9d971152012-12-19 00:43:111298<div class="openblock">
1299<div class="content">
Junio C Hamano8bc410e2009-02-15 10:38:191300<div class="literalblock">
1301<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111302<pre><code>Proper Name &lt;proper@email.xx&gt; Commit Name &lt;commit@email.xx&gt;</code></pre>
1303</div></div>
Junio C Hamano8bc410e2009-02-15 10:38:191304</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231305<div class="paragraph"><p>which allows mailmap to replace both the name and the email of a
Junio C Hamano8bc410e2009-02-15 10:38:191306commit matching both the specified commit name and email address.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231307<div class="paragraph"><p>Example 1: Your history contains commits by two authors, Jane
Junio C Hamano8bc410e2009-02-15 10:38:191308and Joe, whose names appear in the repository under several forms:</p></div>
1309<div class="listingblock">
1310<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111311<pre><code>Joe Developer &lt;joe@example.com&gt;
Junio C Hamano8bc410e2009-02-15 10:38:191312Joe R. Developer &lt;joe@example.com&gt;
1313Jane Doe &lt;jane@example.com&gt;
1314Jane Doe &lt;jane@laptop.(none)&gt;
Junio C Hamano9d971152012-12-19 00:43:111315Jane D. &lt;jane@desktop.(none)&gt;</code></pre>
Junio C Hamano8bc410e2009-02-15 10:38:191316</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231317<div class="paragraph"><p>Now suppose that Joe wants his middle name initial used, and Jane
Junio C Hamano9d971152012-12-19 00:43:111318prefers her family name fully spelled out. A proper <code>.mailmap</code> file
Junio C Hamano8bc410e2009-02-15 10:38:191319would look like:</p></div>
1320<div class="listingblock">
1321<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111322<pre><code>Jane Doe &lt;jane@desktop.(none)&gt;
1323Joe R. Developer &lt;joe@example.com&gt;</code></pre>
Junio C Hamano8bc410e2009-02-15 10:38:191324</div></div>
Junio C Hamanodb81b992012-12-21 23:49:121325<div class="paragraph"><p>Note how there is no need for an entry for <code>&lt;jane@laptop.(none)&gt;</code>, because the
Junio C Hamanofd83b8e2009-03-22 08:21:411326real name of that author is already correct.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231327<div class="paragraph"><p>Example 2: Your repository contains commits from the following
Junio C Hamano8bc410e2009-02-15 10:38:191328authors:</p></div>
1329<div class="listingblock">
1330<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111331<pre><code>nick1 &lt;bugs@company.xx&gt;
Junio C Hamano8bc410e2009-02-15 10:38:191332nick2 &lt;bugs@company.xx&gt;
1333nick2 &lt;nick2@company.xx&gt;
1334santa &lt;me@company.xx&gt;
1335claus &lt;me@company.xx&gt;
Junio C Hamano9d971152012-12-19 00:43:111336CTO &lt;cto@coompany.xx&gt;</code></pre>
Junio C Hamano8bc410e2009-02-15 10:38:191337</div></div>
Junio C Hamano9d971152012-12-19 00:43:111338<div class="paragraph"><p>Then you might want a <code>.mailmap</code> file that looks like:</p></div>
Junio C Hamano8bc410e2009-02-15 10:38:191339<div class="listingblock">
1340<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111341<pre><code>&lt;cto@company.xx&gt; &lt;cto@coompany.xx&gt;
Junio C Hamano8bc410e2009-02-15 10:38:191342Some Dude &lt;some@dude.xx&gt; nick1 &lt;bugs@company.xx&gt;
1343Other Author &lt;other@author.xx&gt; nick2 &lt;bugs@company.xx&gt;
1344Other Author &lt;other@author.xx&gt; &lt;nick2@company.xx&gt;
Junio C Hamano9d971152012-12-19 00:43:111345Santa Claus &lt;santa.claus@northpole.xx&gt; &lt;me@company.xx&gt;</code></pre>
Junio C Hamano8bc410e2009-02-15 10:38:191346</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231347<div class="paragraph"><p>Use hash <em>#</em> for comments that are either on their own line, or after
Junio C Hamano8bc410e2009-02-15 10:38:191348the email address.</p></div>
1349</div>
Junio C Hamano9d971152012-12-19 00:43:111350</div>
1351<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311352<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamanob33fb4f2006-04-18 21:30:511353<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231354<div class="paragraph"><p><a href="git-annotate.html">git-annotate(1)</a></p></div>
Junio C Hamanob33fb4f2006-04-18 21:30:511355</div>
Junio C Hamano9d971152012-12-19 00:43:111356</div>
1357<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311358<h2 id="_git">GIT</h2>
Junio C Hamanob33fb4f2006-04-18 21:30:511359<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231360<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamanob33fb4f2006-04-18 21:30:511361</div>
Junio C Hamano7bd050f2011-09-22 06:32:221362</div>
Junio C Hamano9d971152012-12-19 00:43:111363</div>
Junio C Hamano7bd050f2011-09-22 06:32:221364<div id="footnotes"><hr /></div>
Junio C Hamanob33fb4f2006-04-18 21:30:511365<div id="footer">
1366<div id="footer-text">
Junio C Hamano076ffcc2013-02-06 05:13:211367Last updated 2013-02-05 21:07:26 PST
Junio C Hamanob33fb4f2006-04-18 21:30:511368</div>
1369</div>
1370</body>
1371</html>