Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Check for unpushed commits only on the current branch

Steve Roweed893b3d7ab1
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 6652631fa8d..1f4837a5c66 100644
--- a/dev-tools/scripts/buildAndPushRelease.py
+++ b/dev-tools/scripts/buildAndPushRelease.py
@@ -61,7 +61,8 @@ 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)
- unpushedCommits = os.popen('git log origin..').read().strip()
+ branch = os.popen('git rev-parse --abbrev-ref HEAD')
+ 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)