improve error handling of clone_repo
Do not explicitly return 0 at the end of the function in case set -e
doesn't work inside the function the way we expect.
Use git -C instead of a subshell.
Remove an unused variable.
@@ -115,7 +115,6 @@ requirements repository is branched to merge the patch."
function clone_repo {
typeset repo="$1"
typeset branch="$2"
- typeset zc
set -e
@@ -130,7 +129,5 @@ function clone_repo {
# We assume the job uses a git_config task to configure git
# properly.
- (cd $repo && git review -s -v)
-
- return 0
+ git -C $repo review -s -v
}
