From 3dce3d86d4104a12b8a985952116e6dc03d0c542 Mon Sep 17 00:00:00 2001 From: uid54289 <120799552+uid54289@users.noreply.github.com> Date: Tue, 23 May 2023 20:07:44 +0000 Subject: [PATCH] perf(installer): use a shallow clone of lunarvim (#4197) * perf(`utils/installer`): speed up lvim installation * feat(`utils/installer`): show progress during repo cloning * fest: longer timeout --------- Co-authored-by: LostNeophyte --- lua/lvim/utils/git.lua | 2 +- utils/installer/install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lvim/utils/git.lua b/lua/lvim/utils/git.lua index 46b45324..d5f1d921 100644 --- a/lua/lvim/utils/git.lua +++ b/lua/lvim/utils/git.lua @@ -21,7 +21,7 @@ local function git_cmd(opts) on_stderr = function(_, data) table.insert(stderr, data) end, - }):sync() + }):sync(10000) if not vim.tbl_isempty(stderr) then Log:debug(stderr) diff --git a/utils/installer/install.sh b/utils/installer/install.sh index da6c4ecb..6e27d7c0 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -392,7 +392,7 @@ function verify_lvim_dirs() { function clone_lvim() { msg "Cloning LunarVim configuration" - if ! git clone --branch "$LV_BRANCH" \ + if ! git clone --progress --depth 1 --branch "$LV_BRANCH" \ "https://github.com/${LV_REMOTE}" "$LUNARVIM_BASE_DIR"; then echo "Failed to clone repository. Installation failed." exit 1