# GERRIT_TOPIC is the rest of the refspec after GERRIT_BRANCH when the topic
# is set for the change.
if [ -z "${GERRIT_TOPIC:-}" ] ; then
- refspec="$commit_hash:refs/for/$GERRIT_BRANCH"
+ refspec="${commit_hash}:refs/for/${GERRIT_BRANCH}"
else
- refspec="$commit_hash:refs/for/$GERRIT_BRANCH/$GERRIT_TOPIC"
+ refspec="${commit_hash}:refs/for/${GERRIT_BRANCH}%topic=${GERRIT_TOPIC}"
fi
echo >&2 "Pushing to OpenDev"
# do not fail if git push fails as in case of no new changes we want to succeed. See below.
set +o pipefail
-git push "$opendev_remote_url" "$refspec" 2>&1 | tee push_result.txt
+git push --no-thin "$opendev_remote_url" "$refspec" 2>&1 | tee push_result.txt
push_result=${PIPESTATUS[0]}
# make the job a success if the above git push fails due to no new changes are needed