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: Ib20a4910275126fc3949b06dbc91a301c2d04406
This commit is contained in:
Sean McGinnis 2017-10-20 06:19:15 -05:00
parent 98e85fb012
commit d43b8ccede
1 changed files with 1 additions and 1 deletions

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