From 2edce054a90423ea47e9eae90e09f970cc90c50d Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Wed, 20 Oct 2021 19:06:45 +0800 Subject: [PATCH] chore: Remove checkout-pr-branch.sh for useless (#28900) --- checkout-pr-branch.sh | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100755 checkout-pr-branch.sh diff --git a/checkout-pr-branch.sh b/checkout-pr-branch.sh deleted file mode 100755 index 79d1247a7a..0000000000 --- a/checkout-pr-branch.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2019 PingCAP, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script is used to checkout a TiDB PR branch in a forked repo. -if test -z $1; then - echo -e "Usage:\n" - echo -e "\tcheckout-pr-branch.sh [github-username]:[pr-branch]\n" - echo -e "The argument can be copied directly from github PR page." - echo -e "The local branch name would be [github-username]/[pr-branch]." - exit 0; -fi - -username=$(echo $1 | cut -d':' -f1) -branch=$(echo $1 | cut -d':' -f2) -local_branch=$username/$branch -fork="https://github.com/$username/tidb" - -exists=`git show-ref refs/heads/$local_branch` -if [ -n "$exists" ]; then - git checkout $local_branch - git pull $fork $branch:$local_branch -else - git fetch $fork $branch:$local_branch - git checkout $local_branch -fi