From d09b586ecee2c178882c917546d6d6cb6600fa85 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Mon, 6 May 2013 14:54:41 +0300 Subject: Don't start merging if there are uncommitted changes Change-Id: Ic1211e914162be6910caae10fcfc7deebc5b4ad3 --- scripts/automerge7.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/automerge7.sh b/scripts/automerge7.sh index 524b0ff912..ea83b2e52c 100755 --- a/scripts/automerge7.sh +++ b/scripts/automerge7.sh @@ -67,6 +67,14 @@ maybe_commit_and_push() { pushMerged } +nothingToCommit=`git status | grep "nothing to commit"` +if [ "$nothingToCommit" == "" ] +then + git status + echo "Can not merge when there are unstaged changes." + exit 1; +fi + git checkout $TO git fetch -- cgit v1.2.3