From 328a2725e706fa55fe66b2ae5afc5cd80cf48fc9 Mon Sep 17 00:00:00 2001 From: Jérôme Leclercq Date: Wed, 8 Oct 2025 21:15:46 +0200 Subject: package download: don't get submodules if disabled (branch version) gemini was right --- xmake/modules/private/action/require/impl/actions/download.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xmake/modules/private/action/require/impl/actions/download.lua b/xmake/modules/private/action/require/impl/actions/download.lua index 02585b70c..df47673a3 100644 --- a/xmake/modules/private/action/require/impl/actions/download.lua +++ b/xmake/modules/private/action/require/impl/actions/download.lua @@ -108,8 +108,9 @@ function _checkout(package, url, sourcedir, opt) branch = nil end - -- only shallow clone this branch - git.clone(url, {depth = 1, recursive = true, shallow_submodules = true, longpaths = longpaths, branch = branch, outputdir = packagedir}) + -- only shallow clone this branch + local clone_submodules = opt.url_submodules ~= false + git.clone(url, {depth = 1, recursive = clone_submodules, shallow_submodules = clone_submodules, longpaths = longpaths, branch = branch, outputdir = packagedir}) -- download package from revision or tag? else -- cgit v1.3.1