1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-19 15:53:42 +08:00

perf(install): fetch tags by default

close https://github.com/wsdjeg/SpaceVim/issues/4955
This commit is contained in:
Eric Wong 2025-01-31 11:19:31 +08:00
parent b665b9a2de
commit 3a6ae589ca
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848
2 changed files with 11 additions and 2 deletions

View File

@ -138,7 +138,9 @@ fetch_repo () {
success "SpaceVim 更新已完成" success "SpaceVim 更新已完成"
else else
info "正在安装 SpaceVim..." info "正在安装 SpaceVim..."
git clone --depth 1 https://github.com/SpaceVim/SpaceVim.git "$HOME/.SpaceVim" git clone --depth 1 https://github.com/wsdjeg/SpaceVim.git "$HOME/.SpaceVim"
cd "$HOME/.SpaceVim"
git fetch --tags
success "SpaceVim 安装已完成" success "SpaceVim 安装已完成"
fi fi
} }

View File

@ -139,11 +139,18 @@ fetch_repo () {
( (
cd "${XDGSpaceDir:?}" cd "${XDGSpaceDir:?}"
git pull git pull
git fetch --tags
) )
success "Successfully update SpaceVim" success "Successfully update SpaceVim"
else else
info "Trying to clone SpaceVim" info "Trying to clone SpaceVim"
git clone --depth 1 https://github.com/SpaceVim/SpaceVim.git "${XDGSpaceDir:-}" git clone --depth 1 https://github.com/wsdjeg/SpaceVim.git "${XDGSpaceDir:-}"
info "fetch spacevim tags"
(
cd "${XDGSpaceDir:?}"
git fetch --tags
)
success "fetch tags done"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
success "Successfully clone SpaceVim" success "Successfully clone SpaceVim"
else else