blob: c7e7ce9d2a709c04c88faf13e8d5985e1552abab [file] [log] [blame]
Junio C Hamanoff4b4312006-10-25 22:55:311<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
Junio C Hamano9d971152012-12-19 00:43:115<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
6<meta name="generator" content="AsciiDoc 8.6.8" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-for-each-ref(1)</title>
Junio C Hamanoff4b4312006-10-25 22:55:318<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 Hamanoff4b4312006-10-25 22:55:3124}
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 Hamanoff4b4312006-10-25 22:55:3137
38em {
39 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5940 color: navy;
Junio C Hamanoff4b4312006-10-25 22:55:3141}
42
43strong {
44 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5945 color: #083194;
Junio C Hamanoff4b4312006-10-25 22:55:3146}
47
Junio C Hamanoff4b4312006-10-25 22:55:3148h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamanoff4b4312006-10-25 22:55:3150 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 Hamanoff4b4312006-10-25 22:55:3156 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamanoff4b4312006-10-25 22:55:3159 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 Hamanoff4b4312006-10-25 22:55:3170
71div.sectionbody {
Junio C Hamanoff4b4312006-10-25 22:55:3172 margin-left: 0;
73}
74
75hr {
76 border: 1px solid silver;
77}
78
79p {
80 margin-top: 0.5em;
81 margin-bottom: 0.5em;
82}
83
Junio C Hamano68cf15a2010-11-06 01:01:5984ul, ol, li > p {
85 margin-top: 0;
86}
Junio C Hamano9d971152012-12-19 00:43:1187ul > li { color: #aaa; }
88ul > li > * { color: black; }
Junio C Hamano68cf15a2010-11-06 01:01:5989
Junio C Hamano9d971152012-12-19 00:43:1190.monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
Junio C Hamanoff4b4312006-10-25 22:55:3194 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9d971152012-12-19 00:43:1198
99#author {
Junio C Hamanoff4b4312006-10-25 22:55:31100 color: #527bbd;
Junio C Hamanoff4b4312006-10-25 22:55:31101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamanoff4b4312006-10-25 22:55:31103}
Junio C Hamano9d971152012-12-19 00:43:11104#email {
Junio C Hamanoff4b4312006-10-25 22:55:31105}
Junio C Hamano9d971152012-12-19 00:43:11106#revnumber, #revdate, #revremark {
Junio C Hamanoff4b4312006-10-25 22:55:31107}
108
Junio C Hamano9d971152012-12-19 00:43:11109#footer {
Junio C Hamanoff4b4312006-10-25 22:55:31110 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 Hamanoff4b4312006-10-25 22:55:31116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9d971152012-12-19 00:43:11119#footer-badges {
Junio C Hamanoff4b4312006-10-25 22:55:31120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9d971152012-12-19 00:43:11124#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59125 margin-top: 1.5em;
126 margin-bottom: 1.5em;
127}
Junio C Hamano9d971152012-12-19 00:43:11128div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamanoff4b4312006-10-25 22:55:31129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamanoff4b4312006-10-25 22:55:31132 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 Hamanoff4b4312006-10-25 22:55:31139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59147 color: #527bbd;
Junio C Hamanoff4b4312006-10-25 22:55:31148 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 Hamanoff4b4312006-10-25 22:55:31171 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 Hamanoff4b4312006-10-25 22:55:31178 padding: 0.5em;
179}
180
Junio C Hamano7bd050f2011-09-22 06:32:22181div.quoteblock, div.verseblock {
182 padding-left: 1.0em;
183 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59184 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamanoff4b4312006-10-25 22:55:31187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamano68cf15a2010-11-06 01:01:59189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamanoff4b4312006-10-25 22:55:31191 text-align: right;
192}
Junio C Hamano68cf15a2010-11-06 01:01:59193
Junio C Hamano9d971152012-12-19 00:43:11194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59197}
198div.verseblock > div.attribution {
199 padding-top: 0.75em;
200 text-align: left;
201}
202/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31203div.verseblock + div.attribution {
204 text-align: left;
205}
Junio C Hamanoff4b4312006-10-25 22:55:31206
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 Hamanoff4b4312006-10-25 22:55:31218}
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 Hamanoff4b4312006-10-25 22:55:31223}
224
Junio C Hamanoff4b4312006-10-25 22:55:31225div.imageblock div.content { padding-left: 0; }
Junio C Hamanoff4b4312006-10-25 22:55:31226span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59227a.image:visited { color: white; }
Junio C Hamanoff4b4312006-10-25 22:55:31228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59236 font-style: normal;
237 color: navy;
Junio C Hamanoff4b4312006-10-25 22:55:31238}
239dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59240 margin-top: 0.1em;
Junio C Hamanoff4b4312006-10-25 22:55:31241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamano68cf15a2010-11-06 01:01:59246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamanoff4b4312006-10-25 22:55:31250 list-style-type: lower-alpha;
251}
Junio C Hamano68cf15a2010-11-06 01:01:59252ol.upperalpha {
253 list-style-type: upper-alpha;
254}
255ol.lowerroman {
256 list-style-type: lower-roman;
257}
258ol.upperroman {
259 list-style-type: upper-roman;
260}
261
262div.compact ul, div.compact ol,
263div.compact p, div.compact p,
264div.compact div, div.compact div {
265 margin-top: 0.1em;
266 margin-bottom: 0.1em;
267}
Junio C Hamanoff4b4312006-10-25 22:55:31268
Junio C Hamanoff4b4312006-10-25 22:55:31269tfoot {
270 font-weight: bold;
271}
Junio C Hamano68cf15a2010-11-06 01:01:59272td > div.verse {
273 white-space: pre;
274}
Junio C Hamano68cf15a2010-11-06 01:01:59275
276div.hdlist {
Junio C Hamanoff4b4312006-10-25 22:55:31277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamano68cf15a2010-11-06 01:01:59280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31282}
Junio C Hamano68cf15a2010-11-06 01:01:59283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamanoff4b4312006-10-25 22:55:31287 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59288 font-style: normal;
Junio C Hamanoff4b4312006-10-25 22:55:31289 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59290 color: navy;
Junio C Hamanoff4b4312006-10-25 22:55:31291}
Junio C Hamano68cf15a2010-11-06 01:01:59292td.hdlist2 {
Junio C Hamanoff4b4312006-10-25 22:55:31293 vertical-align: top;
294}
Junio C Hamano68cf15a2010-11-06 01:01:59295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamanoff4b4312006-10-25 22:55:31303
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 Hamanoff4b4312006-10-25 22:55:31338}
Junio C Hamanoba4b9282008-07-06 05:20:31339
Junio C Hamano9d971152012-12-19 00:43:11340@media print {
341 #footer-badges { display: none; }
342}
343
344#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22345 margin-bottom: 2.5em;
346}
347
Junio C Hamano9d971152012-12-19 00:43:11348#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31349 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31350 font-size: 1.1em;
351 font-weight: bold;
352 margin-top: 1.0em;
353 margin-bottom: 0.1em;
354}
355
Junio C Hamano9d971152012-12-19 00:43:11356div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31357 margin-top: 0;
358 margin-bottom: 0;
359}
360div.toclevel2 {
361 margin-left: 2em;
362 font-size: 0.9em;
363}
364div.toclevel3 {
365 margin-left: 4em;
366 font-size: 0.9em;
367}
368div.toclevel4 {
369 margin-left: 6em;
370 font-size: 0.9em;
371}
Junio C Hamano9d971152012-12-19 00:43:11372
373span.aqua { color: aqua; }
374span.black { color: black; }
375span.blue { color: blue; }
376span.fuchsia { color: fuchsia; }
377span.gray { color: gray; }
378span.green { color: green; }
379span.lime { color: lime; }
380span.maroon { color: maroon; }
381span.navy { color: navy; }
382span.olive { color: olive; }
383span.purple { color: purple; }
384span.red { color: red; }
385span.silver { color: silver; }
386span.teal { color: teal; }
387span.white { color: white; }
388span.yellow { color: yellow; }
389
390span.aqua-background { background: aqua; }
391span.black-background { background: black; }
392span.blue-background { background: blue; }
393span.fuchsia-background { background: fuchsia; }
394span.gray-background { background: gray; }
395span.green-background { background: green; }
396span.lime-background { background: lime; }
397span.maroon-background { background: maroon; }
398span.navy-background { background: navy; }
399span.olive-background { background: olive; }
400span.purple-background { background: purple; }
401span.red-background { background: red; }
402span.silver-background { background: silver; }
403span.teal-background { background: teal; }
404span.white-background { background: white; }
405span.yellow-background { background: yellow; }
406
407span.big { font-size: 2em; }
408span.small { font-size: 0.6em; }
409
410span.underline { text-decoration: underline; }
411span.overline { text-decoration: overline; }
412span.line-through { text-decoration: line-through; }
413
414div.unbreakable { page-break-inside: avoid; }
415
416
417/*
418 * xhtml11 specific
419 *
420 * */
421
422div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
425}
426div.tableblock > table {
427 border: 3px solid #527bbd;
428}
429thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
432}
433p.table {
434 margin-top: 0;
435}
436/* Because the table frame attribute is overriden by CSS in most browsers. */
437div.tableblock > table[frame="void"] {
438 border-style: none;
439}
440div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
443}
444div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
447}
448
449
450/*
451 * html5 specific
452 *
453 * */
454
455table.tableblock {
456 margin-top: 1.0em;
457 margin-bottom: 1.5em;
458}
459thead, p.tableblock.header {
460 font-weight: bold;
461 color: #527bbd;
462}
463p.tableblock {
464 margin-top: 0;
465}
466table.tableblock {
467 border-width: 3px;
468 border-spacing: 0px;
469 border-style: solid;
470 border-color: #527bbd;
471 border-collapse: collapse;
472}
473th.tableblock, td.tableblock {
474 border-width: 1px;
475 padding: 4px;
476 border-style: solid;
477 border-color: #527bbd;
478}
479
480table.tableblock.frame-topbot {
481 border-left-style: hidden;
482 border-right-style: hidden;
483}
484table.tableblock.frame-sides {
485 border-top-style: hidden;
486 border-bottom-style: hidden;
487}
488table.tableblock.frame-none {
489 border-style: hidden;
490}
491
492th.tableblock.halign-left, td.tableblock.halign-left {
493 text-align: left;
494}
495th.tableblock.halign-center, td.tableblock.halign-center {
496 text-align: center;
497}
498th.tableblock.halign-right, td.tableblock.halign-right {
499 text-align: right;
500}
501
502th.tableblock.valign-top, td.tableblock.valign-top {
503 vertical-align: top;
504}
505th.tableblock.valign-middle, td.tableblock.valign-middle {
506 vertical-align: middle;
507}
508th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509 vertical-align: bottom;
510}
511
512
513/*
514 * manpage specific
515 *
516 * */
517
518body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59519 padding-top: 0.5em;
520 padding-bottom: 0.5em;
521 border-top: 2px solid silver;
522 border-bottom: 2px solid silver;
523}
Junio C Hamano9d971152012-12-19 00:43:11524body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59525 border-style: none;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59529}
530
531@media print {
Junio C Hamano9d971152012-12-19 00:43:11532 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59533}
534
Junio C Hamanoff4b4312006-10-25 22:55:31535
Junio C Hamanoff4b4312006-10-25 22:55:31536</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 Hamanoff4b4312006-10-25 22:55:31731</head>
Junio C Hamano9d971152012-12-19 00:43:11732<body class="manpage">
Junio C Hamanoff4b4312006-10-25 22:55:31733<div id="header">
734<h1>
735git-for-each-ref(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-for-each-ref -
740 Output information on each ref
741</p>
742</div>
743</div>
Junio C Hamano7bd050f2011-09-22 06:32:22744<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11745<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamanoff4b4312006-10-25 22:55:31747<div class="sectionbody">
Junio C Hamanoa9b8d242007-05-19 04:51:55748<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11749<pre class="content"><em>git for-each-ref</em> [--count=&lt;count&gt;] [--shell|--perl|--python|--tcl]
750 [(--sort=&lt;key&gt;)&#8230;] [--format=&lt;format&gt;] [&lt;pattern&gt;&#8230;]</pre>
751<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:59752</div></div>
Junio C Hamanoff4b4312006-10-25 22:55:31753</div>
Junio C Hamano9d971152012-12-19 00:43:11754</div>
755<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31756<h2 id="_description">DESCRIPTION</h2>
Junio C Hamanoff4b4312006-10-25 22:55:31757<div class="sectionbody">
Junio C Hamano9d971152012-12-19 00:43:11758<div class="paragraph"><p>Iterate over all refs that match <code>&lt;pattern&gt;</code> and show them
759according to the given <code>&lt;format&gt;</code>, after sorting them according
760to the given set of <code>&lt;key&gt;</code>. If <code>&lt;count&gt;</code> is given, stop after
761showing that many refs. The interpolated values in <code>&lt;format&gt;</code>
Junio C Hamanoff4b4312006-10-25 22:55:31762can optionally be quoted as string literals in the specified
Junio C Hamanoba4b9282008-07-06 05:20:31763host language allowing their direct evaluation in that language.</p></div>
Junio C Hamanoff4b4312006-10-25 22:55:31764</div>
Junio C Hamano9d971152012-12-19 00:43:11765</div>
766<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31767<h2 id="_options">OPTIONS</h2>
Junio C Hamanoff4b4312006-10-25 22:55:31768<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59769<div class="dlist"><dl>
770<dt class="hdlist1">
Junio C Hamanoff4b4312006-10-25 22:55:31771&lt;count&gt;
772</dt>
773<dd>
774<p>
775 By default the command shows all refs that match
Junio C Hamano9d971152012-12-19 00:43:11776 <code>&lt;pattern&gt;</code>. This option makes it stop after showing
Junio C Hamanoff4b4312006-10-25 22:55:31777 that many refs.
778</p>
779</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59780<dt class="hdlist1">
Junio C Hamanoff4b4312006-10-25 22:55:31781&lt;key&gt;
782</dt>
783<dd>
784<p>
Junio C Hamano9d971152012-12-19 00:43:11785 A field name to sort on. Prefix <code>-</code> to sort in
Junio C Hamanoff4b4312006-10-25 22:55:31786 descending order of the value. When unspecified,
Junio C Hamano9d971152012-12-19 00:43:11787 <code>refname</code> is used. You may use the --sort=&lt;key&gt; option
Junio C Hamanof7c042d2008-06-06 22:50:53788 multiple times, in which case the last key becomes the primary
789 key.
Junio C Hamanoff4b4312006-10-25 22:55:31790</p>
791</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59792<dt class="hdlist1">
Junio C Hamanoff4b4312006-10-25 22:55:31793&lt;format&gt;
794</dt>
795<dd>
796<p>
Junio C Hamano9d971152012-12-19 00:43:11797 A string that interpolates <code>%(fieldname)</code> from the
798 object pointed at by a ref being shown. If <code>fieldname</code>
799 is prefixed with an asterisk (<code>*</code>) and the ref points
Junio C Hamanoff4b4312006-10-25 22:55:31800 at a tag object, the value for the field in the object
801 tag refers is used. When unspecified, defaults to
Junio C Hamano9d971152012-12-19 00:43:11802 <code>%(objectname) SPC %(objecttype) TAB %(refname)</code>.
803 It also interpolates <code>%%</code> to <code>%</code>, and <code>%xx</code> where <code>xx</code>
Junio C Hamano4de43af2006-10-28 21:29:01804 are hex digits interpolates to character with hex code
Junio C Hamano9d971152012-12-19 00:43:11805 <code>xx</code>; for example <code>%00</code> interpolates to <code>\0</code> (NUL),
806 <code>%09</code> to <code>\t</code> (TAB) and <code>%0a</code> to <code>\n</code> (LF).
Junio C Hamanoff4b4312006-10-25 22:55:31807</p>
808</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59809<dt class="hdlist1">
Junio C Hamano9e395072008-07-31 22:11:21810&lt;pattern&gt;&#8230;
Junio C Hamanoff4b4312006-10-25 22:55:31811</dt>
812<dd>
813<p>
Junio C Hamanof7c042d2008-06-06 22:50:53814 If one or more patterns are given, only refs are shown that
Junio C Hamanocb1c44f2008-08-06 06:19:33815 match against at least one pattern, either using fnmatch(3) or
Junio C Hamanof7c042d2008-06-06 22:50:53816 literally, in the latter case matching completely or from the
817 beginning up to a slash.
Junio C Hamanoff4b4312006-10-25 22:55:31818</p>
819</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59820<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47821--shell
822</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59823<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47824--perl
825</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59826<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47827--python
828</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59829<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47830--tcl
Junio C Hamanoff4b4312006-10-25 22:55:31831</dt>
832<dd>
833<p>
Junio C Hamano9d971152012-12-19 00:43:11834 If given, strings that substitute <code>%(fieldname)</code>
Junio C Hamanoff4b4312006-10-25 22:55:31835 placeholders are quoted as string literals suitable for
836 the specified host language. This is meant to produce
837 a scriptlet that can directly be `eval`ed.
838</p>
839</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31840</dl></div>
Junio C Hamanoff4b4312006-10-25 22:55:31841</div>
Junio C Hamano9d971152012-12-19 00:43:11842</div>
843<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31844<h2 id="_field_names">FIELD NAMES</h2>
Junio C Hamanoff4b4312006-10-25 22:55:31845<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59846<div class="paragraph"><p>Various values from structured fields in referenced objects can
Junio C Hamanoff4b4312006-10-25 22:55:31847be used to interpolate into the resulting output, or as sort
Junio C Hamanoba4b9282008-07-06 05:20:31848keys.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59849<div class="paragraph"><p>For all objects, the following names can be used:</p></div>
850<div class="dlist"><dl>
851<dt class="hdlist1">
Junio C Hamanoff4b4312006-10-25 22:55:31852refname
853</dt>
854<dd>
855<p>
Junio C Hamano42f855f2007-02-06 00:09:38856 The name of the ref (the part after $GIT_DIR/).
Junio C Hamano9d971152012-12-19 00:43:11857 For a non-ambiguous short name of the ref append <code>:short</code>.
Junio C Hamano3bd66e92009-04-18 06:17:56858 The option core.warnAmbiguousRefs is used to select the strict
859 abbreviation mode.
Junio C Hamanoff4b4312006-10-25 22:55:31860</p>
861</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59862<dt class="hdlist1">
Junio C Hamanoff4b4312006-10-25 22:55:31863objecttype
864</dt>
865<dd>
866<p>
Junio C Hamano9d971152012-12-19 00:43:11867 The type of the object (<code>blob</code>, <code>tree</code>, <code>commit</code>, <code>tag</code>).
Junio C Hamanoff4b4312006-10-25 22:55:31868</p>
869</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59870<dt class="hdlist1">
Junio C Hamanoff4b4312006-10-25 22:55:31871objectsize
872</dt>
873<dd>
874<p>
Junio C Hamano1aa40d22010-01-21 17:46:43875 The size of the object (the same as <em>git cat-file -s</em> reports).
Junio C Hamanoff4b4312006-10-25 22:55:31876</p>
877</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59878<dt class="hdlist1">
Junio C Hamanoff4b4312006-10-25 22:55:31879objectname
880</dt>
881<dd>
882<p>
883 The object name (aka SHA-1).
Junio C Hamano9d971152012-12-19 00:43:11884 For a non-ambiguous abbreviation of the object name append <code>:short</code>.
Junio C Hamanoff4b4312006-10-25 22:55:31885</p>
886</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59887<dt class="hdlist1">
Junio C Hamano98e32c32009-04-13 02:39:53888upstream
889</dt>
890<dd>
891<p>
Junio C Hamano9d971152012-12-19 00:43:11892 The name of a local ref which can be considered &#8220;upstream&#8221;
893 from the displayed ref. Respects <code>:short</code> in the same way as
894 <code>refname</code> above.
Junio C Hamano98e32c32009-04-13 02:39:53895</p>
896</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31897</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:59898<div class="paragraph"><p>In addition to the above, for commit and tag objects, the header
Junio C Hamano9d971152012-12-19 00:43:11899field names (<code>tree</code>, <code>parent</code>, <code>object</code>, <code>type</code>, and <code>tag</code>) can
Junio C Hamanoba4b9282008-07-06 05:20:31900be used to specify the value in the header field.</p></div>
Junio C Hamano9d971152012-12-19 00:43:11901<div class="paragraph"><p>Fields that have name-email-date tuple as its value (<code>author</code>,
902<code>committer</code>, and <code>tagger</code>) can be suffixed with <code>name</code>, <code>email</code>,
903and <code>date</code> to extract the named component.</p></div>
904<div class="paragraph"><p>The complete message in a commit and tag object is <code>contents</code>.
905Its first line is <code>contents:subject</code>, where subject is the concatenation
Junio C Hamano281fd392012-09-17 23:57:41906of all lines of the commit message up to the first blank line. The next
907line is <em>contents:body</em>, where body is all of the lines after the first
Junio C Hamano9d971152012-12-19 00:43:11908blank line. Finally, the optional GPG signature is <code>contents:signature</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59909<div class="paragraph"><p>For sorting purposes, fields with numeric values sort in numeric
Junio C Hamano9d971152012-12-19 00:43:11910order (<code>objectsize</code>, <code>authordate</code>, <code>committerdate</code>, <code>taggerdate</code>).
Junio C Hamanoba4b9282008-07-06 05:20:31911All other fields are used to sort in their byte-value order.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59912<div class="paragraph"><p>In any case, a field name that refers to a field inapplicable to
Junio C Hamanoff4b4312006-10-25 22:55:31913the object referred by the ref does not cause an error. It
Junio C Hamanoba4b9282008-07-06 05:20:31914returns an empty string instead.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59915<div class="paragraph"><p>As a special case for the date-type fields, you may specify a format for
Junio C Hamano9d971152012-12-19 00:43:11916the date by adding one of <code>:default</code>, <code>:relative</code>, <code>:short</code>, <code>:local</code>,
Junio C Hamano60b372a2013-01-22 02:29:27917<code>:iso8601</code>, <code>:rfc2822</code> or <code>:raw</code> to the end of the fieldname; e.g.
Junio C Hamano9d971152012-12-19 00:43:11918<code>%(taggerdate:relative)</code>.</p></div>
Junio C Hamanoff4b4312006-10-25 22:55:31919</div>
Junio C Hamano9d971152012-12-19 00:43:11920</div>
921<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31922<h2 id="_examples">EXAMPLES</h2>
Junio C Hamanoff4b4312006-10-25 22:55:31923<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59924<div class="paragraph"><p>An example directly producing formatted text. Show the most recent
Junio C Hamanoa8cc1d82011-03-10 01:18:129253 tagged commits:</p></div>
Junio C Hamanoff4b4312006-10-25 22:55:31926<div class="listingblock">
927<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11928<pre><code>#!/bin/sh
Junio C Hamanoff4b4312006-10-25 22:55:31929
Junio C Hamanofce7c7e2008-07-02 03:06:38930git for-each-ref --count=3 --sort='-*authordate' \
Junio C Hamanoff4b4312006-10-25 22:55:31931--format='From: %(*authorname) %(*authoremail)
932Subject: %(*subject)
933Date: %(*authordate)
934Ref: %(*refname)
935
936%(*body)
Junio C Hamano9d971152012-12-19 00:43:11937' 'refs/tags'</code></pre>
Junio C Hamanoff4b4312006-10-25 22:55:31938</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59939<div class="paragraph"><p>A simple example showing the use of shell eval on the output,
Junio C Hamanoa8cc1d82011-03-10 01:18:12940demonstrating the use of --shell. List the prefixes of all heads:</p></div>
Junio C Hamanoff4b4312006-10-25 22:55:31941<div class="listingblock">
942<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11943<pre><code>#!/bin/sh
Junio C Hamanoff4b4312006-10-25 22:55:31944
Junio C Hamanofce7c7e2008-07-02 03:06:38945git for-each-ref --shell --format="ref=%(refname)" refs/heads | \
Junio C Hamanoff4b4312006-10-25 22:55:31946while read entry
947do
948 eval "$entry"
949 echo `dirname $ref`
Junio C Hamano9d971152012-12-19 00:43:11950done</code></pre>
Junio C Hamanoff4b4312006-10-25 22:55:31951</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59952<div class="paragraph"><p>A bit more elaborate report on tags, demonstrating that the format
Junio C Hamanoa8cc1d82011-03-10 01:18:12953may be an entire script:</p></div>
Junio C Hamanoff4b4312006-10-25 22:55:31954<div class="listingblock">
955<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11956<pre><code>#!/bin/sh
Junio C Hamanoff4b4312006-10-25 22:55:31957
958fmt='
959 r=%(refname)
960 t=%(*objecttype)
961 T=${r#refs/tags/}
962
963 o=%(*objectname)
964 n=%(*authorname)
965 e=%(*authoremail)
966 s=%(*subject)
967 d=%(*authordate)
968 b=%(*body)
969
970 kind=Tag
971 if test "z$t" = z
972 then
973 # could be a lightweight tag
974 t=%(objecttype)
975 kind="Lightweight tag"
976 o=%(objectname)
977 n=%(authorname)
978 e=%(authoremail)
979 s=%(subject)
980 d=%(authordate)
981 b=%(body)
982 fi
983 echo "$kind $T points at a $t object $o"
984 if test "z$t" = zcommit
985 then
986 echo "The commit was authored by $n $e
987at $d, and titled
988
989 $s
990
991Its message reads as:
992"
993 echo "$b" | sed -e "s/^/ /"
994 echo
995 fi
996'
997
Junio C Hamanofce7c7e2008-07-02 03:06:38998eval=`git for-each-ref --shell --format="$fmt" \
Junio C Hamanoff4b4312006-10-25 22:55:31999 --sort='*objecttype' \
1000 --sort=-taggerdate \
1001 refs/tags`
Junio C Hamano9d971152012-12-19 00:43:111002eval "$eval"</code></pre>
Junio C Hamanoff4b4312006-10-25 22:55:311003</div></div>
1004</div>
Junio C Hamano9d971152012-12-19 00:43:111005</div>
1006<div class="sect1">
Junio C Hamanoa8cc1d82011-03-10 01:18:121007<h2 id="_author">Author</h2>
1008<div class="sectionbody">
1009<div class="paragraph"><p>Written by Junio C Hamano &lt;<a href="mailto:gitster@pobox.com">gitster@pobox.com</a>&gt;.</p></div>
1010</div>
Junio C Hamano9d971152012-12-19 00:43:111011</div>
1012<div class="sect1">
Junio C Hamanoa8cc1d82011-03-10 01:18:121013<h2 id="_documentation">Documentation</h2>
1014<div class="sectionbody">
1015<div class="paragraph"><p>Documentation by Junio C Hamano and the git-list &lt;<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>&gt;.</p></div>
1016</div>
Junio C Hamano9d971152012-12-19 00:43:111017</div>
1018<div class="sect1">
Junio C Hamanoa8cc1d82011-03-10 01:18:121019<h2 id="_git">GIT</h2>
1020<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231021<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamanoa8cc1d82011-03-10 01:18:121022</div>
Junio C Hamano7bd050f2011-09-22 06:32:221023</div>
Junio C Hamano9d971152012-12-19 00:43:111024</div>
Junio C Hamano7bd050f2011-09-22 06:32:221025<div id="footnotes"><hr /></div>
Junio C Hamanoff4b4312006-10-25 22:55:311026<div id="footer">
1027<div id="footer-text">
Junio C Hamano683a8612013-08-23 20:50:091028Last updated 2013-08-20 08:40:27 PDT
Junio C Hamanoff4b4312006-10-25 22:55:311029</div>
1030</div>
1031</body>
1032</html>