X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fgerrit-fetch-dependencies.sh;h=55c0cf1c9868edf04aa4d07037a7761a1cb35247;hb=841f374326218a5aaa52ab711ccd18f0aeea32b9;hp=99a71f021ce637bf01a162ba3ca6b30494095df7;hpb=7b76f3eba41881e26089e33b0118416d01643fe7;p=releng%2Fglobal-jjb.git diff --git a/shell/gerrit-fetch-dependencies.sh b/shell/gerrit-fetch-dependencies.sh index 99a71f02..55c0cf1c 100644 --- a/shell/gerrit-fetch-dependencies.sh +++ b/shell/gerrit-fetch-dependencies.sh @@ -41,6 +41,11 @@ for patch in $(echo "${PATCHES[@]}"); do project=$(echo "$json" | jq -r '.project') branch=$(echo "$json" | jq -r '.branch') + if [ "$GERRIT_CHANGE_NUMBER" == "$patch" ]; then + echo "WARN: GERRIT_CHANGE and $patch are one and the same. Ignoring patch..." + continue + fi + if [ ! -d "$REPOS_DIR/$project" ]; then git clone -q --depth 1 -b "$branch" "$GIT_URL/$project" "$REPOS_DIR/$project"