summaryrefslogtreecommitdiff
path: root/logerrit
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-07-10 12:40:01 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-07-10 13:33:05 +0200
commit689defb4ad5582fbcfc2d3d57e321e31b10a16b9 (patch)
tree623f0d4f665cd3e567440cc142c47ee42ae96d10 /logerrit
parent4fb8a68b0b70243b9c272764cd4762ad5ebf4054 (diff)
check for uncommited work before executing a nextchange
Change-Id: I12b03bb778da712cfe48543949d9634be5221419
Diffstat (limited to 'logerrit')
-rwxr-xr-xlogerrit6
1 files changed, 6 insertions, 0 deletions
diff --git a/logerrit b/logerrit
index e5b2ba5bc088..05346d96e00f 100755
--- a/logerrit
+++ b/logerrit
@@ -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