MCPcopy Create free account
hub / github.com/microsoft/debugpy / render_git_describe

Function render_git_describe

versioneer.py:1592–1609  ·  view source on GitHub ↗

TAG[-DISTANCE-gHEX][-dirty]. Like 'git describe --tags --dirty --always'. Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix)

(pieces)

Source from the content-addressed store, hash-verified

1590
1591
1592def 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
1612def render_git_describe_long(pieces):

Callers 1

renderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…