check for uncommited work before executing a nextchange

Change-Id: I12b03bb778da712cfe48543949d9634be5221419
This commit is contained in:
Bjoern Michaelsen
2012-07-10 12:40:01 +02:00
parent 4fb8a68b0b
commit 689defb4ad

View File

@@ -73,6 +73,12 @@ case "$1" in
git push $GERRITURL HEAD:refs/for/$BRANCH
;;
nextchange)
if test -n "`git status -s -uno`"
then
echo "You have uncommited changes. Please commit or stash these:"
git status
exit 1
fi
CHANGEID=`git log --format=format:%b -1 HEAD|grep Change-Id|cut -d: -f2|tr -d \ `
if test -z "$CHANGEID"
then