Skip to content

Commit fb0574d

Browse files
authored
Merge pull request #6901 from SirLynix/patch-21
package download: don't get submodules if disabled
2 parents 859a521 + fde7009 commit fb0574d

File tree

1 file changed

+2
-1
lines changed
  • xmake/modules/private/action/require/impl/actions

1 file changed

+2
-1
lines changed

xmake/modules/private/action/require/impl/actions/download.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ function _checkout(package, url, sourcedir, opt)
130130
-- only shallow clone this tag
131131
-- @see https://github.com/xmake-io/xmake/issues/4151
132132
if tag and git.clone.can_clone_tag() then
133-
git.clone(url, {depth = 1, recursive = true, shallow_submodules = true, longpaths = longpaths, branch = tag, outputdir = packagedir})
133+
local clone_submodules = opt.url_submodules ~= false
134+
git.clone(url, {depth = 1, recursive = clone_submodules, shallow_submodules = clone_submodules, longpaths = longpaths, branch = tag, outputdir = packagedir})
134135
else
135136

136137
-- clone whole history and tags

0 commit comments

Comments
 (0)