TAG[-DISTANCE-gHEX][-dirty]. Like 'git describe --tags --dirty --always'. Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix)
(pieces)
| 536 | |
| 537 | |
| 538 | def render_git_describe(pieces): |
| 539 | """TAG[-DISTANCE-gHEX][-dirty]. |
| 540 | |
| 541 | Like 'git describe --tags --dirty --always'. |
| 542 | |
| 543 | Exceptions: |
| 544 | 1: no tags. HEX[-dirty] (note: no 'g' prefix) |
| 545 | """ |
| 546 | if pieces["closest-tag"]: |
| 547 | rendered = pieces["closest-tag"] |
| 548 | if pieces["distance"]: |
| 549 | rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) |
| 550 | else: |
| 551 | # exception #1 |
| 552 | rendered = pieces["short"] |
| 553 | if pieces["dirty"]: |
| 554 | rendered += "-dirty" |
| 555 | return rendered |
| 556 | |
| 557 | |
| 558 | def render_git_describe_long(pieces): |
no outgoing calls
no test coverage detected
searching dependent graphs…