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. Change-Id: I166563cb6e84dd5af38e11b2f69189bbf6befd0e Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
bf4d1c1677
commit
9e269c347e
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user