From 32fa5f84412804a08a71846c121fbb0bbb915322 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 29 Nov 2022 14:27:32 +0100 Subject: [PATCH] fix: when just cloned, never commit lock --- lua/lazy/manage/task/git.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazy/manage/task/git.lua b/lua/lazy/manage/task/git.lua index a22675e..1371194 100644 --- a/lua/lazy/manage/task/git.lua +++ b/lua/lazy/manage/task/git.lua @@ -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