Skip to content

Commit

Permalink
feat: added support for Plugin.lock (wont update)
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 29, 2022
1 parent 1bbfa3a commit 0774f1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/...
Expand Down
1 change: 1 addition & 0 deletions lua/lazy/core/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions lua/lazy/manage/task/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0774f1b

Please sign in to comment.