Browse Source

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 <lostneophyte@tuta.io>
uid54289 2 năm trước cách đây
mục cha
commit
3dce3d86d4
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      lua/lvim/utils/git.lua
  2. 1 1
      utils/installer/install.sh

+ 1 - 1
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)

+ 1 - 1
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