TAG[-DISTANCE-gHEX][-dirty]. Like 'git describe --tags --dirty --always'. Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix)
(pieces)
| 1598 | |
| 1599 | |
| 1600 | def render_git_describe(pieces): |
| 1601 | """TAG[-DISTANCE-gHEX][-dirty]. |
| 1602 | |
| 1603 | Like 'git describe --tags --dirty --always'. |
| 1604 | |
| 1605 | Exceptions: |
| 1606 | 1: no tags. HEX[-dirty] (note: no 'g' prefix) |
| 1607 | """ |
| 1608 | if pieces["closest-tag"]: |
| 1609 | rendered = pieces["closest-tag"] |
| 1610 | if pieces["distance"]: |
| 1611 | rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) |
| 1612 | else: |
| 1613 | # exception #1 |
| 1614 | rendered = pieces["short"] |
| 1615 | if pieces["dirty"]: |
| 1616 | rendered += "-dirty" |
| 1617 | return rendered |
| 1618 | |
| 1619 | |
| 1620 | def render_git_describe_long(pieces): |
no outgoing calls
no test coverage detected
searching dependent graphs…