Repository: mesos Updated Branches: refs/heads/master 94d5c3a8d -> b99ca4d73
Add safety check for staged but uncommitted changes Review: https://reviews.apache.org/r/32906 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b99ca4d7 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b99ca4d7 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b99ca4d7 Branch: refs/heads/master Commit: b99ca4d7364cd0cb9191193e01487e2d5850f274 Parents: 94d5c3a Author: Paul Brett <[email protected]> Authored: Tue Apr 7 10:20:32 2015 -0700 Committer: Ian Downes <[email protected]> Committed: Tue Apr 7 10:20:33 2015 -0700 ---------------------------------------------------------------------- support/post-reviews.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/b99ca4d7/support/post-reviews.py ---------------------------------------------------------------------- diff --git a/support/post-reviews.py b/support/post-reviews.py index 2b6c479..2ae9a95 100755 --- a/support/post-reviews.py +++ b/support/post-reviews.py @@ -74,13 +74,20 @@ else: print 'Please install RBTools before proceeding' sys.exit(1) -# Don't do anything if people have uncommitted changes. +# Don't do anything if people have unstaged changes. diff_stat = execute(['git', 'diff', '--shortstat']).strip() if diff_stat: print 'Please commit or stash any changes before using post-reviews!' sys.exit(1) +# Don't do anything if people have uncommitted changes. +diff_stat = execute(['git', 'diff', '--shortstat', '--staged']).strip() + +if diff_stat: + print 'Please commit staged changes before using post-reviews!' + sys.exit(1) + top_level_dir = execute(['git', 'rev-parse', '--show-toplevel']).strip() repository = 'git://git.apache.org/mesos.git'
