git tools: Make error messages more clear.

This commit is contained in:
Tim Abbott 2017-05-08 10:51:59 -07:00
parent d63fdf5bc6
commit abd09cebb2
2 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,9 @@ set -x
if ! git diff-index --quiet HEAD; then if ! git diff-index --quiet HEAD; then
set +x set +x
echo "There are uncommitted files. Exiting." echo "There are uncommitted changes:"
git status --short
echo "Doing nothing to avoid losing your work."
exit 1 exit 1
fi fi
request_id="$1" request_id="$1"

View File

@ -4,7 +4,9 @@ set -x
if ! git diff-index --quiet HEAD; then if ! git diff-index --quiet HEAD; then
set +x set +x
echo "There are uncommitted files. Exiting." echo "There are uncommitted changes:"
git status --short
echo "Doing nothing to avoid losing your work."
exit 1 exit 1
fi fi
request_id="$1" request_id="$1"