From c6161b35f9c825c8802a00f6d816bae105897963 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 26 Mar 2014 09:44:19 -0400 Subject: [PATCH] use describe --all to always get a description --- morituri/common/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/morituri/common/common.py b/morituri/common/common.py index 1a30eaf..76efeea 100644 --- a/morituri/common/common.py +++ b/morituri/common/common.py @@ -351,14 +351,15 @@ def getRevision(): # which may be higher than your current source tree if os.path.exists(os.path.join(topsrcdir, '.git')): - status, describe = commands.getstatusoutput('git describe') + # always falls back to the current commit hash if no tags are found + status, describe = commands.getstatusoutput('git describe --all') if status == 0: if commands.getoutput('git diff-index --name-only HEAD --'): describe += '-modified' return describe - # check for a top-level REIVISION file + # check for a top-level REVISION file path = os.path.join(topsrcdir, 'REVISION') if os.path.exists(path): revision = open(path).read().strip()