Commit 9c66f02e authored by Julien Muchembled's avatar Julien Muchembled

Fix startup from working copy when Git is too old

parent ca81c6d3
......@@ -17,7 +17,10 @@ dirty = _git_call("diff-index", "--quiet", "HEAD", "--")
if dirty not in (0, 1):
raise _S.CalledProcessError(dirty, "git")
revision = int(_git_output("rev-list", "--topo-order", "--count", "HEAD"))
revision = int(_git_output("rev-list", "--count", "HEAD"))
except _S.CalledProcessError: # BBB: Git too old
revision = len(_git_output("rev-list", "HEAD").split())
short = _git_output("rev-parse", "--short", "HEAD")
version = "0-%s.g%s" % (revision, short)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment