mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 07:09:23 +02:00
feat: lock nvim <0.7 to a specific tag (#2491)
This commit is contained in:
parent
1ae89bee93
commit
3d841425ae
3 changed files with 34 additions and 5 deletions
|
@ -72,6 +72,8 @@ function M.update_base_lvim()
|
|||
Log:error "Update failed! Please pull the changes manually instead."
|
||||
return
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
---Switch Lunarvim to the specified development branch
|
||||
|
@ -80,11 +82,19 @@ function M.switch_lvim_branch(branch)
|
|||
if not safe_deep_fetch() then
|
||||
return
|
||||
end
|
||||
local ret = git_cmd { args = { "switch", branch } }
|
||||
local args = { "switch", branch }
|
||||
|
||||
if branch:match "^[0-9]" then
|
||||
-- avoids producing an error for tags
|
||||
vim.list_extend(args, { "--detach" })
|
||||
end
|
||||
|
||||
local ret = git_cmd { args = args }
|
||||
if ret ~= 0 then
|
||||
Log:error "Unable to switch branches! Check the log for further information"
|
||||
return
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
---Get the current Lunarvim development branch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue