fix: when just cloned, never commit lock

This commit is contained in:
Folke Lemaitre 2022-11-29 14:27:32 +01:00
parent 7328e290ba
commit 32fa5f8441
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 3 additions and 1 deletions

View File

@ -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