From a62f26450de98dd917b9e97faca8c6860823d705 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 30 Apr 2018 23:03:08 -0700 Subject: [PATCH] Set the length of the revision ID to be output from rev-parse --- buildtools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildtools/config.py b/buildtools/config.py index e8e968aa..cb74c9fd 100644 --- a/buildtools/config.py +++ b/buildtools/config.py @@ -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)