feat: added support for Plugin.lock (wont update)

This commit is contained in:
Folke Lemaitre 2022-11-29 12:36:07 +01:00
parent 1bbfa3a747
commit 0774f1bc25
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
3 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,7 @@
## ✅ TODO
- [x] support for Plugin.lock
- [ ] health checks: check merge conflicts async
- [ ] defaults for git log
- [x] view keybindings for update/clean/...

View File

@ -31,6 +31,7 @@ M.dirty = false
---@field tag? string
---@field commit? string
---@field version? string
---@field lock? boolean
---@class LazyPlugin: LazyPluginHandlers,LazyPluginHooks,LazyPluginRef
---@field [1] string

View File

@ -130,6 +130,10 @@ M.checkout = {
local info = assert(Git.info(self.plugin.dir))
local target = assert(Git.get_target(self.plugin))
if self.plugin.lock then
target = info
end
local lock
if opts.lockfile then
lock = Lock.get(self.plugin)