LUCENE-6938: fix buggy detection of dirty git checkout

This commit is contained in:
Mike McCandless 2016-02-11 09:59:13 -05:00
parent 3291678723
commit e3a06f0334
1 changed files with 2 additions and 4 deletions

View File

@ -59,10 +59,8 @@ def runAndSendGPGPassword(command, password):
def getGitRev():
status = os.popen('git status').read().strip()
if 'Your branch is up-to-date' not in status:
raise RuntimeError('git clone has local changes:\n\n%s' % status)
if 'Untracked files' in status:
raise RuntimeError('there are untracked files; please run git clean -xfd:\n\n%s' % status)
if 'nothing to commit, working directory clean' not in status:
raise RuntimeError('git clone is dirty:\n\n%s' % status)
return os.popen('git rev-parse HEAD').read().strip()