From 978bdb3c3e034afc17f29dc3688bd76a0abde801 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 3 Sep 2019 22:38:14 +0800 Subject: improve git clone for require --- xmake/actions/require/impl/action/download.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/actions/require/impl/action/download.lua b/xmake/actions/require/impl/action/download.lua index 548d25a83..ab586c4bc 100644 --- a/xmake/actions/require/impl/action/download.lua +++ b/xmake/actions/require/impl/action/download.lua @@ -63,13 +63,13 @@ function _checkout(package, url, sourcedir, url_alias) if package:branch() then -- only shadow clone this branch - git.clone(url, {depth = 1, branch = package:branch(), outputdir = packagedir}) + git.clone(url, {depth = 1, recursive = true, branch = package:branch(), outputdir = packagedir}) -- download package from revision or tag? else -- clone whole history and tags - git.clone(url, {outputdir = packagedir}) + git.clone(url, {outputdir = packagedir, recursive = true}) -- attempt to checkout the given version git.checkout(package:revision(url_alias) or package:tag(), {repodir = packagedir}) -- cgit v1.3.1