Skip to content

Apache Lucene open-source search software

LUCENE-6938: fix buggy detection of dirty git checkout

Mike McCandlessde9d4ac3b737
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 68671a2c076..c735621719d 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -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()