Default clone_repo to master if branch not found

Behavior change from set -e causes attempt to checkout an invalid
branch to fail. Explicitly fall back to master if the requested
branch name checkout fails.

Change-Id: I5d1f6a997375743bb3498e7fae1fbad19c307d33
This commit is contained in:
Sean McGinnis
2017-10-20 06:14:09 -05:00
parent feb0fdabca
commit 2d2efc4f73

View File

@@ -169,6 +169,6 @@ else
# directory already existed we might have checked out something else
# before so just do it again).
(cd $local_dir &&
git checkout $BRANCH &&
(git checkout $BRANCH || git checkout master) &&
git pull --ff-only)
fi