blob: 5393a3eb7db6e9dcc6e663c04e030cadf97bd324 [file] [log] [blame]
Junio C Hamanoab008762005-12-28 02:33:001<!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 Hamano97bcb482010-11-25 03:16:077<title>git-describe(1)</title>
Junio C Hamanoab008762005-12-28 02:33:008<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 Hamanoab008762005-12-28 02:33:0024}
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 Hamanoab008762005-12-28 02:33:0037
38em {
39 font-style: italic;
Junio C Hamano97bcb482010-11-25 03:16:0740 color: navy;
Junio C Hamanoab008762005-12-28 02:33:0041}
42
43strong {
44 font-weight: bold;
Junio C Hamano97bcb482010-11-25 03:16:0745 color: #083194;
Junio C Hamanoab008762005-12-28 02:33:0046}
47
Junio C Hamanoab008762005-12-28 02:33:0048h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamanoab008762005-12-28 02:33:0050 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 Hamanoab008762005-12-28 02:33:0056 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamanoab008762005-12-28 02:33:0059 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 Hamanoab008762005-12-28 02:33:0070
71div.sectionbody {
Junio C Hamanoab008762005-12-28 02:33:0072 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 Hamano97bcb482010-11-25 03:16:0784ul, 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 Hamano97bcb482010-11-25 03:16:0789
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 Hamanoab008762005-12-28 02:33:0094 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9d971152012-12-19 00:43:1198
99#author {
Junio C Hamanoab008762005-12-28 02:33:00100 color: #527bbd;
Junio C Hamanoab008762005-12-28 02:33:00101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamanoab008762005-12-28 02:33:00103}
Junio C Hamano9d971152012-12-19 00:43:11104#email {
Junio C Hamanoab008762005-12-28 02:33:00105}
Junio C Hamano9d971152012-12-19 00:43:11106#revnumber, #revdate, #revremark {
Junio C Hamanoab008762005-12-28 02:33:00107}
108
Junio C Hamano9d971152012-12-19 00:43:11109#footer {
Junio C Hamanoab008762005-12-28 02:33:00110 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 Hamanoab008762005-12-28 02:33:00116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9d971152012-12-19 00:43:11119#footer-badges {
Junio C Hamanoab008762005-12-28 02:33:00120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9d971152012-12-19 00:43:11124#preamble {
Junio C Hamano97bcb482010-11-25 03:16:07125 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 Hamanoab008762005-12-28 02:33:00129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamanoab008762005-12-28 02:33:00132 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 Hamanoab008762005-12-28 02:33:00139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamano97bcb482010-11-25 03:16:07147 color: #527bbd;
Junio C Hamanoab008762005-12-28 02:33:00148 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 Hamanoab008762005-12-28 02:33:00171 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 Hamanoab008762005-12-28 02:33:00178 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 Hamano97bcb482010-11-25 03:16:07184 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamanoab008762005-12-28 02:33:00187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamano97bcb482010-11-25 03:16:07189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamanoab008762005-12-28 02:33:00191 text-align: right;
192}
Junio C Hamano97bcb482010-11-25 03:16:07193
Junio C Hamano9d971152012-12-19 00:43:11194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamano97bcb482010-11-25 03:16:07197}
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 Hamanoab008762005-12-28 02:33:00206
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 Hamanoab008762005-12-28 02:33:00218}
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 Hamanoab008762005-12-28 02:33:00223}
224
Junio C Hamanoab008762005-12-28 02:33:00225div.imageblock div.content { padding-left: 0; }
Junio C Hamanoab008762005-12-28 02:33:00226span.image img { border-style: none; }
Junio C Hamano97bcb482010-11-25 03:16:07227a.image:visited { color: white; }
Junio C Hamanoab008762005-12-28 02:33:00228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamano97bcb482010-11-25 03:16:07236 font-style: normal;
237 color: navy;
Junio C Hamanoab008762005-12-28 02:33:00238}
239dd > *:first-child {
Junio C Hamano97bcb482010-11-25 03:16:07240 margin-top: 0.1em;
Junio C Hamanoab008762005-12-28 02:33:00241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamano97bcb482010-11-25 03:16:07246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamanoab008762005-12-28 02:33:00250 list-style-type: lower-alpha;
251}
Junio C Hamano97bcb482010-11-25 03:16:07252ol.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 Hamanoab008762005-12-28 02:33:00268
Junio C Hamanoab008762005-12-28 02:33:00269tfoot {
270 font-weight: bold;
271}
Junio C Hamano97bcb482010-11-25 03:16:07272td > div.verse {
273 white-space: pre;
274}
Junio C Hamano97bcb482010-11-25 03:16:07275
276div.hdlist {
Junio C Hamanoab008762005-12-28 02:33:00277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamano97bcb482010-11-25 03:16:07280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31282}
Junio C Hamano97bcb482010-11-25 03:16:07283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamanoab008762005-12-28 02:33:00287 vertical-align: top;
Junio C Hamano97bcb482010-11-25 03:16:07288 font-style: normal;
Junio C Hamanoab008762005-12-28 02:33:00289 padding-right: 0.8em;
Junio C Hamano97bcb482010-11-25 03:16:07290 color: navy;
Junio C Hamanoab008762005-12-28 02:33:00291}
Junio C Hamano97bcb482010-11-25 03:16:07292td.hdlist2 {
Junio C Hamanoab008762005-12-28 02:33:00293 vertical-align: top;
294}
Junio C Hamano97bcb482010-11-25 03:16:07295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamanoab008762005-12-28 02:33:00303
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 Hamanoab008762005-12-28 02:33:00338}
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 Hamano97bcb482010-11-25 03:16:07519 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 Hamano97bcb482010-11-25 03:16:07525 border-style: none;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamano97bcb482010-11-25 03:16:07529}
530
531@media print {
Junio C Hamano9d971152012-12-19 00:43:11532 body.manpage div#toc { display: none; }
Junio C Hamano97bcb482010-11-25 03:16:07533}
534
Junio C Hamanoab008762005-12-28 02:33:00535
Junio C Hamanoab008762005-12-28 02:33:00536</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 Hamanoab008762005-12-28 02:33:00731</head>
Junio C Hamano9d971152012-12-19 00:43:11732<body class="manpage">
Junio C Hamanoab008762005-12-28 02:33:00733<div id="header">
734<h1>
735git-describe(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-describe -
Junio C Hamano01078922006-03-10 00:31:47740 Show the most recent tag that is reachable from a commit
Junio C Hamanoab008762005-12-28 02:33:00741</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 Hamano97bcb482010-11-25 03:16:07746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamanoab008762005-12-28 02:33:00747<div class="sectionbody">
Junio C Hamano0ecfa0f2009-11-10 22:13:24748<div class="verseblock">
Junio C Hamanoe6f28d02013-09-17 21:34:00749<pre class="content"><em>git describe</em> [--all] [--tags] [--contains] [--abbrev=&lt;n&gt;] &lt;commit-ish&gt;&#8230;
Junio C Hamano9d971152012-12-19 00:43:11750<em>git describe</em> [--all] [--tags] [--contains] [--abbrev=&lt;n&gt;] --dirty[=&lt;mark&gt;]</pre>
751<div class="attribution">
Junio C Hamano97bcb482010-11-25 03:16:07752</div></div>
Junio C Hamanoab008762005-12-28 02:33:00753</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 Hamanoab008762005-12-28 02:33:00757<div class="sectionbody">
Junio C Hamano97bcb482010-11-25 03:16:07758<div class="paragraph"><p>The command finds the most recent tag that is reachable from a
Junio C Hamano2fbcd212008-05-14 22:26:07759commit. If the tag points to the commit, then only the tag is
760shown. Otherwise, it suffixes the tag name with the number of
761additional commits on top of the tagged object and the
Junio C Hamanoba4b9282008-07-06 05:20:31762abbreviated object name of the most recent commit.</p></div>
Junio C Hamano9d971152012-12-19 00:43:11763<div class="paragraph"><p>By default (without --all or --tags) <code>git describe</code> only shows
Junio C Hamano7d06a8a2008-10-20 05:42:33764annotated tags. For more information about creating annotated tags
Junio C Hamanoa28a9202012-06-21 07:08:23765see the -a and -s options to <a href="git-tag.html">git-tag(1)</a>.</p></div>
Junio C Hamanoab008762005-12-28 02:33:00766</div>
Junio C Hamano9d971152012-12-19 00:43:11767</div>
768<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31769<h2 id="_options">OPTIONS</h2>
Junio C Hamanoab008762005-12-28 02:33:00770<div class="sectionbody">
Junio C Hamano97bcb482010-11-25 03:16:07771<div class="dlist"><dl>
772<dt class="hdlist1">
Junio C Hamanoe6f28d02013-09-17 21:34:00773&lt;commit-ish&gt;&#8230;
Junio C Hamanoab008762005-12-28 02:33:00774</dt>
775<dd>
776<p>
Junio C Hamanoe6f28d02013-09-17 21:34:00777 Commit-ish object names to describe.
Junio C Hamanoab008762005-12-28 02:33:00778</p>
779</dd>
Junio C Hamano97bcb482010-11-25 03:16:07780<dt class="hdlist1">
Junio C Hamano446ed772009-11-10 22:02:20781--dirty[=&lt;mark&gt;]
782</dt>
783<dd>
784<p>
785 Describe the working tree.
Junio C Hamano9d971152012-12-19 00:43:11786 It means describe HEAD and appends &lt;mark&gt; (<code>-dirty</code> by
Junio C Hamano446ed772009-11-10 22:02:20787 default) if the working tree is dirty.
788</p>
789</dd>
Junio C Hamano97bcb482010-11-25 03:16:07790<dt class="hdlist1">
Junio C Hamanoab008762005-12-28 02:33:00791--all
792</dt>
793<dd>
794<p>
795 Instead of using only the annotated tags, use any ref
Junio C Hamano9d971152012-12-19 00:43:11796 found in <code>refs/</code> namespace. This option enables matching
Junio C Hamano97bcb482010-11-25 03:16:07797 any known branch, remote-tracking branch, or lightweight tag.
Junio C Hamanoab008762005-12-28 02:33:00798</p>
799</dd>
Junio C Hamano97bcb482010-11-25 03:16:07800<dt class="hdlist1">
Junio C Hamanoab008762005-12-28 02:33:00801--tags
802</dt>
803<dd>
804<p>
805 Instead of using only the annotated tags, use any tag
Junio C Hamano9d971152012-12-19 00:43:11806 found in <code>refs/tags</code> namespace. This option enables matching
Junio C Hamano7d06a8a2008-10-20 05:42:33807 a lightweight (non-annotated) tag.
Junio C Hamanoab008762005-12-28 02:33:00808</p>
809</dd>
Junio C Hamano97bcb482010-11-25 03:16:07810<dt class="hdlist1">
Junio C Hamano5e284b42007-05-22 07:23:37811--contains
812</dt>
813<dd>
814<p>
815 Instead of finding the tag that predates the commit, find
816 the tag that comes after the commit, and thus contains it.
817 Automatically implies --tags.
818</p>
819</dd>
Junio C Hamano97bcb482010-11-25 03:16:07820<dt class="hdlist1">
Junio C Hamanoab008762005-12-28 02:33:00821--abbrev=&lt;n&gt;
822</dt>
823<dd>
824<p>
Junio C Hamano22bcc112009-01-24 08:05:18825 Instead of using the default 7 hexadecimal digits as the
Junio C Hamanoc21ab052009-10-31 04:03:55826 abbreviated object name, use &lt;n&gt; digits, or as many digits
827 as needed to form a unique object name. An &lt;n&gt; of 0
828 will suppress long format, only showing the closest tag.
Junio C Hamanoab008762005-12-28 02:33:00829</p>
830</dd>
Junio C Hamano97bcb482010-11-25 03:16:07831<dt class="hdlist1">
Junio C Hamanoedd2b0a2007-01-15 06:12:45832--candidates=&lt;n&gt;
833</dt>
834<dd>
835<p>
836 Instead of considering only the 10 most recent tags as
Junio C Hamanoe6f28d02013-09-17 21:34:00837 candidates to describe the input commit-ish consider
Junio C Hamanoedd2b0a2007-01-15 06:12:45838 up to &lt;n&gt; candidates. Increasing &lt;n&gt; above 10 will take
839 slightly longer but may produce a more accurate result.
Junio C Hamano24bc09a2008-02-28 00:27:44840 An &lt;n&gt; of 0 will cause only exact matches to be output.
841</p>
842</dd>
Junio C Hamano97bcb482010-11-25 03:16:07843<dt class="hdlist1">
Junio C Hamano24bc09a2008-02-28 00:27:44844--exact-match
845</dt>
846<dd>
847<p>
848 Only output exact matches (a tag directly references the
849 supplied commit). This is a synonym for --candidates=0.
Junio C Hamanoedd2b0a2007-01-15 06:12:45850</p>
851</dd>
Junio C Hamano97bcb482010-11-25 03:16:07852<dt class="hdlist1">
Junio C Hamanoedd2b0a2007-01-15 06:12:45853--debug
854</dt>
855<dd>
856<p>
857 Verbosely display information about the searching strategy
858 being employed to standard error. The tag name will still
859 be printed to standard out.
860</p>
861</dd>
Junio C Hamano97bcb482010-11-25 03:16:07862<dt class="hdlist1">
Junio C Hamano4f1d8c42008-03-03 02:01:16863--long
864</dt>
865<dd>
866<p>
867 Always output the long format (the tag, the number of commits
868 and the abbreviated commit name) even when it matches a tag.
869 This is useful when you want to see parts of the commit object name
870 in "describe" output, even when the commit in question happens to be
871 a tagged version. Instead of just emitting the tag name, it will
Junio C Hamanoc21ab052009-10-31 04:03:55872 describe such a commit as v1.2-0-gdeadbee (0th commit since tag v1.2
873 that points at object deadbee&#8230;.).
Junio C Hamano4f1d8c42008-03-03 02:01:16874</p>
875</dd>
Junio C Hamano97bcb482010-11-25 03:16:07876<dt class="hdlist1">
Junio C Hamano9c334152008-02-12 03:18:52877--match &lt;pattern&gt;
878</dt>
879<dd>
880<p>
Junio C Hamano947ab822013-03-19 23:07:29881 Only consider tags matching the given <code>glob(7)</code> pattern,
882 excluding the "refs/tags/" prefix. This can be used to avoid
883 leaking private tags from the repository.
Junio C Hamano9c334152008-02-12 03:18:52884</p>
885</dd>
Junio C Hamano97bcb482010-11-25 03:16:07886<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47887--always
888</dt>
889<dd>
890<p>
891 Show uniquely abbreviated commit object as fallback.
892</p>
893</dd>
Junio C Hamano7e590a12013-06-02 23:46:52894<dt class="hdlist1">
895--first-parent
896</dt>
897<dd>
898<p>
899 Follow only the first parent commit upon seeing a merge commit.
900 This is useful when you wish to not match tags on branches merged
901 in the history of the target commit.
902</p>
903</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31904</dl></div>
Junio C Hamanoab008762005-12-28 02:33:00905</div>
Junio C Hamano9d971152012-12-19 00:43:11906</div>
907<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31908<h2 id="_examples">EXAMPLES</h2>
Junio C Hamanoab008762005-12-28 02:33:00909<div class="sectionbody">
Junio C Hamano97bcb482010-11-25 03:16:07910<div class="paragraph"><p>With something like git.git current tree, I get:</p></div>
Junio C Hamanoab008762005-12-28 02:33:00911<div class="literalblock">
912<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11913<pre><code>[torvalds@g5 git]$ git describe parent
914v1.0.4-14-g2414721</code></pre>
Junio C Hamanoab008762005-12-28 02:33:00915</div></div>
Junio C Hamano97bcb482010-11-25 03:16:07916<div class="paragraph"><p>i.e. the current head of my "parent" branch is based on v1.0.4,
Junio C Hamano6efe3022009-01-13 16:47:56917but since it has a few commits on top of that,
Junio C Hamanoa890c4f2007-01-28 10:29:21918describe has added the number of additional commits ("14") and
919an abbreviated object name for the commit itself ("2414721")
Junio C Hamanoba4b9282008-07-06 05:20:31920at the end.</p></div>
Junio C Hamano97bcb482010-11-25 03:16:07921<div class="paragraph"><p>The number of additional commits is the number
Junio C Hamanoa890c4f2007-01-28 10:29:21922of commits which would be displayed by "git log v1.0.4..parent".
923The hash suffix is "-g" + 7-char abbreviation for the tip commit
Junio C Hamano9d971152012-12-19 00:43:11924of parent (which was <code>2414721b194453f058079d897d13c4e377f92dc6</code>).
Junio C Hamano31667362010-03-25 00:38:53925The "g" prefix stands for "git" and is used to allow describing the version of
926a software depending on the SCM the software is managed with. This is useful
927in an environment where people may use different SCMs.</p></div>
Junio C Hamano97bcb482010-11-25 03:16:07928<div class="paragraph"><p>Doing a <em>git describe</em> on a tag-name will just show the tag name:</p></div>
Junio C Hamanoab008762005-12-28 02:33:00929<div class="literalblock">
930<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11931<pre><code>[torvalds@g5 git]$ git describe v1.0.4
932v1.0.4</code></pre>
Junio C Hamanoab008762005-12-28 02:33:00933</div></div>
Junio C Hamano97bcb482010-11-25 03:16:07934<div class="paragraph"><p>With --all, the command can use branch heads as references, so
Junio C Hamanoba4b9282008-07-06 05:20:31935the output shows the reference path as well:</p></div>
Junio C Hamanoab008762005-12-28 02:33:00936<div class="literalblock">
937<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11938<pre><code>[torvalds@g5 git]$ git describe --all --abbrev=4 v1.0.5^2
939tags/v1.0.0-21-g975b</code></pre>
Junio C Hamanoab008762005-12-28 02:33:00940</div></div>
941<div class="literalblock">
942<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11943<pre><code>[torvalds@g5 git]$ git describe --all --abbrev=4 HEAD^
944heads/lt/describe-7-g975b</code></pre>
Junio C Hamanoa890c4f2007-01-28 10:29:21945</div></div>
Junio C Hamano97bcb482010-11-25 03:16:07946<div class="paragraph"><p>With --abbrev set to 0, the command can be used to find the
Junio C Hamanoba4b9282008-07-06 05:20:31947closest tagname without any suffix:</p></div>
Junio C Hamanoa890c4f2007-01-28 10:29:21948<div class="literalblock">
949<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11950<pre><code>[torvalds@g5 git]$ git describe --abbrev=0 v1.0.5^2
951tags/v1.0.0</code></pre>
Junio C Hamanoab008762005-12-28 02:33:00952</div></div>
Junio C Hamano97bcb482010-11-25 03:16:07953<div class="paragraph"><p>Note that the suffix you get if you type these commands today may be
Junio C Hamanoa1f86332009-11-05 05:28:43954longer than what Linus saw above when he ran these commands, as your
Junio C Hamano076ffcc2013-02-06 05:13:21955Git repository may have new commits whose object names begin with
Junio C Hamanoc21ab052009-10-31 04:03:55956975b that did not exist back then, and "-g975b" suffix alone may not
957be sufficient to disambiguate these commits.</p></div>
Junio C Hamanoab008762005-12-28 02:33:00958</div>
Junio C Hamano9d971152012-12-19 00:43:11959</div>
960<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31961<h2 id="_search_strategy">SEARCH STRATEGY</h2>
Junio C Hamanoedd2b0a2007-01-15 06:12:45962<div class="sectionbody">
Junio C Hamanoe6f28d02013-09-17 21:34:00963<div class="paragraph"><p>For each commit-ish supplied, <em>git describe</em> will first look for
Junio C Hamanoedd2b0a2007-01-15 06:12:45964a tag which tags exactly that commit. Annotated tags will always
965be preferred over lightweight tags, and tags with newer dates will
966always be preferred over tags with older dates. If an exact match
Junio C Hamanoba4b9282008-07-06 05:20:31967is found, its name will be output and searching will stop.</p></div>
Junio C Hamano97bcb482010-11-25 03:16:07968<div class="paragraph"><p>If an exact match was not found, <em>git describe</em> will walk back
Junio C Hamanoedd2b0a2007-01-15 06:12:45969through the commit history to locate an ancestor commit which
Junio C Hamano97bcb482010-11-25 03:16:07970has been tagged. The ancestor&#8217;s tag will be output along with an
Junio C Hamanoe6f28d02013-09-17 21:34:00971abbreviation of the input commit-ish&#8217;s SHA-1. If <em>--first-parent</em> was
Junio C Hamano7e590a12013-06-02 23:46:52972specified then the walk will only consider the first parent of each
973commit.</p></div>
Junio C Hamano97bcb482010-11-25 03:16:07974<div class="paragraph"><p>If multiple tags were found during the walk then the tag which
Junio C Hamanoe6f28d02013-09-17 21:34:00975has the fewest commits different from the input commit-ish will be
Junio C Hamanoedd2b0a2007-01-15 06:12:45976selected and output. Here fewest commits different is defined as
Junio C Hamano9d971152012-12-19 00:43:11977the number of commits which would be shown by <code>git log tag..input</code>
Junio C Hamanoba4b9282008-07-06 05:20:31978will be the smallest number of commits possible.</p></div>
Junio C Hamanoedd2b0a2007-01-15 06:12:45979</div>
Junio C Hamano9d971152012-12-19 00:43:11980</div>
981<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31982<h2 id="_git">GIT</h2>
Junio C Hamanoab008762005-12-28 02:33:00983<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:23984<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamanoab008762005-12-28 02:33:00985</div>
Junio C Hamano7bd050f2011-09-22 06:32:22986</div>
Junio C Hamano9d971152012-12-19 00:43:11987</div>
Junio C Hamano7bd050f2011-09-22 06:32:22988<div id="footnotes"><hr /></div>
Junio C Hamanoab008762005-12-28 02:33:00989<div id="footer">
990<div id="footer-text">
Junio C Hamanoe6f28d02013-09-17 21:34:00991Last updated 2013-09-17 14:33:14 PDT
Junio C Hamanoab008762005-12-28 02:33:00992</div>
993</div>
994</body>
995</html>