blob: 2ac34f0df5d4ed7fc9548fc4048b47f8534fb3b1 [file] [log] [blame]
Junio C Hamano944ce252018-05-30 22:25:261<?xml version="1.0" encoding="UTF-8"?>
Junio C Hamanob33fb4f2006-04-18 21:30:512<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5<head>
Junio C Hamano9d971152012-12-19 00:43:116<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
Junio C Hamano4bea0282022-04-04 18:21:497<meta name="generator" content="AsciiDoc 10.1.2" />
Junio C Hamanoed69a742010-12-01 03:09:238<title>git-blame(1)</title>
Junio C Hamanob33fb4f2006-04-18 21:30:519<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:1110/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
11
12/* Default font. */
13body {
14 font-family: Georgia,serif;
15}
16
17/* Title font. */
18h1, h2, h3, h4, h5, h6,
19div.title, caption.title,
20thead, p.table.header,
21#toctitle,
22#author, #revnumber, #revdate, #revremark,
23#footer {
24 font-family: Arial,Helvetica,sans-serif;
Junio C Hamanob33fb4f2006-04-18 21:30:5125}
26
27body {
28 margin: 1em 5% 1em 5%;
29}
30
Junio C Hamanoba4b9282008-07-06 05:20:3131a {
32 color: blue;
33 text-decoration: underline;
34}
35a:visited {
36 color: fuchsia;
37}
Junio C Hamanob33fb4f2006-04-18 21:30:5138
39em {
40 font-style: italic;
Junio C Hamanoed69a742010-12-01 03:09:2341 color: navy;
Junio C Hamanob33fb4f2006-04-18 21:30:5142}
43
44strong {
45 font-weight: bold;
Junio C Hamanoed69a742010-12-01 03:09:2346 color: #083194;
Junio C Hamanob33fb4f2006-04-18 21:30:5147}
48
Junio C Hamanob33fb4f2006-04-18 21:30:5149h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
Junio C Hamanob33fb4f2006-04-18 21:30:5151 margin-top: 1.2em;
52 margin-bottom: 0.5em;
53 line-height: 1.3;
54}
55
Junio C Hamanoba4b9282008-07-06 05:20:3156h1, h2, h3 {
Junio C Hamanob33fb4f2006-04-18 21:30:5157 border-bottom: 2px solid silver;
58}
59h2 {
Junio C Hamanob33fb4f2006-04-18 21:30:5160 padding-top: 0.5em;
61}
Junio C Hamanoba4b9282008-07-06 05:20:3162h3 {
63 float: left;
64}
65h3 + * {
66 clear: left;
67}
Junio C Hamano9d971152012-12-19 00:43:1168h5 {
69 font-size: 1.0em;
70}
Junio C Hamanob33fb4f2006-04-18 21:30:5171
72div.sectionbody {
Junio C Hamanob33fb4f2006-04-18 21:30:5173 margin-left: 0;
74}
75
76hr {
77 border: 1px solid silver;
78}
79
80p {
81 margin-top: 0.5em;
82 margin-bottom: 0.5em;
83}
84
Junio C Hamanoed69a742010-12-01 03:09:2385ul, ol, li > p {
86 margin-top: 0;
87}
Junio C Hamano9d971152012-12-19 00:43:1188ul > li { color: #aaa; }
89ul > li > * { color: black; }
Junio C Hamanoed69a742010-12-01 03:09:2390
Junio C Hamanoc14e6ad2014-10-31 20:25:5391.monospaced, code, pre {
92 font-family: "Courier New", Courier, monospace;
93 font-size: inherit;
94 color: navy;
Junio C Hamanob33fb4f2006-04-18 21:30:5195 padding: 0;
96 margin: 0;
97}
Junio C Hamanoc14e6ad2014-10-31 20:25:5398pre {
99 white-space: pre-wrap;
100}
Junio C Hamanob33fb4f2006-04-18 21:30:51101
Junio C Hamano9d971152012-12-19 00:43:11102#author {
Junio C Hamanob33fb4f2006-04-18 21:30:51103 color: #527bbd;
Junio C Hamanob33fb4f2006-04-18 21:30:51104 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31105 font-size: 1.1em;
Junio C Hamanob33fb4f2006-04-18 21:30:51106}
Junio C Hamano9d971152012-12-19 00:43:11107#email {
Junio C Hamanob33fb4f2006-04-18 21:30:51108}
Junio C Hamano9d971152012-12-19 00:43:11109#revnumber, #revdate, #revremark {
Junio C Hamanob33fb4f2006-04-18 21:30:51110}
111
Junio C Hamano9d971152012-12-19 00:43:11112#footer {
Junio C Hamanob33fb4f2006-04-18 21:30:51113 font-size: small;
114 border-top: 2px solid silver;
115 padding-top: 0.5em;
116 margin-top: 4.0em;
117}
Junio C Hamano9d971152012-12-19 00:43:11118#footer-text {
Junio C Hamanob33fb4f2006-04-18 21:30:51119 float: left;
120 padding-bottom: 0.5em;
121}
Junio C Hamano9d971152012-12-19 00:43:11122#footer-badges {
Junio C Hamanob33fb4f2006-04-18 21:30:51123 float: right;
124 padding-bottom: 0.5em;
125}
126
Junio C Hamano9d971152012-12-19 00:43:11127#preamble {
Junio C Hamanoed69a742010-12-01 03:09:23128 margin-top: 1.5em;
129 margin-bottom: 1.5em;
130}
Junio C Hamano9d971152012-12-19 00:43:11131div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamanob33fb4f2006-04-18 21:30:51132div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22134 margin-top: 1.0em;
Junio C Hamanob33fb4f2006-04-18 21:30:51135 margin-bottom: 1.5em;
136}
137div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22138 margin-top: 2.0em;
139 margin-bottom: 2.0em;
140 margin-right: 10%;
141 color: #606060;
Junio C Hamanob33fb4f2006-04-18 21:30:51142}
143
144div.content { /* Block element content. */
145 padding: 0;
146}
147
148/* Block element titles. */
149div.title, caption.title {
Junio C Hamanoed69a742010-12-01 03:09:23150 color: #527bbd;
Junio C Hamanob33fb4f2006-04-18 21:30:51151 font-weight: bold;
152 text-align: left;
153 margin-top: 1.0em;
154 margin-bottom: 0.5em;
155}
156div.title + * {
157 margin-top: 0;
158}
159
160td div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content div.title:first-child {
164 margin-top: 0.0em;
165}
166div.content + div.title {
167 margin-top: 0.0em;
168}
169
170div.sidebarblock > div.content {
171 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11172 border: 1px solid #dddddd;
173 border-left: 4px solid #f0f0f0;
Junio C Hamanob33fb4f2006-04-18 21:30:51174 padding: 0.5em;
175}
176
177div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11178 border: 1px solid #dddddd;
179 border-left: 5px solid #f0f0f0;
180 background: #f8f8f8;
Junio C Hamanob33fb4f2006-04-18 21:30:51181 padding: 0.5em;
182}
183
Junio C Hamano7bd050f2011-09-22 06:32:22184div.quoteblock, div.verseblock {
185 padding-left: 1.0em;
186 margin-left: 1.0em;
Junio C Hamanoed69a742010-12-01 03:09:23187 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11188 border-left: 5px solid #f0f0f0;
189 color: #888;
Junio C Hamanob33fb4f2006-04-18 21:30:51190}
Junio C Hamano7bd050f2011-09-22 06:32:22191
Junio C Hamanoed69a742010-12-01 03:09:23192div.quoteblock > div.attribution {
193 padding-top: 0.5em;
Junio C Hamanob33fb4f2006-04-18 21:30:51194 text-align: right;
195}
Junio C Hamanoed69a742010-12-01 03:09:23196
Junio C Hamano9d971152012-12-19 00:43:11197div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
Junio C Hamanoed69a742010-12-01 03:09:23200}
201div.verseblock > div.attribution {
202 padding-top: 0.75em;
203 text-align: left;
204}
205/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31206div.verseblock + div.attribution {
207 text-align: left;
208}
Junio C Hamanob33fb4f2006-04-18 21:30:51209
210div.admonitionblock .icon {
211 vertical-align: top;
212 font-size: 1.1em;
213 font-weight: bold;
214 text-decoration: underline;
215 color: #527bbd;
216 padding-right: 0.5em;
217}
218div.admonitionblock td.content {
219 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22220 border-left: 3px solid #dddddd;
Junio C Hamanob33fb4f2006-04-18 21:30:51221}
222
223div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22224 border-left: 3px solid #dddddd;
225 padding-left: 0.5em;
Junio C Hamanob33fb4f2006-04-18 21:30:51226}
227
Junio C Hamanob33fb4f2006-04-18 21:30:51228div.imageblock div.content { padding-left: 0; }
Junio C Hamanoc14e6ad2014-10-31 20:25:53229span.image img { border-style: none; vertical-align: text-bottom; }
Junio C Hamanoed69a742010-12-01 03:09:23230a.image:visited { color: white; }
Junio C Hamanob33fb4f2006-04-18 21:30:51231
232dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
235}
236dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
Junio C Hamanoed69a742010-12-01 03:09:23239 font-style: normal;
240 color: navy;
Junio C Hamanob33fb4f2006-04-18 21:30:51241}
242dd > *:first-child {
Junio C Hamanoed69a742010-12-01 03:09:23243 margin-top: 0.1em;
Junio C Hamanob33fb4f2006-04-18 21:30:51244}
245
246ul, ol {
247 list-style-position: outside;
248}
Junio C Hamanoed69a742010-12-01 03:09:23249ol.arabic {
250 list-style-type: decimal;
251}
252ol.loweralpha {
Junio C Hamanob33fb4f2006-04-18 21:30:51253 list-style-type: lower-alpha;
254}
Junio C Hamanoed69a742010-12-01 03:09:23255ol.upperalpha {
256 list-style-type: upper-alpha;
257}
258ol.lowerroman {
259 list-style-type: lower-roman;
260}
261ol.upperroman {
262 list-style-type: upper-roman;
263}
264
265div.compact ul, div.compact ol,
266div.compact p, div.compact p,
267div.compact div, div.compact div {
268 margin-top: 0.1em;
269 margin-bottom: 0.1em;
270}
Junio C Hamanob33fb4f2006-04-18 21:30:51271
Junio C Hamanob33fb4f2006-04-18 21:30:51272tfoot {
273 font-weight: bold;
274}
Junio C Hamanoed69a742010-12-01 03:09:23275td > div.verse {
276 white-space: pre;
277}
Junio C Hamanoed69a742010-12-01 03:09:23278
279div.hdlist {
Junio C Hamanob33fb4f2006-04-18 21:30:51280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
282}
Junio C Hamanoed69a742010-12-01 03:09:23283div.hdlist tr {
284 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31285}
Junio C Hamanoed69a742010-12-01 03:09:23286dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
288}
289td.hdlist1 {
Junio C Hamanob33fb4f2006-04-18 21:30:51290 vertical-align: top;
Junio C Hamanoed69a742010-12-01 03:09:23291 font-style: normal;
Junio C Hamanob33fb4f2006-04-18 21:30:51292 padding-right: 0.8em;
Junio C Hamanoed69a742010-12-01 03:09:23293 color: navy;
Junio C Hamanob33fb4f2006-04-18 21:30:51294}
Junio C Hamanoed69a742010-12-01 03:09:23295td.hdlist2 {
Junio C Hamanob33fb4f2006-04-18 21:30:51296 vertical-align: top;
297}
Junio C Hamanoed69a742010-12-01 03:09:23298div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
301}
302
303.comment {
304 background: yellow;
305}
Junio C Hamanob33fb4f2006-04-18 21:30:51306
Junio C Hamano7bd050f2011-09-22 06:32:22307.footnote, .footnoteref {
308 font-size: 0.8em;
309}
310
311span.footnote, span.footnoteref {
312 vertical-align: super;
313}
314
315#footnotes {
316 margin: 20px 0 20px 0;
317 padding: 7px 0 0 0;
318}
319
320#footnotes div.footnote {
321 margin: 0 0 5px 0;
322}
323
324#footnotes hr {
325 border: none;
326 border-top: 1px solid silver;
327 height: 1px;
328 text-align: left;
329 margin-left: 0;
330 width: 20%;
331 min-width: 100px;
332}
333
Junio C Hamano9d971152012-12-19 00:43:11334div.colist td {
335 padding-right: 0.5em;
336 padding-bottom: 0.3em;
337 vertical-align: top;
338}
339div.colist td img {
340 margin-top: 0.3em;
Junio C Hamanob33fb4f2006-04-18 21:30:51341}
Junio C Hamanoba4b9282008-07-06 05:20:31342
Junio C Hamano9d971152012-12-19 00:43:11343@media print {
344 #footer-badges { display: none; }
345}
346
347#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22348 margin-bottom: 2.5em;
349}
350
Junio C Hamano9d971152012-12-19 00:43:11351#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31352 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31353 font-size: 1.1em;
354 font-weight: bold;
355 margin-top: 1.0em;
356 margin-bottom: 0.1em;
357}
358
Junio C Hamanoc14e6ad2014-10-31 20:25:53359div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31360 margin-top: 0;
361 margin-bottom: 0;
362}
363div.toclevel2 {
364 margin-left: 2em;
365 font-size: 0.9em;
366}
367div.toclevel3 {
368 margin-left: 4em;
369 font-size: 0.9em;
370}
371div.toclevel4 {
372 margin-left: 6em;
373 font-size: 0.9em;
374}
Junio C Hamano9d971152012-12-19 00:43:11375
376span.aqua { color: aqua; }
377span.black { color: black; }
378span.blue { color: blue; }
379span.fuchsia { color: fuchsia; }
380span.gray { color: gray; }
381span.green { color: green; }
382span.lime { color: lime; }
383span.maroon { color: maroon; }
384span.navy { color: navy; }
385span.olive { color: olive; }
386span.purple { color: purple; }
387span.red { color: red; }
388span.silver { color: silver; }
389span.teal { color: teal; }
390span.white { color: white; }
391span.yellow { color: yellow; }
392
393span.aqua-background { background: aqua; }
394span.black-background { background: black; }
395span.blue-background { background: blue; }
396span.fuchsia-background { background: fuchsia; }
397span.gray-background { background: gray; }
398span.green-background { background: green; }
399span.lime-background { background: lime; }
400span.maroon-background { background: maroon; }
401span.navy-background { background: navy; }
402span.olive-background { background: olive; }
403span.purple-background { background: purple; }
404span.red-background { background: red; }
405span.silver-background { background: silver; }
406span.teal-background { background: teal; }
407span.white-background { background: white; }
408span.yellow-background { background: yellow; }
409
410span.big { font-size: 2em; }
411span.small { font-size: 0.6em; }
412
413span.underline { text-decoration: underline; }
414span.overline { text-decoration: overline; }
415span.line-through { text-decoration: line-through; }
416
Junio C Hamanoc14e6ad2014-10-31 20:25:53417div.unbreakable { page-break-inside: avoid; }
418
Junio C Hamano9d971152012-12-19 00:43:11419
420/*
421 * xhtml11 specific
422 *
423 * */
424
425div.tableblock {
426 margin-top: 1.0em;
427 margin-bottom: 1.5em;
428}
429div.tableblock > table {
430 border: 3px solid #527bbd;
431}
432thead, p.table.header {
433 font-weight: bold;
434 color: #527bbd;
435}
436p.table {
437 margin-top: 0;
438}
Junio C Hamano725b0da2020-01-22 22:02:40439/* Because the table frame attribute is overridden by CSS in most browsers. */
Junio C Hamano9d971152012-12-19 00:43:11440div.tableblock > table[frame="void"] {
441 border-style: none;
442}
443div.tableblock > table[frame="hsides"] {
444 border-left-style: none;
445 border-right-style: none;
446}
447div.tableblock > table[frame="vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
450}
451
452
453/*
454 * html5 specific
455 *
456 * */
457
458table.tableblock {
459 margin-top: 1.0em;
460 margin-bottom: 1.5em;
461}
462thead, p.tableblock.header {
463 font-weight: bold;
464 color: #527bbd;
465}
466p.tableblock {
467 margin-top: 0;
468}
469table.tableblock {
470 border-width: 3px;
471 border-spacing: 0px;
472 border-style: solid;
473 border-color: #527bbd;
474 border-collapse: collapse;
475}
476th.tableblock, td.tableblock {
477 border-width: 1px;
478 padding: 4px;
479 border-style: solid;
480 border-color: #527bbd;
481}
482
483table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
486}
487table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
490}
491table.tableblock.frame-none {
492 border-style: hidden;
493}
494
495th.tableblock.halign-left, td.tableblock.halign-left {
496 text-align: left;
497}
498th.tableblock.halign-center, td.tableblock.halign-center {
499 text-align: center;
500}
501th.tableblock.halign-right, td.tableblock.halign-right {
502 text-align: right;
503}
504
505th.tableblock.valign-top, td.tableblock.valign-top {
506 vertical-align: top;
507}
508th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
510}
511th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
513}
514
515
516/*
517 * manpage specific
518 *
519 * */
520
521body.manpage h1 {
Junio C Hamanoed69a742010-12-01 03:09:23522 padding-top: 0.5em;
523 padding-bottom: 0.5em;
524 border-top: 2px solid silver;
525 border-bottom: 2px solid silver;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage h2 {
Junio C Hamanoed69a742010-12-01 03:09:23528 border-style: none;
529}
Junio C Hamano9d971152012-12-19 00:43:11530body.manpage div.sectionbody {
531 margin-left: 3em;
Junio C Hamanoed69a742010-12-01 03:09:23532}
533
534@media print {
Junio C Hamano9d971152012-12-19 00:43:11535 body.manpage div#toc { display: none; }
Junio C Hamanoed69a742010-12-01 03:09:23536}
Junio C Hamanoc14e6ad2014-10-31 20:25:53537
538
Junio C Hamanob33fb4f2006-04-18 21:30:51539</style>
Junio C Hamano7bd050f2011-09-22 06:32:22540<script type="text/javascript">
541/*<![CDATA[*/
Junio C Hamano2b153182021-12-15 21:00:31542var asciidoc = { // Namespace.
543
544/////////////////////////////////////////////////////////////////////
545// Table Of Contents generator
546/////////////////////////////////////////////////////////////////////
547
548/* Author: Mihai Bazon, September 2002
549 * http://students.infoiasi.ro/~mishoo
550 *
551 * Table Of Content generator
552 * Version: 0.4
553 *
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
556 */
557
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
560
561// toclevels = 1..4.
562toc: function (toclevels) {
563
564 function getText(el) {
565 var text = "";
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
568 text += i.data;
569 else if (i.firstChild != null)
570 text += getText(i);
571 }
572 return text;
573 }
574
575 function TocEntry(el, text, toclevel) {
576 this.element = el;
577 this.text = text;
578 this.toclevel = toclevel;
579 }
580
581 function tocEntries(el, toclevels) {
582 var result = new Array;
583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
586 // browsers).
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
593 }
594 iterate(i);
595 }
596 }
597 }
598 iterate(el);
599 return result;
600 }
601
602 var toc = document.getElementById("toc");
603 if (!toc) {
604 return;
605 }
606
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
609 var i;
610 for (i = 0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
612 if (entry.nodeName.toLowerCase() == 'div'
613 && entry.getAttribute("class")
614 && entry.getAttribute("class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
616 }
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
619 }
620
621 // Rebuild TOC entries.
622 var entries = tocEntries(document.getElementById("content"), toclevels);
623 for (var i = 0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id == "")
626 entry.element.id = "_toc_" + i;
627 var a = document.createElement("a");
628 a.href = "#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement("div");
631 div.appendChild(a);
632 div.className = "toclevel" + entry.toclevel;
633 toc.appendChild(div);
634 }
635 if (entries.length == 0)
636 toc.parentNode.removeChild(toc);
637},
638
639
640/////////////////////////////////////////////////////////////////////
641// Footnotes generator
642/////////////////////////////////////////////////////////////////////
643
644/* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
646 */
647
648footnotes: function () {
649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
651 var noteholder = document.getElementById("footnotes");
652 if (!noteholder) {
653 return;
654 }
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
659 entriesToRemove.push(entry);
660 }
661 for (i = 0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
663 }
664
665 // Rebuild footnote entries.
666 var cont = document.getElementById("content");
667 var spans = cont.getElementsByTagName("span");
668 var refs = {};
669 var n = 0;
670 for (i=0; i<spans.length; i++) {
671 if (spans[i].className == "footnote") {
672 n++;
673 var note = spans[i].getAttribute("data-note");
674 if (!note) {
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
678 spans[i].innerHTML =
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
681 spans[i].setAttribute("data-note", note);
682 }
683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
687 var id =spans[i].getAttribute("id");
688 if (id != null) refs["#"+id] = n;
689 }
690 }
691 if (n == 0)
692 noteholder.parentNode.removeChild(noteholder);
693 else {
694 // Process footnoterefs.
695 for (i=0; i<spans.length; i++) {
696 if (spans[i].className == "footnoteref") {
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
699 n = refs[href];
700 spans[i].innerHTML =
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
703 }
704 }
705 }
706},
707
708install: function(toclevels) {
709 var timerId;
710
711 function reinstall() {
712 asciidoc.footnotes();
713 if (toclevels) {
714 asciidoc.toc(toclevels);
715 }
716 }
717
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
720 reinstall();
721 }
722
723 timerId = setInterval(reinstall, 500);
724 if (document.addEventListener)
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
726 else
727 window.onload = reinstallAndRemoveTimer;
728}
729
730}
Junio C Hamano9d971152012-12-19 00:43:11731asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22732/*]]>*/
733</script>
Junio C Hamanob33fb4f2006-04-18 21:30:51734</head>
Junio C Hamano9d971152012-12-19 00:43:11735<body class="manpage">
Junio C Hamanob33fb4f2006-04-18 21:30:51736<div id="header">
737<h1>
738git-blame(1) Manual Page
739</h1>
740<h2>NAME</h2>
741<div class="sectionbody">
742<p>git-blame -
Junio C Hamano6b2cee12006-08-26 08:43:31743 Show what revision and author last modified each line of a file
Junio C Hamanob33fb4f2006-04-18 21:30:51744</p>
745</div>
746</div>
Junio C Hamano7bd050f2011-09-22 06:32:22747<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11748<div class="sect1">
Junio C Hamanoed69a742010-12-01 03:09:23749<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamanob33fb4f2006-04-18 21:30:51750<div class="sectionbody">
Junio C Hamanoe1aa7472006-11-09 07:37:50751<div class="verseblock">
Junio C Hamano7e590a12013-06-02 23:46:52752<pre class="content"><em>git blame</em> [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental]
Junio C Hamano8eac2682013-09-09 22:35:20753 [-L &lt;range&gt;] [-S &lt;revs-file&gt;] [-M] [-C] [-C] [-C] [--since=&lt;date&gt;]
Junio C Hamanoa42e0332019-07-19 19:49:37754 [--ignore-rev &lt;rev&gt;] [--ignore-revs-file &lt;file&gt;]
Junio C Hamano59646272021-10-19 00:02:08755 [--color-lines] [--color-by-age] [--progress] [--abbrev=&lt;n&gt;]
756 [&lt;rev&gt; | --contents &lt;file&gt; | --reverse &lt;rev&gt;..&lt;rev&gt;] [--] &lt;file&gt;</pre>
Junio C Hamano9d971152012-12-19 00:43:11757<div class="attribution">
Junio C Hamanoed69a742010-12-01 03:09:23758</div></div>
Junio C Hamanob33fb4f2006-04-18 21:30:51759</div>
Junio C Hamano9d971152012-12-19 00:43:11760</div>
761<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31762<h2 id="_description">DESCRIPTION</h2>
Junio C Hamanob33fb4f2006-04-18 21:30:51763<div class="sectionbody">
Junio C Hamanoed69a742010-12-01 03:09:23764<div class="paragraph"><p>Annotates each line in the given file with information from the revision which
Junio C Hamanoba4b9282008-07-06 05:20:31765last modified the line. Optionally, start annotating from the given revision.</p></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:53766<div class="paragraph"><p>When specified one or more times, <code>-L</code> restricts annotation to the requested
Junio C Hamano8eac2682013-09-09 22:35:20767lines.</p></div>
Junio C Hamano6a8a8482012-10-01 20:59:41768<div class="paragraph"><p>The origin of lines is automatically followed across whole-file
769renames (currently there is no option to turn the rename-following
770off). To follow lines moved from one file to another, or to follow
771lines that were copied and pasted from another file, etc., see the
Junio C Hamanoc14e6ad2014-10-31 20:25:53772<code>-C</code> and <code>-M</code> options.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:23773<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:43774replaced; you need to use a tool such as <em>git diff</em> or the "pickaxe"
Junio C Hamanoba4b9282008-07-06 05:20:31775interface briefly mentioned in the following paragraph.</p></div>
Junio C Hamano076ffcc2013-02-06 05:13:21776<div class="paragraph"><p>Apart from supporting file annotation, Git also supports searching the
Junio C Hamanof9771f62007-01-17 17:42:30777development history for when a code snippet occurred in a change. This makes it
Junio C Hamano6b2cee12006-08-26 08:43:31778possible to track when a code snippet was added to a file, moved or copied
779between files, and eventually deleted or replaced. It works by searching for
Junio C Hamano5b3533d2014-02-27 23:07:15780a text string in the diff. A small example of the pickaxe interface
Junio C Hamanoc14e6ad2014-10-31 20:25:53781that searches for <code>blame_usage</code>:</p></div>
Junio C Hamano6b2cee12006-08-26 08:43:31782<div class="listingblock">
783<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53784<pre><code>$ git log --pretty=oneline -S'blame_usage'
Junio C Hamano6b2cee12006-08-26 08:43:317855040f17eba15504bad66b14a645bddd9b015ebb7 blame -S &lt;ancestry-file&gt;
Junio C Hamanoc14e6ad2014-10-31 20:25:53786ea4c7f9bf69e781dd0cd88d2bccb2bf5cc15c9a7 git-blame: Make the output</code></pre>
Junio C Hamano6b2cee12006-08-26 08:43:31787</div></div>
Junio C Hamanob33fb4f2006-04-18 21:30:51788</div>
Junio C Hamano9d971152012-12-19 00:43:11789</div>
790<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31791<h2 id="_options">OPTIONS</h2>
Junio C Hamanob33fb4f2006-04-18 21:30:51792<div class="sectionbody">
Junio C Hamanoed69a742010-12-01 03:09:23793<div class="dlist"><dl>
794<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11795-b
Junio C Hamanob33fb4f2006-04-18 21:30:51796</dt>
797<dd>
798<p>
Junio C Hamano0e3cb532007-04-17 08:28:11799 Show blank SHA-1 for boundary commits. This can also
Junio C Hamanoa372d5b2021-02-26 01:34:37800 be controlled via the <code>blame.blankBoundary</code> config option.
Junio C Hamano0e3cb532007-04-17 08:28:11801</p>
802</dd>
Junio C Hamanoed69a742010-12-01 03:09:23803<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11804--root
805</dt>
806<dd>
807<p>
808 Do not treat root commits as boundaries. This can also be
Junio C Hamano322c6242015-03-23 21:32:46809 controlled via the <code>blame.showRoot</code> config option.
Junio C Hamano0e3cb532007-04-17 08:28:11810</p>
811</dd>
Junio C Hamanoed69a742010-12-01 03:09:23812<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11813--show-stats
814</dt>
815<dd>
816<p>
817 Include additional statistics at the end of blame output.
Junio C Hamanob33fb4f2006-04-18 21:30:51818</p>
819</dd>
Junio C Hamanoed69a742010-12-01 03:09:23820<dt class="hdlist1">
Junio C Hamano58f587a2013-07-22 19:20:59821-L &lt;start&gt;,&lt;end&gt;
822</dt>
823<dt class="hdlist1">
Junio C Hamanodd5004a2015-05-06 19:33:32824-L :&lt;funcname&gt;
Junio C Hamanoe1aa7472006-11-09 07:37:50825</dt>
826<dd>
827<p>
Junio C Hamanob7676d52020-11-18 22:15:08828 Annotate only the line range given by <em>&lt;start&gt;,&lt;end&gt;</em>,
829 or by the function name regex <em>&lt;funcname&gt;</em>.
830 May be specified multiple times. Overlapping ranges are allowed.
Junio C Hamanoe1aa7472006-11-09 07:37:50831</p>
Junio C Hamanob7676d52020-11-18 22:15:08832<div class="paragraph"><p><em>&lt;start&gt;</em> and <em>&lt;end&gt;</em> are optional. <code>-L &lt;start&gt;</code> or <code>-L &lt;start&gt;,</code> spans from
833<em>&lt;start&gt;</em> to end of file. <code>-L ,&lt;end&gt;</code> spans from start of file to <em>&lt;end&gt;</em>.</p></div>
834<div class="paragraph"><p><em>&lt;start&gt;</em> and <em>&lt;end&gt;</em> can take one of these forms:</p></div>
Junio C Hamanoed69a742010-12-01 03:09:23835<div class="ulist"><ul>
Junio C Hamano9882a522007-04-27 08:22:22836<li>
837<p>
838number
839</p>
Junio C Hamanob7676d52020-11-18 22:15:08840<div class="paragraph"><p>If <em>&lt;start&gt;</em> or <em>&lt;end&gt;</em> is a number, it specifies an
Junio C Hamanoba4b9282008-07-06 05:20:31841absolute line number (lines count from 1).</p></div>
Junio C Hamano9882a522007-04-27 08:22:22842</li>
843<li>
844<p>
Junio C Hamanob7676d52020-11-18 22:15:08845<code>/regex/</code>
Junio C Hamano9882a522007-04-27 08:22:22846</p>
Junio C Hamanoed69a742010-12-01 03:09:23847<div class="paragraph"><p>This form will use the first line matching the given
Junio C Hamanob7676d52020-11-18 22:15:08848POSIX regex. If <em>&lt;start&gt;</em> is a regex, it will search from the end of
Junio C Hamanoc14e6ad2014-10-31 20:25:53849the previous <code>-L</code> range, if any, otherwise from the start of file.
Junio C Hamanob7676d52020-11-18 22:15:08850If <em>&lt;start&gt;</em> is <code>^/regex/</code>, it will search from the start of file.
851If <em>&lt;end&gt;</em> is a regex, it will search
852starting at the line given by <em>&lt;start&gt;</em>.</p></div>
Junio C Hamano9882a522007-04-27 08:22:22853</li>
854<li>
855<p>
856+offset or -offset
857</p>
Junio C Hamanob7676d52020-11-18 22:15:08858<div class="paragraph"><p>This is only valid for <em>&lt;end&gt;</em> and will specify a number
859of lines before or after the line given by <em>&lt;start&gt;</em>.</p></div>
Junio C Hamano9882a522007-04-27 08:22:22860</li>
Junio C Hamanoba4b9282008-07-06 05:20:31861</ul></div>
Junio C Hamanob7676d52020-11-18 22:15:08862<div class="paragraph"><p>If <code>:&lt;funcname&gt;</code> is given in place of <em>&lt;start&gt;</em> and <em>&lt;end&gt;</em>, it is a
Junio C Hamanodd5004a2015-05-06 19:33:32863regular expression that denotes the range from the first funcname line
Junio C Hamanob7676d52020-11-18 22:15:08864that matches <em>&lt;funcname&gt;</em>, up to the next funcname line. <code>:&lt;funcname&gt;</code>
Junio C Hamanodd5004a2015-05-06 19:33:32865searches from the end of the previous <code>-L</code> range, if any, otherwise
Junio C Hamanob7676d52020-11-18 22:15:08866from the start of file. <code>^:&lt;funcname&gt;</code> searches from the start of
867file. The function names are determined in the same way as <code>git diff</code>
868works out patch hunk headers (see <em>Defining a custom hunk-header</em>
869in <a href="gitattributes.html">gitattributes(5)</a>).</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:50870</dd>
Junio C Hamanoed69a742010-12-01 03:09:23871<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11872-l
Junio C Hamanob33fb4f2006-04-18 21:30:51873</dt>
874<dd>
875<p>
Junio C Hamano3fd90c82006-06-18 00:22:01876 Show long rev (Default: off).
877</p>
878</dd>
Junio C Hamanoed69a742010-12-01 03:09:23879<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11880-t
Junio C Hamano3fd90c82006-06-18 00:22:01881</dt>
882<dd>
883<p>
884 Show raw timestamp (Default: off).
Junio C Hamanob33fb4f2006-04-18 21:30:51885</p>
886</dd>
Junio C Hamanoed69a742010-12-01 03:09:23887<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:11888-S &lt;revs-file&gt;
Junio C Hamanob33fb4f2006-04-18 21:30:51889</dt>
890<dd>
891<p>
Junio C Hamanoa28a9202012-06-21 07:08:23892 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:51893</p>
894</dd>
Junio C Hamanoed69a742010-12-01 03:09:23895<dt class="hdlist1">
Junio C Hamano20829a42016-10-10 23:24:44896--reverse &lt;rev&gt;..&lt;rev&gt;
Junio C Hamanoa6455f62009-02-20 08:33:08897</dt>
898<dd>
899<p>
900 Walk history forward instead of backward. Instead of showing
901 the revision in which a line appeared, this shows the last
902 revision in which a line has existed. This requires a range of
903 revision like START..END where the path to blame exists in
Junio C Hamano20829a42016-10-10 23:24:44904 START. <code>git blame --reverse START</code> is taken as <code>git blame
905 --reverse START..HEAD</code> for convenience.
Junio C Hamanoa6455f62009-02-20 08:33:08906</p>
907</dd>
Junio C Hamanoed69a742010-12-01 03:09:23908<dt class="hdlist1">
Junio C Hamano98c882d2020-08-13 22:06:57909--first-parent
910</dt>
911<dd>
912<p>
913 Follow only the first parent commit upon seeing a merge
914 commit. This option can be used to determine when a line
915 was introduced to a particular integration branch, rather
916 than when it was introduced to the history overall.
917</p>
918</dd>
919<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47920-p
921</dt>
Junio C Hamanoed69a742010-12-01 03:09:23922<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47923--porcelain
Junio C Hamanoff4b4312006-10-25 22:55:31924</dt>
925<dd>
926<p>
927 Show in a format designed for machine consumption.
928</p>
929</dd>
Junio C Hamanoed69a742010-12-01 03:09:23930<dt class="hdlist1">
Junio C Hamano2a294cd2011-05-23 23:06:31931--line-porcelain
932</dt>
933<dd>
934<p>
935 Show the porcelain format, but output commit information for
936 each line, not just the first time a commit is referenced.
937 Implies --porcelain.
938</p>
939</dd>
940<dt class="hdlist1">
Junio C Hamano5a702332007-01-28 20:55:22941--incremental
942</dt>
943<dd>
944<p>
945 Show the result incrementally in a format designed for
946 machine consumption.
947</p>
948</dd>
Junio C Hamanoed69a742010-12-01 03:09:23949<dt class="hdlist1">
Junio C Hamanoaa17c7c2008-11-03 04:36:58950--encoding=&lt;encoding&gt;
951</dt>
952<dd>
953<p>
954 Specifies the encoding used to output author names
Junio C Hamanoc14e6ad2014-10-31 20:25:53955 and commit summaries. Setting it to <code>none</code> makes blame
Junio C Hamanoaa17c7c2008-11-03 04:36:58956 output unconverted data. For more information see the
Junio C Hamanoa28a9202012-06-21 07:08:23957 discussion about encoding in the <a href="git-log.html">git-log(1)</a>
Junio C Hamanoaa17c7c2008-11-03 04:36:58958 manual page.
959</p>
960</dd>
Junio C Hamanoed69a742010-12-01 03:09:23961<dt class="hdlist1">
Junio C Hamano42f855f2007-02-06 00:09:38962--contents &lt;file&gt;
963</dt>
964<dd>
965<p>
966 When &lt;rev&gt; is not specified, the command annotates the
967 changes starting backwards from the working tree copy.
968 This flag makes the command pretend as if the working
Junio C Hamano49dccaf2008-02-10 10:48:01969 tree copy has the contents of the named file (specify
Junio C Hamanoc14e6ad2014-10-31 20:25:53970 <code>-</code> to make the command read from the standard input).
Junio C Hamano42f855f2007-02-06 00:09:38971</p>
972</dd>
Junio C Hamanoed69a742010-12-01 03:09:23973<dt class="hdlist1">
Junio C Hamanoea6a7642009-03-11 23:56:19974--date &lt;format&gt;
975</dt>
976<dd>
977<p>
Junio C Hamano1eb56092015-10-05 20:39:53978 Specifies the format used to output dates. If --date is not
Junio C Hamanoea6a7642009-03-11 23:56:19979 provided, the value of the blame.date config variable is
980 used. If the blame.date config variable is also not set, the
Junio C Hamano1eb56092015-10-05 20:39:53981 iso format is used. For supported values, see the discussion
Junio C Hamanoa28a9202012-06-21 07:08:23982 of the --date option at <a href="git-log.html">git-log(1)</a>.
Junio C Hamanoea6a7642009-03-11 23:56:19983</p>
984</dd>
Junio C Hamanoed69a742010-12-01 03:09:23985<dt class="hdlist1">
Junio C Hamanoa7da1ba2016-01-13 00:19:45986--[no-]progress
987</dt>
988<dd>
989<p>
990 Progress status is reported on the standard error stream
991 by default when it is attached to a terminal. This flag
992 enables progress reporting even if not attached to a
993 terminal. Can&#8217;t use <code>--progress</code> together with <code>--porcelain</code>
994 or <code>--incremental</code>.
995</p>
996</dd>
997<dt class="hdlist1">
Junio C Hamanofa0dac32017-02-24 19:02:55998-M[&lt;num&gt;]
Junio C Hamanoe1aa7472006-11-09 07:37:50999</dt>
1000<dd>
1001<p>
Junio C Hamano0e8c0b02010-04-12 15:45:551002 Detect moved or copied lines within a file. When a commit
1003 moves or copies a block of lines (e.g. the original file
1004 has A and then B, and the commit changes it to B and then
1005 A), the traditional <em>blame</em> algorithm notices only half of
1006 the movement and typically blames the lines that were moved
1007 up (i.e. B) to the parent and assigns blame to the lines that
1008 were moved down (i.e. A) to the child commit. With this
1009 option, both groups of lines are blamed on the parent by
1010 running extra passes of inspection.
Junio C Hamanoe1aa7472006-11-09 07:37:501011</p>
Junio C Hamanoed69a742010-12-01 03:09:231012<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:211013alphanumeric characters that Git must detect as moving/copying
Junio C Hamano0e3cb532007-04-17 08:28:111014within a file for it to associate those lines with the parent
Junio C Hamanocc7636a2010-05-21 14:57:531015commit. The default value is 20.</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:501016</dd>
Junio C Hamanoed69a742010-12-01 03:09:231017<dt class="hdlist1">
Junio C Hamanofa0dac32017-02-24 19:02:551018-C[&lt;num&gt;]
Junio C Hamanoe1aa7472006-11-09 07:37:501019</dt>
1020<dd>
1021<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531022 In addition to <code>-M</code>, detect lines moved or copied from other
Junio C Hamanoe1aa7472006-11-09 07:37:501023 files that were modified in the same commit. This is
1024 useful when you reorganize your program and move code
1025 around across files. When this option is given twice,
Junio C Hamano5ca1dd12010-01-17 02:44:041026 the command additionally looks for copies from other
1027 files in the commit that creates the file. When this
1028 option is given three times, the command additionally
1029 looks for copies from other files in any commit.
Junio C Hamanoe1aa7472006-11-09 07:37:501030</p>
Junio C Hamanoed69a742010-12-01 03:09:231031<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:211032alphanumeric characters that Git must detect as moving/copying
Junio C Hamano0e3cb532007-04-17 08:28:111033between files for it to associate those lines with the parent
Junio C Hamanocc7636a2010-05-21 14:57:531034commit. And the default value is 40. If there are more than one
Junio C Hamanoc14e6ad2014-10-31 20:25:531035<code>-C</code> options given, the &lt;num&gt; argument of the last <code>-C</code> will
Junio C Hamanocc7636a2010-05-21 14:57:531036take effect.</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:501037</dd>
Junio C Hamanoed69a742010-12-01 03:09:231038<dt class="hdlist1">
Junio C Hamanoa42e0332019-07-19 19:49:371039--ignore-rev &lt;rev&gt;
1040</dt>
1041<dd>
1042<p>
1043 Ignore changes made by the revision when assigning blame, as if the
1044 change never happened. Lines that were changed or added by an ignored
1045 commit will be blamed on the previous commit that changed that line or
1046 nearby lines. This option may be specified multiple times to ignore
1047 more than one revision. If the <code>blame.markIgnoredLines</code> config option
1048 is set, then lines that were changed by an ignored commit and attributed to
1049 another commit will be marked with a <code>?</code> in the blame output. If the
1050 <code>blame.markUnblamableLines</code> config option is set, then those lines touched
1051 by an ignored commit that we could not attribute to another revision are
1052 marked with a <em>*</em>.
1053</p>
1054</dd>
1055<dt class="hdlist1">
1056--ignore-revs-file &lt;file&gt;
1057</dt>
1058<dd>
1059<p>
1060 Ignore revisions listed in <code>file</code>, which must be in the same format as an
1061 <code>fsck.skipList</code>. This option may be repeated, and these files will be
1062 processed after any files specified with the <code>blame.ignoreRevsFile</code> config
1063 option. An empty file name, <code>""</code>, will clear the list of revs from
1064 previously processed files.
1065</p>
1066</dd>
1067<dt class="hdlist1">
Junio C Hamano59646272021-10-19 00:02:081068--color-lines
1069</dt>
1070<dd>
1071<p>
1072 Color line annotations in the default format differently if they come from
1073 the same commit as the preceding line. This makes it easier to distinguish
1074 code blocks introduced by different commits. The color defaults to cyan and
1075 can be adjusted using the <code>color.blame.repeatedLines</code> config option.
1076</p>
1077</dd>
1078<dt class="hdlist1">
1079--color-by-age
1080</dt>
1081<dd>
1082<p>
1083 Color line annotations depending on the age of the line in the default format.
1084 The <code>color.blame.highlightRecent</code> config option controls what color is used for
1085 each range of age.
1086</p>
1087</dd>
1088<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471089-h
1090</dt>
Junio C Hamanob33fb4f2006-04-18 21:30:511091<dd>
1092<p>
1093 Show help message.
1094</p>
1095</dd>
Junio C Hamanoed69a742010-12-01 03:09:231096<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:111097-c
1098</dt>
1099<dd>
1100<p>
Junio C Hamanoa28a9202012-06-21 07:08:231101 Use the same output mode as <a href="git-annotate.html">git-annotate(1)</a> (Default: off).
Junio C Hamano0e3cb532007-04-17 08:28:111102</p>
1103</dd>
Junio C Hamanoed69a742010-12-01 03:09:231104<dt class="hdlist1">
Junio C Hamano0e3cb532007-04-17 08:28:111105--score-debug
1106</dt>
1107<dd>
1108<p>
1109 Include debugging information related to the movement of
Junio C Hamanoc14e6ad2014-10-31 20:25:531110 lines between files (see <code>-C</code>) and lines moved within a
1111 file (see <code>-M</code>). The first number listed is the score.
Junio C Hamano0e3cb532007-04-17 08:28:111112 This is the number of alphanumeric characters detected
Junio C Hamanofd83b8e2009-03-22 08:21:411113 as having been moved between or within files. This must be above
Junio C Hamano1aa40d22010-01-21 17:46:431114 a certain threshold for <em>git blame</em> to consider those lines
Junio C Hamano0e3cb532007-04-17 08:28:111115 of code to have been moved.
1116</p>
1117</dd>
Junio C Hamanoed69a742010-12-01 03:09:231118<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471119-f
1120</dt>
Junio C Hamanoed69a742010-12-01 03:09:231121<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471122--show-name
Junio C Hamano0e3cb532007-04-17 08:28:111123</dt>
1124<dd>
1125<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411126 Show the filename in the original commit. By default
1127 the filename is shown if there is any line that came from a
1128 file with a different name, due to rename detection.
Junio C Hamano0e3cb532007-04-17 08:28:111129</p>
1130</dd>
Junio C Hamanoed69a742010-12-01 03:09:231131<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471132-n
1133</dt>
Junio C Hamanoed69a742010-12-01 03:09:231134<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471135--show-number
Junio C Hamano0e3cb532007-04-17 08:28:111136</dt>
1137<dd>
1138<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411139 Show the line number in the original commit (Default: off).
Junio C Hamano0e3cb532007-04-17 08:28:111140</p>
1141</dd>
Junio C Hamanoed69a742010-12-01 03:09:231142<dt class="hdlist1">
Junio C Hamano469d60e2007-04-29 18:30:341143-s
1144</dt>
1145<dd>
1146<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411147 Suppress the author name and timestamp from the output.
Junio C Hamano469d60e2007-04-29 18:30:341148</p>
1149</dd>
Junio C Hamanoed69a742010-12-01 03:09:231150<dt class="hdlist1">
1151-e
1152</dt>
1153<dt class="hdlist1">
1154--show-email
1155</dt>
1156<dd>
1157<p>
1158 Show the author email instead of author name (Default: off).
Junio C Hamanodf5384b2015-06-24 21:12:121159 This can also be controlled via the <code>blame.showEmail</code> config
1160 option.
Junio C Hamanoed69a742010-12-01 03:09:231161</p>
1162</dd>
1163<dt class="hdlist1">
Junio C Hamano9e52d4e2007-06-13 08:29:331164-w
1165</dt>
1166<dd>
1167<p>
Junio C Hamanoed69a742010-12-01 03:09:231168 Ignore whitespace when comparing the parent&#8217;s version and
1169 the child&#8217;s to find where the lines came from.
Junio C Hamano9e52d4e2007-06-13 08:29:331170</p>
1171</dd>
Junio C Hamano209ebe82011-04-27 21:09:591172<dt class="hdlist1">
1173--abbrev=&lt;n&gt;
1174</dt>
1175<dd>
1176<p>
1177 Instead of using the default 7+1 hexadecimal digits as the
Junio C Hamanoee43d182020-11-11 22:10:411178 abbreviated object name, use &lt;m&gt;+1 digits, where &lt;m&gt; is at
1179 least &lt;n&gt; but ensures the commit object names are unique.
1180 Note that 1 column
Junio C Hamano209ebe82011-04-27 21:09:591181 is used for a caret to mark the boundary commit.
1182</p>
1183</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311184</dl></div>
Junio C Hamanob33fb4f2006-04-18 21:30:511185</div>
Junio C Hamano9d971152012-12-19 00:43:111186</div>
1187<div class="sect1">
Junio C Hamano59646272021-10-19 00:02:081188<h2 id="_the_default_format">THE DEFAULT FORMAT</h2>
1189<div class="sectionbody">
1190<div class="paragraph"><p>When neither <code>--porcelain</code> nor <code>--incremental</code> option is specified,
1191<code>git blame</code> will output annotation for each line with:</p></div>
1192<div class="ulist"><ul>
1193<li>
1194<p>
1195abbreviated object name for the commit the line came from;
1196</p>
1197</li>
1198<li>
1199<p>
1200author ident (by default author name and date, unless <code>-s</code> or <code>-e</code>
1201 is specified); and
1202</p>
1203</li>
1204<li>
1205<p>
1206line number
1207</p>
1208</li>
1209</ul></div>
1210<div class="paragraph"><p>before the line contents.</p></div>
1211</div>
1212</div>
1213<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311214<h2 id="_the_porcelain_format">THE PORCELAIN FORMAT</h2>
Junio C Hamanoff4b4312006-10-25 22:55:311215<div class="sectionbody">
Junio C Hamanoed69a742010-12-01 03:09:231216<div class="paragraph"><p>In this format, each line is output after a header; the
Junio C Hamanoba4b9282008-07-06 05:20:311217header at the minimum has the first line which has:</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231218<div class="ulist"><ul>
Junio C Hamanoff4b4312006-10-25 22:55:311219<li>
1220<p>
122140-byte SHA-1 of the commit the line is attributed to;
1222</p>
1223</li>
1224<li>
1225<p>
1226the line number of the line in the original file;
1227</p>
1228</li>
1229<li>
1230<p>
1231the line number of the line in the final file;
1232</p>
1233</li>
1234<li>
1235<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411236on a line that starts a group of lines from a different
Junio C Hamanoff4b4312006-10-25 22:55:311237 commit than the previous one, the number of lines in this
1238 group. On subsequent lines this field is absent.
1239</p>
1240</li>
Junio C Hamanoba4b9282008-07-06 05:20:311241</ul></div>
Junio C Hamanoed69a742010-12-01 03:09:231242<div class="paragraph"><p>This header line is followed by the following information
Junio C Hamanoba4b9282008-07-06 05:20:311243at least once for each commit:</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231244<div class="ulist"><ul>
Junio C Hamanoff4b4312006-10-25 22:55:311245<li>
1246<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411247the author name ("author"), email ("author-mail"), time
Junio C Hamanoe3acfb82013-11-12 23:22:571248 ("author-time"), and time zone ("author-tz"); similarly
Junio C Hamanoff4b4312006-10-25 22:55:311249 for committer.
1250</p>
1251</li>
1252<li>
1253<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411254the filename in the commit that the line is attributed to.
Junio C Hamanoff4b4312006-10-25 22:55:311255</p>
1256</li>
1257<li>
1258<p>
1259the first line of the commit log message ("summary").
1260</p>
1261</li>
Junio C Hamanoba4b9282008-07-06 05:20:311262</ul></div>
Junio C Hamanoed69a742010-12-01 03:09:231263<div class="paragraph"><p>The contents of the actual line is output after the above
Junio C Hamanoff4b4312006-10-25 22:55:311264header, prefixed by a TAB. This is to allow adding more
Junio C Hamanoba4b9282008-07-06 05:20:311265header elements later.</p></div>
Junio C Hamano2a294cd2011-05-23 23:06:311266<div class="paragraph"><p>The porcelain format generally suppresses commit information that has
1267already been seen. For example, two lines that are blamed to the same
1268commit will both be shown, but the details for that commit will be shown
1269only once. This is more efficient, but may require more state be kept by
Junio C Hamanoc14e6ad2014-10-31 20:25:531270the reader. The <code>--line-porcelain</code> option can be used to output full
Junio C Hamano2a294cd2011-05-23 23:06:311271commit information for each line, allowing simpler (but less efficient)
1272usage like:</p></div>
1273<div class="literalblock">
1274<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531275<pre><code># count the number of lines attributed to each author
Junio C Hamano2a294cd2011-05-23 23:06:311276git blame --line-porcelain file |
1277sed -n 's/^author //p' |
Junio C Hamanoc14e6ad2014-10-31 20:25:531278sort | uniq -c | sort -rn</code></pre>
Junio C Hamano2a294cd2011-05-23 23:06:311279</div></div>
Junio C Hamanoff4b4312006-10-25 22:55:311280</div>
Junio C Hamano9d971152012-12-19 00:43:111281</div>
1282<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311283<h2 id="_specifying_ranges">SPECIFYING RANGES</h2>
Junio C Hamanoe1aa7472006-11-09 07:37:501284<div class="sectionbody">
Junio C Hamanoed69a742010-12-01 03:09:231285<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:411286of the annotation can be limited to both line ranges and revision
Junio C Hamanoc14e6ad2014-10-31 20:25:531287ranges. The <code>-L</code> option, which limits annotation to a range of lines, may be
Junio C Hamano8eac2682013-09-09 22:35:201288specified multiple times.</p></div>
1289<div class="paragraph"><p>When you are interested in finding the origin for
Junio C Hamanoc14e6ad2014-10-31 20:25:531290lines 40-60 for file <code>foo</code>, you can use the <code>-L</code> option like so
Junio C Hamanoed69a742010-12-01 03:09:231291(they mean the same thing&#8201;&#8212;&#8201;both ask for 21 lines starting at
Junio C Hamanoba4b9282008-07-06 05:20:311292line 40):</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:501293<div class="literalblock">
1294<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531295<pre><code>git blame -L 40,60 foo
1296git blame -L 40,+21 foo</code></pre>
Junio C Hamanoe1aa7472006-11-09 07:37:501297</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231298<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:321299<div class="literalblock">
1300<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531301<pre><code>git blame -L '/^sub hello {/,/^}$/' foo</code></pre>
Junio C Hamano4a345d22006-11-09 18:45:321302</div></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:531303<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:231304<div class="paragraph"><p>When you are not interested in changes older than version
Junio C Hamanoe1aa7472006-11-09 07:37:501305v2.6.18, or changes older than 3 weeks, you can use revision
Junio C Hamano1aa40d22010-01-21 17:46:431306range specifiers similar to <em>git rev-list</em>:</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:501307<div class="literalblock">
1308<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531309<pre><code>git blame v2.6.18.. -- foo
1310git blame --since=3.weeks -- foo</code></pre>
Junio C Hamanoe1aa7472006-11-09 07:37:501311</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231312<div class="paragraph"><p>When revision range specifiers are used to limit the annotation,
Junio C Hamanoe1aa7472006-11-09 07:37:501313lines that have not changed since the range boundary (either the
1314commit v2.6.18 or the most recent commit that is more than 3
1315weeks old in the above example) are blamed for that range
Junio C Hamanoba4b9282008-07-06 05:20:311316boundary commit.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231317<div class="paragraph"><p>A particularly useful way is to see if an added file has lines
Junio C Hamanoe1aa7472006-11-09 07:37:501318created by copy-and-paste from existing files. Sometimes this
1319indicates that the developer was being sloppy and did not
1320refactor the code properly. You can first find the commit that
Junio C Hamanoba4b9282008-07-06 05:20:311321introduced the file with:</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:501322<div class="literalblock">
1323<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531324<pre><code>git log --diff-filter=A --pretty=short -- foo</code></pre>
Junio C Hamanoe1aa7472006-11-09 07:37:501325</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231326<div class="paragraph"><p>and then annotate the change between the commit and its
Junio C Hamanoc14e6ad2014-10-31 20:25:531327parents, using <code>commit^!</code> notation:</p></div>
Junio C Hamanoe1aa7472006-11-09 07:37:501328<div class="literalblock">
1329<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531330<pre><code>git blame -C -C -f $commit^! -- foo</code></pre>
Junio C Hamanoe1aa7472006-11-09 07:37:501331</div></div>
1332</div>
Junio C Hamano9d971152012-12-19 00:43:111333</div>
1334<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311335<h2 id="_incremental_output">INCREMENTAL OUTPUT</h2>
Junio C Hamano5a702332007-01-28 20:55:221336<div class="sectionbody">
Junio C Hamanoc14e6ad2014-10-31 20:25:531337<div class="paragraph"><p>When called with <code>--incremental</code> option, the command outputs the
Junio C Hamano5a702332007-01-28 20:55:221338result as it is built. The output generally will talk about
1339lines touched by more recent commits first (i.e. the lines will
1340be annotated out of order) and is meant to be used by
Junio C Hamanoba4b9282008-07-06 05:20:311341interactive viewers.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231342<div class="paragraph"><p>The output format is similar to the Porcelain format, but it
Junio C Hamano5a702332007-01-28 20:55:221343does not contain the actual lines from the file that is being
Junio C Hamanoba4b9282008-07-06 05:20:311344annotated.</p></div>
Junio C Hamanoed69a742010-12-01 03:09:231345<div class="olist arabic"><ol class="arabic">
Junio C Hamano5a702332007-01-28 20:55:221346<li>
1347<p>
1348Each blame entry always starts with a line of:
1349</p>
1350<div class="literalblock">
1351<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531352<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:221353</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231354<div class="paragraph"><p>Line numbers count from 1.</p></div>
Junio C Hamano5a702332007-01-28 20:55:221355</li>
1356<li>
1357<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411358The first time that a commit shows up in the stream, it has various
Junio C Hamano5a702332007-01-28 20:55:221359 other information about it printed out with a one-word tag at the
Junio C Hamanofd83b8e2009-03-22 08:21:411360 beginning of each line describing the extra commit information (author,
1361 email, committer, dates, summary, etc.).
Junio C Hamano5a702332007-01-28 20:55:221362</p>
1363</li>
1364<li>
1365<p>
Junio C Hamanofd83b8e2009-03-22 08:21:411366Unlike the Porcelain format, the filename information is always
Junio C Hamano5a702332007-01-28 20:55:221367 given and terminates the entry:
1368</p>
1369<div class="literalblock">
1370<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531371<pre><code>"filename" &lt;whitespace-quoted-filename-goes-here&gt;</code></pre>
Junio C Hamano5a702332007-01-28 20:55:221372</div></div>
Junio C Hamanoed69a742010-12-01 03:09:231373<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:311374parser (which should be quite natural for most scripting languages).</p></div>
Junio C Hamano5a702332007-01-28 20:55:221375<div class="admonitionblock">
1376<table><tr>
1377<td class="icon">
1378<div class="title">Note</div>
1379</td>
1380<td class="content">For people who do parsing: to make it more robust, just ignore any
Junio C Hamanofd83b8e2009-03-22 08:21:411381lines between the first and last one ("&lt;sha1&gt;" and "filename" lines)
1382where you do not recognize the tag words (or care about that particular
Junio C Hamano5a702332007-01-28 20:55:221383one) at the beginning of the "extended information" lines. That way, if
1384there is ever added information (like the commit encoding or extended
Junio C Hamanofd83b8e2009-03-22 08:21:411385commit commentary), a blame viewer will not care.</td>
Junio C Hamano5a702332007-01-28 20:55:221386</tr></table>
1387</div>
1388</li>
Junio C Hamanoba4b9282008-07-06 05:20:311389</ol></div>
Junio C Hamano5a702332007-01-28 20:55:221390</div>
Junio C Hamano9d971152012-12-19 00:43:111391</div>
1392<div class="sect1">
Junio C Hamano8bc410e2009-02-15 10:38:191393<h2 id="_mapping_authors">MAPPING AUTHORS</h2>
1394<div class="sectionbody">
Junio C Hamano7887f9b2021-01-25 23:32:331395<div class="paragraph"><p>See <a href="gitmailmap.html">gitmailmap(5)</a>.</p></div>
Junio C Hamano8bc410e2009-02-15 10:38:191396</div>
Junio C Hamano9d971152012-12-19 00:43:111397</div>
1398<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311399<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamanob33fb4f2006-04-18 21:30:511400<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231401<div class="paragraph"><p><a href="git-annotate.html">git-annotate(1)</a></p></div>
Junio C Hamanob33fb4f2006-04-18 21:30:511402</div>
Junio C Hamano9d971152012-12-19 00:43:111403</div>
1404<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311405<h2 id="_git">GIT</h2>
Junio C Hamanob33fb4f2006-04-18 21:30:511406<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231407<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamanob33fb4f2006-04-18 21:30:511408</div>
Junio C Hamano7bd050f2011-09-22 06:32:221409</div>
Junio C Hamano9d971152012-12-19 00:43:111410</div>
Junio C Hamano7bd050f2011-09-22 06:32:221411<div id="footnotes"><hr /></div>
Junio C Hamanob33fb4f2006-04-18 21:30:511412<div id="footer">
1413<div id="footer-text">
Junio C Hamano2ef0ba32018-01-26 23:13:531414Last updated
Junio C Hamano14390e22022-03-17 01:11:121415 2021-10-18 17:00:13 PDT
Junio C Hamanob33fb4f2006-04-18 21:30:511416</div>
1417</div>
1418</body>
1419</html>