From 78ce96478d8b3b944b7a0a0fbddcccb3c06bc1d6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 10 Jun 2024 21:51:24 +0800 Subject: [PATCH] perf(install): clone repo with --depth 1 --- docs/cn/install.cmd | 2 +- docs/cn/install.sh | 4 ++-- docs/install.cmd | 2 +- docs/install.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/cn/install.cmd b/docs/cn/install.cmd index 4e26cc89f..2727f9b37 100644 --- a/docs/cn/install.cmd +++ b/docs/cn/install.cmd @@ -82,7 +82,7 @@ echo "" if (!(Test-Path "$HOME\.SpaceVim")) { echo "==> 正在安装 $app_name" - git clone $repo_url $repo_path + git clone --depth 1 $repo_url $repo_path } else { echo "==> 正在更新 $app_name" Push-Location $repo_path diff --git a/docs/cn/install.sh b/docs/cn/install.sh index a3de82464..e5ee44ffc 100755 --- a/docs/cn/install.sh +++ b/docs/cn/install.sh @@ -138,7 +138,7 @@ fetch_repo () { success "SpaceVim 鏇存柊宸插畬鎴" else info "姝e湪瀹夎 SpaceVim..." - git clone https://spacevim.org/git/repos/SpaceVim/ "$HOME/.SpaceVim" + git clone --depth 1 https://spacevim.org/git/repos/SpaceVim/ "$HOME/.SpaceVim" success "SpaceVim 瀹夎宸插畬鎴" fi } @@ -171,7 +171,7 @@ install_vim () { install_package_manager () { if [[ ! -d "$HOME/.cache/vimfiles/repos/github.com/Shougo/dein.vim" ]]; then info "姝e湪瀹夎 dein.vim" - git clone https://github.com/Shougo/dein.vim.git $HOME/.cache/vimfiles/repos/github.com/Shougo/dein.vim + git clone --depth 1 https://github.com/Shougo/dein.vim.git $HOME/.cache/vimfiles/repos/github.com/Shougo/dein.vim success "dein.vim 瀹夎宸插畬鎴" fi } diff --git a/docs/install.cmd b/docs/install.cmd index 81174173b..48b6479a4 100644 --- a/docs/install.cmd +++ b/docs/install.cmd @@ -78,7 +78,7 @@ sleep 1 if (!(Test-Path $HOME\.SpaceVim)) { echo "==> Trying to clone $app_name" - git clone $repo_url $repo_path + git clone --depth 1 $repo_url $repo_path echo "<== $app_name cloned" } else { echo "==> Trying to update $app_name" diff --git a/docs/install.sh b/docs/install.sh index 5ae6478ec..c75c5e5ec 100755 --- a/docs/install.sh +++ b/docs/install.sh @@ -143,7 +143,7 @@ fetch_repo () { success "Successfully update SpaceVim" else info "Trying to clone SpaceVim" - git clone https://spacevim.org/git/repos/SpaceVim/ "${XDGSpaceDir:-}" + git clone --depth 1 https://spacevim.org/git/repos/SpaceVim/ "${XDGSpaceDir:-}" if [ $? -eq 0 ]; then success "Successfully clone SpaceVim" else