From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7840) id 631593858003; Thu, 7 Oct 2021 01:20:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 631593858003 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Eugene Rozenfeld To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/microsoft/heads/main)] More fixes X-Act-Checkin: gcc X-Git-Author: Victor Tong X-Git-Refname: refs/vendors/microsoft/heads/main X-Git-Oldrev: 0b06e2be26be9f70fb6a082cf04aae47a36d3c3f X-Git-Newrev: f6fac44b0c0a64f2ab871ace54e4316e19da3f16 Message-Id: <20211007012042.631593858003@sourceware.org> Date: Thu, 7 Oct 2021 01:20:42 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2021 01:20:42 -0000 https://gcc.gnu.org/g:f6fac44b0c0a64f2ab871ace54e4316e19da3f16 commit f6fac44b0c0a64f2ab871ace54e4316e19da3f16 Author: Victor Tong Date: Wed Oct 6 14:37:57 2021 -0700 More fixes Diff: --- .github/scripts/init.sh | 6 ++++-- .github/scripts/pushMergedVendorBranch.sh | 10 ++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/scripts/init.sh b/.github/scripts/init.sh index 6d8d760ef5e..4a218b23f91 100644 --- a/.github/scripts/init.sh +++ b/.github/scripts/init.sh @@ -28,9 +28,11 @@ if test $? != 0; then echo "Adding gcc upstream remote" git remote add gcc git://gcc.gnu.org/git/gcc.git else - # Check to make sure the gcc remote URL is the one we're expecting + # Check if the URL ends with gcc.gnu.org. We don't check for a string explicitly + # since some devs may use ssh or other means to connect to the remote gccUrl="$(git config remote.gcc.url)" - if [[ $gccUrl != "git://gcc.gnu.org/git/gcc.git" ]]; then + + if [[ "$gccUrl" != *"gcc.gnu.org/git/gcc.git" ]]; then echo "ERROR: gcc upstream remote was found but it's not pointing to git://gcc.gnu.org/git/gcc.git. Please delete the local gcc upstream remote before running init again" exit -1 fi diff --git a/.github/scripts/pushMergedVendorBranch.sh b/.github/scripts/pushMergedVendorBranch.sh index 38ed145c0cd..6ba26f73e97 100644 --- a/.github/scripts/pushMergedVendorBranch.sh +++ b/.github/scripts/pushMergedVendorBranch.sh @@ -33,6 +33,11 @@ if test $? != 0; then exit -1 fi +if [[ `git status --porcelain` ]]; then + echo "ERROR: You have local changes in your repository. Please stash or push them to a branch before running this script" + exit -1 +fi + echo " ---- READ THIS ---- When prompted for the 'local name for upstream repository', @@ -41,11 +46,12 @@ enter 'gcc'. The other fields can be the default " ${BASEDIR}/../../contrib/gcc-git-customization.sh -${BASEDIR}/../../contrib/git-fetch-vendor.sh microsoft +${BASEDIR}/../../contrib/git-fetch-vendor.sh --enable-push microsoft git fetch git fetch gcc git fetch origin git fetch vendors/microsoft git checkout -b $1 remotes/vendors/microsoft/main git merge origin/$2 -git push remotes/vendors/microsoft/main +git push vendors/microsoft microsoft/main +