Add ERROR_ON_CLONE.

This lets the user assert that stack.sh should never need to clone
any git repositories.  If set to True, and devstack does need to
clone a git repo, stack.sh will exit with an error.

This is useful in testing environments to make sure that the correct
code is being tested instead of silently falling back on cloning
from the public repos.

Change-Id: Ic0312ab4df492c5cf2e04c08aa7669a81736daa6
diff --git a/stack.sh b/stack.sh
index 3bb19bc..f11b5e2 100755
--- a/stack.sh
+++ b/stack.sh
@@ -214,6 +214,11 @@
 # prerequisites and initialize ``$DEST``.
 OFFLINE=`trueorfalse False $OFFLINE`
 
+# Set True to configure ``stack.sh`` to exit with an error code if it is asked
+# to clone any git repositories.  If devstack is used in a testing environment,
+# this may be used to ensure that the correct code is being tested.
+ERROR_ON_CLONE=`trueorfalse False $ERROR_ON_CLONE`
+
 # Destination path for service data
 DATA_DIR=${DATA_DIR:-${DEST}/data}
 sudo mkdir -p $DATA_DIR