MCPcopy Create free account
hub / github.com/shapely/shapely / render_git_describe

Function render_git_describe

shapely/_version.py:562–579  ·  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

560
561
562def render_git_describe(pieces):
563 """TAG[-DISTANCE-gHEX][-dirty].
564
565 Like 'git describe --tags --dirty --always'.
566
567 Exceptions:
568 1: no tags. HEX[-dirty] (note: no 'g' prefix)
569 """
570 if pieces["closest-tag"]:
571 rendered = pieces["closest-tag"]
572 if pieces["distance"]:
573 rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
574 else:
575 # exception #1
576 rendered = pieces["short"]
577 if pieces["dirty"]:
578 rendered += "-dirty"
579 return rendered
580
581
582def 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…