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