GIT_URL variable corruption in script
[releng/global-jjb.git] / shell / gerrit-fetch-dependencies.sh
index 99a71f0..55c0cf1 100644 (file)
@@ -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"