From 15dfccf81ee7e78836d4f65f9a81eb400b0f1b08 Mon Sep 17 00:00:00 2001 From: jdhao Date: Tue, 8 Feb 2022 13:08:16 +0800 Subject: [PATCH] [breaking change] remove direct reference to fastgit fastgit may be blocked by GFW (see https://t.me/fastgitchannel/81), so hard-coding its URL is not a good option. Using git URL rewrite feature is a better choice: https://jdhao.github.io/2021/11/27/git_notes_s4/#use-a-git-mirror-site-for-cloning. This is a breaking change, since previously I use hub.fastgit.org as the url, now the url will be default github.com unless the user change it using the above mentioned method to change the cloning URL. --- docs/nvim_setup_linux.sh | 8 ++++---- lua/plugins.lua | 12 +----------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/docs/nvim_setup_linux.sh b/docs/nvim_setup_linux.sh index 6a9a6d2..1f39cc2 100755 --- a/docs/nvim_setup_linux.sh +++ b/docs/nvim_setup_linux.sh @@ -125,7 +125,7 @@ fi ####################################################################### RIPGREP_DIR=$HOME/tools/ripgrep RIPGREP_SRC_NAME=$HOME/packages/ripgrep.tar.gz -RIPGREP_LINK="https://hub.fastgit.org/BurntSushi/ripgrep/releases/download/12.0.0/ripgrep-12.0.0-x86_64-unknown-linux-musl.tar.gz" +RIPGREP_LINK="https://github.com/BurntSushi/ripgrep/releases/download/12.0.0/ripgrep-12.0.0-x86_64-unknown-linux-musl.tar.gz" if [[ -z "$(command -v rg)" ]] && [[ ! -f "$RIPGREP_DIR/rg" ]]; then echo "Install ripgrep" if [[ ! -f $RIPGREP_SRC_NAME ]]; then @@ -163,7 +163,7 @@ fi ####################################################################### CTAGS_SRC_DIR=$HOME/packages/ctags CTAGS_DIR=$HOME/tools/ctags -CTAGS_LINK="https://hub.fastgit.org/universal-ctags/ctags.git" +CTAGS_LINK="https://github.com/universal-ctags/ctags.git" if [[ ! -f "$CTAGS_DIR/bin/ctags" ]]; then echo "Install ctags" @@ -219,10 +219,10 @@ if [[ -d "$NVIM_CONFIG_DIR" ]]; then mv "$NVIM_CONFIG_DIR" "$NVIM_CONFIG_DIR.backup" fi -git clone --depth=1 https://hub.fastgit.org/jdhao/nvim-config.git "$NVIM_CONFIG_DIR" +git clone --depth=1 https://github.com/jdhao/nvim-config.git "$NVIM_CONFIG_DIR" echo "Installing packer.nvim" -git clone --depth=1 https://hub.fastgit.org/wbthomason/packer.nvim \ +git clone --depth=1 https://github.com/wbthomason/packer.nvim \ ~/.local/share/nvim/site/pack/packer/opt/packer.nvim echo "Installing nvim plugins, please wait" diff --git a/lua/plugins.lua b/lua/plugins.lua index 9b41deb..cc7b8a1 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -4,14 +4,7 @@ local fn = vim.fn vim.g.package_home = fn.stdpath("data") .. "/site/pack/packer/" local packer_install_dir = vim.g.package_home .. "/opt/packer.nvim" -local plug_url_format = "" -if vim.g.is_linux then - plug_url_format = "https://hub.fastgit.org/%s" -else - plug_url_format = "https://github.com/%s" -end - -local packer_repo = string.format(plug_url_format, "wbthomason/packer.nvim") +local packer_repo = "https://github.com/wbthomason/packer.nvim" local install_cmd = string.format("10split |term git clone --depth=1 %s %s", packer_repo, packer_install_dir) -- Auto-install packer in case it hasn't been installed. @@ -365,9 +358,6 @@ require("packer").startup({ config = { max_jobs = 16, compile_path = util.join_paths(vim.fn.stdpath('config'), 'lua', 'packer_compiled.lua'), - git = { - default_url_format = plug_url_format, - }, }, })