Set the length of the revision ID to be output from rev-parse

This commit is contained in:
Robin Dunn
2018-04-30 23:03:08 -07:00
parent 156fece679
commit a62f26450d

View File

@@ -770,7 +770,7 @@ def getVcsRev():
def _getGitRevision():
try:
revcount = runcmd('git rev-list --count HEAD', getOutput=True, echoCmd=False)
revhash = runcmd('git rev-parse --short HEAD', getOutput=True, echoCmd=False)
revhash = runcmd('git rev-parse --short=8 HEAD', getOutput=True, echoCmd=False)
except:
return None
return "{}+{}".format(revcount, revhash)