summaryrefslogtreecommitdiff
path: root/lua/lvim/utils/git.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-03-24 16:16:38 +0100
committerGitHub <[email protected]>2022-03-24 16:16:38 +0100
commit08d3df2cd3515878309906c2791d1b934425d78f (patch)
tree1fa487649e33329add38c5c3a8abb12acdfd41d2 /lua/lvim/utils/git.lua
parent1ea836e3601b7ed0ed0496888dc14683bfbcce75 (diff)
feat(plugins): add support for packer snapshots (#2351)
Diffstat (limited to 'lua/lvim/utils/git.lua')
-rw-r--r--lua/lvim/utils/git.lua18
1 files changed, 0 insertions, 18 deletions
diff --git a/lua/lvim/utils/git.lua b/lua/lvim/utils/git.lua
index ce323160..9848835e 100644
--- a/lua/lvim/utils/git.lua
+++ b/lua/lvim/utils/git.lua
@@ -113,22 +113,4 @@ function M.get_lvim_current_sha()
return abbrev_version
end
-function M.generate_plugins_sha(output)
- local list = {}
- output = output or "commits.lua"
-
- local core_plugins = require "lvim.plugins"
- for _, plugin in pairs(core_plugins) do
- local name = plugin[1]:match "/(%S*)"
- local url = "https://github.com/" .. plugin[1]
- print("checking: " .. name .. ", at: " .. url)
- local retval, latest_sha = git_cmd { args = { "ls-remote", url, "origin", "HEAD" } }
- if retval == 0 then
- -- replace dashes, remove postfixes and use lowercase
- local normalize_name = (name:gsub("-", "_"):gsub("%.%S+", "")):lower()
- list[normalize_name] = latest_sha[1]:gsub("\tHEAD", "")
- end
- end
- require("lvim.utils").write_file(output, "local commit = " .. vim.inspect(list), "w")
-end
return M