tools: Add check for uncommitted files to PR review scripts.

This commit is contained in:
Rishi Gupta 2017-04-11 19:07:17 -07:00 committed by Tim Abbott
parent ffa654f780
commit 44502da767
2 changed files with 10 additions and 0 deletions

View File

@ -2,6 +2,11 @@
set -e
set -x
if ! git diff-index --quiet HEAD; then
set +x
echo "There are uncommitted files. Exiting."
exit 1
fi
request_id="$1"
remote=${2:-"upstream"}
git fetch "$remote" "pull/$request_id/head"

View File

@ -2,6 +2,11 @@
set -e
set -x
if ! git diff-index --quiet HEAD; then
set +x
echo "There are uncommitted files. Exiting."
exit 1
fi
request_id="$1"
remote=${2:-"upstream"}
git fetch "$remote" "pull/$request_id/head"