Skip to content

Commit

Permalink
fix: when just cloned, never commit lock
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 29, 2022
1 parent 7328e29 commit 32fa5f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/lazy/manage/task/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ M.checkout = {
local info = assert(Git.info(self.plugin.dir))
local target = assert(Git.get_target(self.plugin))

if self.plugin.lock then
-- if the plugin is locked and we did not just clone it,
-- then don't update
if self.plugin.lock and not self.plugin._.cloned then
target = info
end

Expand Down

0 comments on commit 32fa5f8

Please sign in to comment.