release-scripts: Remove misleading error message

In the normal course of script execution, clone_repo.sh routinely logs
the following error message:

error: pathspec 'xxx' did not match any file(s) known to git

This error can be safely ignored, as the script moves on to checking out
master instead. But it can be (and has been) mistakenly interpreted as
the reason why the script fails.

This change avoids logging the error message and logs a clearer
explanation instead.

Change-Id: Iaaaed7b0ea343bd81b8ad898654658545942a3d0
This commit is contained in:
Thierry Carrez 2021-01-05 15:25:03 +01:00
parent e8273da9e8
commit 885330b8e7
1 changed files with 3 additions and 2 deletions

View File

@ -194,6 +194,7 @@ 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 master) &&
retry git pull --ff-only)
(git checkout $BRANCH 2>/dev/null ||
(echo "No $BRANCH, checking out master"; git checkout master)) &&
retry git pull --ff-only)
fi