Skip to content

Commit bd37afc

Browse files
committed
fix(git): when a Plugin.branch is set, don't use config.defaults.version. Fixes #409
1 parent c05d61d commit bd37afc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/lazy/manage/git.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ function M.get_target(plugin)
131131
commit = M.ref(plugin.dir, "tags/" .. plugin.tag),
132132
}
133133
end
134-
local version = plugin.version == nil and Config.options.defaults.version or plugin.version
134+
135+
local version = (plugin.version == nil and plugin.branch == nil) and Config.options.defaults.version or plugin.version
135136
if version then
136137
local last = Semver.last(M.get_versions(plugin.dir, version))
137138
if last then

0 commit comments

Comments
 (0)