blob: cfaf589d805c9503d012640922dba7818050e9c8 [file] [log] [blame]
Junio C Hamano944ce252018-05-30 22:25:261<?xml version="1.0" encoding="UTF-8"?>
Junio C Hamanoab008762005-12-28 02:33:002<!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 Hamano98c882d2020-08-13 22:06:577<meta name="generator" content="AsciiDoc 9.0.0rc2" />
Junio C Hamano97bcb482010-11-25 03:16:078<title>git-describe(1)</title>
Junio C Hamanoab008762005-12-28 02:33:009<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 Hamanoab008762005-12-28 02:33:0025}
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 Hamanoab008762005-12-28 02:33:0038
39em {
40 font-style: italic;
Junio C Hamano97bcb482010-11-25 03:16:0741 color: navy;
Junio C Hamanoab008762005-12-28 02:33:0042}
43
44strong {
45 font-weight: bold;
Junio C Hamano97bcb482010-11-25 03:16:0746 color: #083194;
Junio C Hamanoab008762005-12-28 02:33:0047}
48
Junio C Hamanoab008762005-12-28 02:33:0049h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
Junio C Hamanoab008762005-12-28 02:33:0051 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 Hamanoab008762005-12-28 02:33:0057 border-bottom: 2px solid silver;
58}
59h2 {
Junio C Hamanoab008762005-12-28 02:33:0060 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 Hamanoab008762005-12-28 02:33:0071
72div.sectionbody {
Junio C Hamanoab008762005-12-28 02:33:0073 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 Hamano97bcb482010-11-25 03:16:0785ul, 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 Hamano97bcb482010-11-25 03:16:0790
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 Hamanoab008762005-12-28 02:33:0095 padding: 0;
96 margin: 0;
97}
Junio C Hamanoc14e6ad2014-10-31 20:25:5398pre {
99 white-space: pre-wrap;
100}
Junio C Hamanoab008762005-12-28 02:33:00101
Junio C Hamano9d971152012-12-19 00:43:11102#author {
Junio C Hamanoab008762005-12-28 02:33:00103 color: #527bbd;
Junio C Hamanoab008762005-12-28 02:33:00104 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31105 font-size: 1.1em;
Junio C Hamanoab008762005-12-28 02:33:00106}
Junio C Hamano9d971152012-12-19 00:43:11107#email {
Junio C Hamanoab008762005-12-28 02:33:00108}
Junio C Hamano9d971152012-12-19 00:43:11109#revnumber, #revdate, #revremark {
Junio C Hamanoab008762005-12-28 02:33:00110}
111
Junio C Hamano9d971152012-12-19 00:43:11112#footer {
Junio C Hamanoab008762005-12-28 02:33:00113 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 Hamanoab008762005-12-28 02:33:00119 float: left;
120 padding-bottom: 0.5em;
121}
Junio C Hamano9d971152012-12-19 00:43:11122#footer-badges {
Junio C Hamanoab008762005-12-28 02:33:00123 float: right;
124 padding-bottom: 0.5em;
125}
126
Junio C Hamano9d971152012-12-19 00:43:11127#preamble {
Junio C Hamano97bcb482010-11-25 03:16:07128 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 Hamanoab008762005-12-28 02:33:00132div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22134 margin-top: 1.0em;
Junio C Hamanoab008762005-12-28 02:33:00135 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 Hamanoab008762005-12-28 02:33:00142}
143
144div.content { /* Block element content. */
145 padding: 0;
146}
147
148/* Block element titles. */
149div.title, caption.title {
Junio C Hamano97bcb482010-11-25 03:16:07150 color: #527bbd;
Junio C Hamanoab008762005-12-28 02:33:00151 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 Hamanoab008762005-12-28 02:33:00174 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 Hamanoab008762005-12-28 02:33:00181 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 Hamano97bcb482010-11-25 03:16:07187 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11188 border-left: 5px solid #f0f0f0;
189 color: #888;
Junio C Hamanoab008762005-12-28 02:33:00190}
Junio C Hamano7bd050f2011-09-22 06:32:22191
Junio C Hamano97bcb482010-11-25 03:16:07192div.quoteblock > div.attribution {
193 padding-top: 0.5em;
Junio C Hamanoab008762005-12-28 02:33:00194 text-align: right;
195}
Junio C Hamano97bcb482010-11-25 03:16:07196
Junio C Hamano9d971152012-12-19 00:43:11197div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
Junio C Hamano97bcb482010-11-25 03:16:07200}
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 Hamanoab008762005-12-28 02:33:00209
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 Hamanoab008762005-12-28 02:33:00221}
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 Hamanoab008762005-12-28 02:33:00226}
227
Junio C Hamanoab008762005-12-28 02:33:00228div.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 Hamano97bcb482010-11-25 03:16:07230a.image:visited { color: white; }
Junio C Hamanoab008762005-12-28 02:33:00231
232dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
235}
236dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
Junio C Hamano97bcb482010-11-25 03:16:07239 font-style: normal;
240 color: navy;
Junio C Hamanoab008762005-12-28 02:33:00241}
242dd > *:first-child {
Junio C Hamano97bcb482010-11-25 03:16:07243 margin-top: 0.1em;
Junio C Hamanoab008762005-12-28 02:33:00244}
245
246ul, ol {
247 list-style-position: outside;
248}
Junio C Hamano97bcb482010-11-25 03:16:07249ol.arabic {
250 list-style-type: decimal;
251}
252ol.loweralpha {
Junio C Hamanoab008762005-12-28 02:33:00253 list-style-type: lower-alpha;
254}
Junio C Hamano97bcb482010-11-25 03:16:07255ol.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 Hamanoab008762005-12-28 02:33:00271
Junio C Hamanoab008762005-12-28 02:33:00272tfoot {
273 font-weight: bold;
274}
Junio C Hamano97bcb482010-11-25 03:16:07275td > div.verse {
276 white-space: pre;
277}
Junio C Hamano97bcb482010-11-25 03:16:07278
279div.hdlist {
Junio C Hamanoab008762005-12-28 02:33:00280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
282}
Junio C Hamano97bcb482010-11-25 03:16:07283div.hdlist tr {
284 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31285}
Junio C Hamano97bcb482010-11-25 03:16:07286dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
288}
289td.hdlist1 {
Junio C Hamanoab008762005-12-28 02:33:00290 vertical-align: top;
Junio C Hamano97bcb482010-11-25 03:16:07291 font-style: normal;
Junio C Hamanoab008762005-12-28 02:33:00292 padding-right: 0.8em;
Junio C Hamano97bcb482010-11-25 03:16:07293 color: navy;
Junio C Hamanoab008762005-12-28 02:33:00294}
Junio C Hamano97bcb482010-11-25 03:16:07295td.hdlist2 {
Junio C Hamanoab008762005-12-28 02:33:00296 vertical-align: top;
297}
Junio C Hamano97bcb482010-11-25 03:16:07298div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
301}
302
303.comment {
304 background: yellow;
305}
Junio C Hamanoab008762005-12-28 02:33:00306
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 Hamanoab008762005-12-28 02:33:00341}
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 Hamano97bcb482010-11-25 03:16:07522 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 Hamano97bcb482010-11-25 03:16:07528 border-style: none;
529}
Junio C Hamano9d971152012-12-19 00:43:11530body.manpage div.sectionbody {
531 margin-left: 3em;
Junio C Hamano97bcb482010-11-25 03:16:07532}
533
534@media print {
Junio C Hamano9d971152012-12-19 00:43:11535 body.manpage div#toc { display: none; }
Junio C Hamano97bcb482010-11-25 03:16:07536}
Junio C Hamanoc14e6ad2014-10-31 20:25:53537
538
Junio C Hamanoab008762005-12-28 02:33:00539</style>
Junio C Hamano7bd050f2011-09-22 06:32:22540<script type="text/javascript">
541/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22542var 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;
Junio C Hamanoc14e6ad2014-10-31 20:25:53583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22584 // 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");
Junio C Hamano9d971152012-12-19 00:43:11603 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];
Junio C Hamanoc14e6ad2014-10-31 20:25:53612 if (entry.nodeName.toLowerCase() == 'div'
Junio C Hamano9d971152012-12-19 00:43:11613 && 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.
Junio C Hamano7bd050f2011-09-22 06:32:22622 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 () {
Junio C Hamano9d971152012-12-19 00:43:11649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22651 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11652 if (!noteholder) {
653 return;
654 }
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
Junio C Hamanoc14e6ad2014-10-31 20:25:53658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
Junio C Hamano9d971152012-12-19 00:43:11659 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");
Junio C Hamano7bd050f2011-09-22 06:32:22667 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++;
Junio C Hamano9d971152012-12-19 00:43:11673 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 }
Junio C Hamano7bd050f2011-09-22 06:32:22683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22687 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 }
Junio C Hamano9d971152012-12-19 00:43:11706},
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;
Junio C Hamano7bd050f2011-09-22 06:32:22728}
729
730}
Junio C Hamano9d971152012-12-19 00:43:11731asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22732/*]]>*/
733</script>
Junio C Hamanoab008762005-12-28 02:33:00734</head>
Junio C Hamano9d971152012-12-19 00:43:11735<body class="manpage">
Junio C Hamanoab008762005-12-28 02:33:00736<div id="header">
737<h1>
738git-describe(1) Manual Page
739</h1>
740<h2>NAME</h2>
741<div class="sectionbody">
742<p>git-describe -
Junio C Hamano68e72b72017-12-28 23:20:52743 Give an object a human readable name based on an available ref
Junio C Hamanoab008762005-12-28 02:33:00744</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 Hamano97bcb482010-11-25 03:16:07749<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamanoab008762005-12-28 02:33:00750<div class="sectionbody">
Junio C Hamano0ecfa0f2009-11-10 22:13:24751<div class="verseblock">
Junio C Hamano3891e252015-08-31 23:06:13752<pre class="content"><em>git describe</em> [--all] [--tags] [--contains] [--abbrev=&lt;n&gt;] [&lt;commit-ish&gt;&#8230;]
Junio C Hamano68e72b72017-12-28 23:20:52753<em>git describe</em> [--all] [--tags] [--contains] [--abbrev=&lt;n&gt;] --dirty[=&lt;mark&gt;]
754<em>git describe</em> &lt;blob&gt;</pre>
Junio C Hamano9d971152012-12-19 00:43:11755<div class="attribution">
Junio C Hamano97bcb482010-11-25 03:16:07756</div></div>
Junio C Hamanoab008762005-12-28 02:33:00757</div>
Junio C Hamano9d971152012-12-19 00:43:11758</div>
759<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31760<h2 id="_description">DESCRIPTION</h2>
Junio C Hamanoab008762005-12-28 02:33:00761<div class="sectionbody">
Junio C Hamano97bcb482010-11-25 03:16:07762<div class="paragraph"><p>The command finds the most recent tag that is reachable from a
Junio C Hamano2fbcd212008-05-14 22:26:07763commit. If the tag points to the commit, then only the tag is
764shown. Otherwise, it suffixes the tag name with the number of
765additional commits on top of the tagged object and the
Junio C Hamano32a75272018-10-16 07:37:35766abbreviated object name of the most recent commit. The result
767is a "human-readable" object name which can also be used to
768identify the commit to other git commands.</p></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:53769<div class="paragraph"><p>By default (without --all or --tags) <code>git describe</code> only shows
Junio C Hamano7d06a8a2008-10-20 05:42:33770annotated tags. For more information about creating annotated tags
Junio C Hamanoa28a9202012-06-21 07:08:23771see the -a and -s options to <a href="git-tag.html">git-tag(1)</a>.</p></div>
Junio C Hamano68e72b72017-12-28 23:20:52772<div class="paragraph"><p>If the given object refers to a blob, it will be described
773as <code>&lt;commit-ish&gt;:&lt;path&gt;</code>, such that the blob can be found
774at <code>&lt;path&gt;</code> in the <code>&lt;commit-ish&gt;</code>, which itself describes the
775first commit in which this blob occurs in a reverse revision walk
776from HEAD.</p></div>
Junio C Hamanoab008762005-12-28 02:33:00777</div>
Junio C Hamano9d971152012-12-19 00:43:11778</div>
779<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31780<h2 id="_options">OPTIONS</h2>
Junio C Hamanoab008762005-12-28 02:33:00781<div class="sectionbody">
Junio C Hamano97bcb482010-11-25 03:16:07782<div class="dlist"><dl>
783<dt class="hdlist1">
Junio C Hamanoe6f28d02013-09-17 21:34:00784&lt;commit-ish&gt;&#8230;
Junio C Hamanoab008762005-12-28 02:33:00785</dt>
786<dd>
787<p>
Junio C Hamano3891e252015-08-31 23:06:13788 Commit-ish object names to describe. Defaults to HEAD if omitted.
Junio C Hamanoab008762005-12-28 02:33:00789</p>
790</dd>
Junio C Hamano97bcb482010-11-25 03:16:07791<dt class="hdlist1">
Junio C Hamano446ed772009-11-10 22:02:20792--dirty[=&lt;mark&gt;]
793</dt>
Junio C Hamano7ab74c42017-03-27 18:23:59794<dt class="hdlist1">
795--broken[=&lt;mark&gt;]
796</dt>
Junio C Hamano446ed772009-11-10 22:02:20797<dd>
798<p>
Junio C Hamano7ab74c42017-03-27 18:23:59799 Describe the state of the working tree. When the working
800 tree matches HEAD, the output is the same as "git describe
801 HEAD". If the working tree has local modification "-dirty"
802 is appended to it. If a repository is corrupt and Git
803 cannot determine if there is local modification, Git will
804 error out, unless &#8216;--broken&#8217; is given, which appends
805 the suffix "-broken" instead.
Junio C Hamano446ed772009-11-10 22:02:20806</p>
807</dd>
Junio C Hamano97bcb482010-11-25 03:16:07808<dt class="hdlist1">
Junio C Hamanoab008762005-12-28 02:33:00809--all
810</dt>
811<dd>
812<p>
813 Instead of using only the annotated tags, use any ref
Junio C Hamanoc14e6ad2014-10-31 20:25:53814 found in <code>refs/</code> namespace. This option enables matching
Junio C Hamano97bcb482010-11-25 03:16:07815 any known branch, remote-tracking branch, or lightweight tag.
Junio C Hamanoab008762005-12-28 02:33:00816</p>
817</dd>
Junio C Hamano97bcb482010-11-25 03:16:07818<dt class="hdlist1">
Junio C Hamanoab008762005-12-28 02:33:00819--tags
820</dt>
821<dd>
822<p>
823 Instead of using only the annotated tags, use any tag
Junio C Hamanoc14e6ad2014-10-31 20:25:53824 found in <code>refs/tags</code> namespace. This option enables matching
Junio C Hamano7d06a8a2008-10-20 05:42:33825 a lightweight (non-annotated) tag.
Junio C Hamanoab008762005-12-28 02:33:00826</p>
827</dd>
Junio C Hamano97bcb482010-11-25 03:16:07828<dt class="hdlist1">
Junio C Hamano5e284b42007-05-22 07:23:37829--contains
830</dt>
831<dd>
832<p>
833 Instead of finding the tag that predates the commit, find
834 the tag that comes after the commit, and thus contains it.
835 Automatically implies --tags.
836</p>
837</dd>
Junio C Hamano97bcb482010-11-25 03:16:07838<dt class="hdlist1">
Junio C Hamanoab008762005-12-28 02:33:00839--abbrev=&lt;n&gt;
840</dt>
841<dd>
842<p>
Junio C Hamano22bcc112009-01-24 08:05:18843 Instead of using the default 7 hexadecimal digits as the
Junio C Hamanoc21ab052009-10-31 04:03:55844 abbreviated object name, use &lt;n&gt; digits, or as many digits
845 as needed to form a unique object name. An &lt;n&gt; of 0
846 will suppress long format, only showing the closest tag.
Junio C Hamanoab008762005-12-28 02:33:00847</p>
848</dd>
Junio C Hamano97bcb482010-11-25 03:16:07849<dt class="hdlist1">
Junio C Hamanoedd2b0a2007-01-15 06:12:45850--candidates=&lt;n&gt;
851</dt>
852<dd>
853<p>
854 Instead of considering only the 10 most recent tags as
Junio C Hamanoe6f28d02013-09-17 21:34:00855 candidates to describe the input commit-ish consider
Junio C Hamanoedd2b0a2007-01-15 06:12:45856 up to &lt;n&gt; candidates. Increasing &lt;n&gt; above 10 will take
857 slightly longer but may produce a more accurate result.
Junio C Hamano24bc09a2008-02-28 00:27:44858 An &lt;n&gt; of 0 will cause only exact matches to be output.
859</p>
860</dd>
Junio C Hamano97bcb482010-11-25 03:16:07861<dt class="hdlist1">
Junio C Hamano24bc09a2008-02-28 00:27:44862--exact-match
863</dt>
864<dd>
865<p>
866 Only output exact matches (a tag directly references the
867 supplied commit). This is a synonym for --candidates=0.
Junio C Hamanoedd2b0a2007-01-15 06:12:45868</p>
869</dd>
Junio C Hamano97bcb482010-11-25 03:16:07870<dt class="hdlist1">
Junio C Hamanoedd2b0a2007-01-15 06:12:45871--debug
872</dt>
873<dd>
874<p>
875 Verbosely display information about the searching strategy
876 being employed to standard error. The tag name will still
877 be printed to standard out.
878</p>
879</dd>
Junio C Hamano97bcb482010-11-25 03:16:07880<dt class="hdlist1">
Junio C Hamano4f1d8c42008-03-03 02:01:16881--long
882</dt>
883<dd>
884<p>
885 Always output the long format (the tag, the number of commits
886 and the abbreviated commit name) even when it matches a tag.
887 This is useful when you want to see parts of the commit object name
888 in "describe" output, even when the commit in question happens to be
889 a tagged version. Instead of just emitting the tag name, it will
Junio C Hamanoc21ab052009-10-31 04:03:55890 describe such a commit as v1.2-0-gdeadbee (0th commit since tag v1.2
891 that points at object deadbee&#8230;.).
Junio C Hamano4f1d8c42008-03-03 02:01:16892</p>
893</dd>
Junio C Hamano97bcb482010-11-25 03:16:07894<dt class="hdlist1">
Junio C Hamano9c334152008-02-12 03:18:52895--match &lt;pattern&gt;
896</dt>
897<dd>
898<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:53899 Only consider tags matching the given <code>glob(7)</code> pattern,
Junio C Hamanoef75f372017-09-29 04:22:33900 excluding the "refs/tags/" prefix. If used with <code>--all</code>, it also
901 considers local branches and remote-tracking references matching the
902 pattern, excluding respectively "refs/heads/" and "refs/remotes/"
903 prefix; references of other types are never considered. If given
904 multiple times, a list of patterns will be accumulated, and tags
905 matching any of the patterns will be considered. Use <code>--no-match</code> to
906 clear and reset the list of patterns.
Junio C Hamanocbe0eb22017-02-27 23:37:49907</p>
908</dd>
909<dt class="hdlist1">
910--exclude &lt;pattern&gt;
911</dt>
912<dd>
913<p>
914 Do not consider tags matching the given <code>glob(7)</code> pattern, excluding
Junio C Hamanoef75f372017-09-29 04:22:33915 the "refs/tags/" prefix. If used with <code>--all</code>, it also does not consider
916 local branches and remote-tracking references matching the pattern,
917 excluding respectively "refs/heads/" and "refs/remotes/" prefix;
918 references of other types are never considered. If given multiple times,
919 a list of patterns will be accumulated and tags matching any of the
920 patterns will be excluded. When combined with --match a tag will be
921 considered when it matches at least one --match pattern and does not
Junio C Hamanocbe0eb22017-02-27 23:37:49922 match any of the --exclude patterns. Use <code>--no-exclude</code> to clear and
923 reset the list of patterns.
Junio C Hamano9c334152008-02-12 03:18:52924</p>
925</dd>
Junio C Hamano97bcb482010-11-25 03:16:07926<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47927--always
928</dt>
929<dd>
930<p>
931 Show uniquely abbreviated commit object as fallback.
932</p>
933</dd>
Junio C Hamano7e590a12013-06-02 23:46:52934<dt class="hdlist1">
935--first-parent
936</dt>
937<dd>
938<p>
939 Follow only the first parent commit upon seeing a merge commit.
940 This is useful when you wish to not match tags on branches merged
941 in the history of the target commit.
942</p>
943</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31944</dl></div>
Junio C Hamanoab008762005-12-28 02:33:00945</div>
Junio C Hamano9d971152012-12-19 00:43:11946</div>
947<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31948<h2 id="_examples">EXAMPLES</h2>
Junio C Hamanoab008762005-12-28 02:33:00949<div class="sectionbody">
Junio C Hamano97bcb482010-11-25 03:16:07950<div class="paragraph"><p>With something like git.git current tree, I get:</p></div>
Junio C Hamanoab008762005-12-28 02:33:00951<div class="literalblock">
952<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53953<pre><code>[torvalds@g5 git]$ git describe parent
954v1.0.4-14-g2414721</code></pre>
Junio C Hamanoab008762005-12-28 02:33:00955</div></div>
Junio C Hamano97bcb482010-11-25 03:16:07956<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:56957but since it has a few commits on top of that,
Junio C Hamanoa890c4f2007-01-28 10:29:21958describe has added the number of additional commits ("14") and
959an abbreviated object name for the commit itself ("2414721")
Junio C Hamanoba4b9282008-07-06 05:20:31960at the end.</p></div>
Junio C Hamano97bcb482010-11-25 03:16:07961<div class="paragraph"><p>The number of additional commits is the number
Junio C Hamanoa890c4f2007-01-28 10:29:21962of commits which would be displayed by "git log v1.0.4..parent".
Junio C Hamano2ba14712019-04-25 10:12:27963The hash suffix is "-g" + unambiguous abbreviation for the tip commit
Junio C Hamanoc14e6ad2014-10-31 20:25:53964of parent (which was <code>2414721b194453f058079d897d13c4e377f92dc6</code>).
Junio C Hamano31667362010-03-25 00:38:53965The "g" prefix stands for "git" and is used to allow describing the version of
966a software depending on the SCM the software is managed with. This is useful
967in an environment where people may use different SCMs.</p></div>
Junio C Hamano97bcb482010-11-25 03:16:07968<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:00969<div class="literalblock">
970<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53971<pre><code>[torvalds@g5 git]$ git describe v1.0.4
972v1.0.4</code></pre>
Junio C Hamanoab008762005-12-28 02:33:00973</div></div>
Junio C Hamano97bcb482010-11-25 03:16:07974<div class="paragraph"><p>With --all, the command can use branch heads as references, so
Junio C Hamanoba4b9282008-07-06 05:20:31975the output shows the reference path as well:</p></div>
Junio C Hamanoab008762005-12-28 02:33:00976<div class="literalblock">
977<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53978<pre><code>[torvalds@g5 git]$ git describe --all --abbrev=4 v1.0.5^2
979tags/v1.0.0-21-g975b</code></pre>
Junio C Hamanoab008762005-12-28 02:33:00980</div></div>
981<div class="literalblock">
982<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53983<pre><code>[torvalds@g5 git]$ git describe --all --abbrev=4 HEAD^
984heads/lt/describe-7-g975b</code></pre>
Junio C Hamanoa890c4f2007-01-28 10:29:21985</div></div>
Junio C Hamano97bcb482010-11-25 03:16:07986<div class="paragraph"><p>With --abbrev set to 0, the command can be used to find the
Junio C Hamanoba4b9282008-07-06 05:20:31987closest tagname without any suffix:</p></div>
Junio C Hamanoa890c4f2007-01-28 10:29:21988<div class="literalblock">
989<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53990<pre><code>[torvalds@g5 git]$ git describe --abbrev=0 v1.0.5^2
991tags/v1.0.0</code></pre>
Junio C Hamanoab008762005-12-28 02:33:00992</div></div>
Junio C Hamano97bcb482010-11-25 03:16:07993<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:43994longer than what Linus saw above when he ran these commands, as your
Junio C Hamano076ffcc2013-02-06 05:13:21995Git repository may have new commits whose object names begin with
Junio C Hamanoc21ab052009-10-31 04:03:55996975b that did not exist back then, and "-g975b" suffix alone may not
997be sufficient to disambiguate these commits.</p></div>
Junio C Hamanoab008762005-12-28 02:33:00998</div>
Junio C Hamano9d971152012-12-19 00:43:11999</div>
1000<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311001<h2 id="_search_strategy">SEARCH STRATEGY</h2>
Junio C Hamanoedd2b0a2007-01-15 06:12:451002<div class="sectionbody">
Junio C Hamanoe6f28d02013-09-17 21:34:001003<div class="paragraph"><p>For each commit-ish supplied, <em>git describe</em> will first look for
Junio C Hamanoedd2b0a2007-01-15 06:12:451004a tag which tags exactly that commit. Annotated tags will always
1005be preferred over lightweight tags, and tags with newer dates will
1006always be preferred over tags with older dates. If an exact match
Junio C Hamanoba4b9282008-07-06 05:20:311007is found, its name will be output and searching will stop.</p></div>
Junio C Hamano97bcb482010-11-25 03:16:071008<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:451009through the commit history to locate an ancestor commit which
Junio C Hamano97bcb482010-11-25 03:16:071010has been tagged. The ancestor&#8217;s tag will be output along with an
Junio C Hamano92d80372016-07-13 22:00:051011abbreviation of the input commit-ish&#8217;s SHA-1. If <code>--first-parent</code> was
Junio C Hamano7e590a12013-06-02 23:46:521012specified then the walk will only consider the first parent of each
1013commit.</p></div>
Junio C Hamano97bcb482010-11-25 03:16:071014<div class="paragraph"><p>If multiple tags were found during the walk then the tag which
Junio C Hamanoe6f28d02013-09-17 21:34:001015has the fewest commits different from the input commit-ish will be
Junio C Hamanoedd2b0a2007-01-15 06:12:451016selected and output. Here fewest commits different is defined as
Junio C Hamanoc14e6ad2014-10-31 20:25:531017the number of commits which would be shown by <code>git log tag..input</code>
Junio C Hamanoba4b9282008-07-06 05:20:311018will be the smallest number of commits possible.</p></div>
Junio C Hamanoedd2b0a2007-01-15 06:12:451019</div>
Junio C Hamano9d971152012-12-19 00:43:111020</div>
1021<div class="sect1">
Junio C Hamano68e72b72017-12-28 23:20:521022<h2 id="_bugs">BUGS</h2>
1023<div class="sectionbody">
1024<div class="paragraph"><p>Tree objects as well as tag objects not pointing at commits, cannot be described.
1025When describing blobs, the lightweight tags pointing at blobs are ignored,
1026but the blob is still described as &lt;committ-ish&gt;:&lt;path&gt; despite the lightweight
1027tag being favorable.</p></div>
1028</div>
1029</div>
1030<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311031<h2 id="_git">GIT</h2>
Junio C Hamanoab008762005-12-28 02:33:001032<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231033<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamanoab008762005-12-28 02:33:001034</div>
Junio C Hamano7bd050f2011-09-22 06:32:221035</div>
Junio C Hamano9d971152012-12-19 00:43:111036</div>
Junio C Hamano7bd050f2011-09-22 06:32:221037<div id="footnotes"><hr /></div>
Junio C Hamanoab008762005-12-28 02:33:001038<div id="footer">
1039<div id="footer-text">
Junio C Hamano2ef0ba32018-01-26 23:13:531040Last updated
Junio C Hamano7a46cd62020-03-15 21:57:101041 2020-03-10 08:03:13 PDT
Junio C Hamanoab008762005-12-28 02:33:001042</div>
1043</div>
1044</body>
1045</html>