summaryrefslogtreecommitdiff
path: root/xmake/modules/devel/git/clone.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-01-21 00:42:42 +0800
committerruki <[email protected]>2020-01-20 22:16:17 +0800
commitab317d02fb8442204813b5b66457406498e48c1c (patch)
tree3d21588850e41b8a613ac62d1e3f34e5c2e35687 /xmake/modules/devel/git/clone.lua
parentf07af69d4ed8474302ecd016ab5fec71a658c58f (diff)
add shallow-submodules for git
Diffstat (limited to 'xmake/modules/devel/git/clone.lua')
-rw-r--r--xmake/modules/devel/git/clone.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/modules/devel/git/clone.lua b/xmake/modules/devel/git/clone.lua
index 027cc9317..b8fca2b48 100644
--- a/xmake/modules/devel/git/clone.lua
+++ b/xmake/modules/devel/git/clone.lua
@@ -62,6 +62,14 @@ function main(url, opt)
table.insert(argv, "--recursive")
end
+ -- clone for submodules
+ if opt.recurse_submodules then
+ table.insert(argv, "--recurse-submodules")
+ end
+ if opt.shallow_submodules then
+ table.insert(argv, "--shallow-submodules")
+ end
+
-- set outputdir
if opt.outputdir then
table.insert(argv, path.translate(opt.outputdir))