summaryrefslogtreecommitdiff
path: root/ezbench.sh
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-07-19 19:19:51 +0100
committerMartin Peres <martin.peres@linux.intel.com>2015-07-20 11:53:01 +0300
commit6ed9dea37f98cf11e30696844fdf5d5b03107cba (patch)
tree6661dfba99b29c7da8d6aaa4437d3af374a02cb1 /ezbench.sh
parentafe14acf98fd76db0f203b6131240622061d41d3 (diff)
Abort if we fail to stash the current dirty state
We never want to lose work-in-progress, so abort if we cannot stash it away.
Diffstat (limited to 'ezbench.sh')
-rwxr-xr-xezbench.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/ezbench.sh b/ezbench.sh
index f776e06..a359bd3 100755
--- a/ezbench.sh
+++ b/ezbench.sh
@@ -115,6 +115,11 @@ echo "Original commit = $commit_head"
# Preserve any local modifications
stash=`git stash create`
+if [ $? -ne 0 ]
+then
+ echo "ERROR: Unable to preserve dirty state in '$gitRepoDir'. Aborting..."
+ exit 1
+fi
[ -n "$stash" ] && echo "Preserving work-in-progress"
# function to call on exit