From abd09cebb22a8e3a9c3e38af6415eb64bc39d69f Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 8 May 2017 10:51:59 -0700 Subject: [PATCH] git tools: Make error messages more clear. --- tools/fetch-rebase-pull-request | 4 +++- tools/reset-to-pull-request | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/fetch-rebase-pull-request b/tools/fetch-rebase-pull-request index fc8b4bfb05..ab3fec34f6 100755 --- a/tools/fetch-rebase-pull-request +++ b/tools/fetch-rebase-pull-request @@ -4,7 +4,9 @@ set -x if ! git diff-index --quiet HEAD; then 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 fi request_id="$1" diff --git a/tools/reset-to-pull-request b/tools/reset-to-pull-request index 6b98843ccb..405a9927be 100755 --- a/tools/reset-to-pull-request +++ b/tools/reset-to-pull-request @@ -4,7 +4,9 @@ set -x if ! git diff-index --quiet HEAD; then 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 fi request_id="$1"