Fix current branch detection

This commit is contained in:
Steve Rowe 2016-05-23 15:44:11 -04:00
parent b4cc5a56fc
commit 8412026265
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ def getGitRev():
status = os.popen('git status').read().strip()
if 'nothing to commit, working directory clean' not in status:
raise RuntimeError('git clone is dirty:\n\n%s' % status)
branch = os.popen('git rev-parse --abbrev-ref HEAD')
branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
unpushedCommits = os.popen('git log origin/%s..' % branch).read().strip()
if len(unpushedCommits) > 0:
raise RuntimeError('There are unpushed commits - "git log origin.." output is:\n\n%s' % unpushedCommits)