Skip to content

Commit

Permalink
fix(git): when a Plugin.branch is set, don't use `config.defaults.v…
Browse files Browse the repository at this point in the history
…ersion`. Fixes #409
  • Loading branch information
folke committed Jan 17, 2023
1 parent c05d61d commit bd37afc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/lazy/manage/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ function M.get_target(plugin)
commit = M.ref(plugin.dir, "tags/" .. plugin.tag),
}
end
local version = plugin.version == nil and Config.options.defaults.version or plugin.version

local version = (plugin.version == nil and plugin.branch == nil) and Config.options.defaults.version or plugin.version
if version then
local last = Semver.last(M.get_versions(plugin.dir, version))
if last then
Expand Down

0 comments on commit bd37afc

Please sign in to comment.