summaryrefslogtreecommitdiff
path: root/xmake/modules/devel/git/clone.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-08-26 20:36:52 +0800
committerGitHub <[email protected]>2024-08-26 20:36:52 +0800
commit559827c1e47bbaf25eb41657e3da7ec9c4316ee2 (patch)
treee324cdaa807eea75ee1214d941232a285aa4edd5 /xmake/modules/devel/git/clone.lua
parentc80898e12f88abe7df463bc64e0fb6bf081b8cdf (diff)
parent818b23b778edb642bf15e18ab4b52eb1a07fb329 (diff)
Merge pull request #5509 from xmake-io/treeless
use treeless instead of depth1
Diffstat (limited to 'xmake/modules/devel/git/clone.lua')
-rw-r--r--xmake/modules/devel/git/clone.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/modules/devel/git/clone.lua b/xmake/modules/devel/git/clone.lua
index bdd02caf1..cc0b8f841 100644
--- a/xmake/modules/devel/git/clone.lua
+++ b/xmake/modules/devel/git/clone.lua
@@ -62,7 +62,7 @@ end
-- import("devel.git")
--
-- git.clone("[email protected]:xmake-io/xmake.git")
--- git.clone("[email protected]:xmake-io/xmake.git", {depth = 1, branch = "master", outputdir = "/tmp/xmake", longpaths = true})
+-- git.clone("[email protected]:xmake-io/xmake.git", {depth = 1, treeless = true, branch = "master", outputdir = "/tmp/xmake", longpaths = true})
--
-- @endcode
--
@@ -87,6 +87,12 @@ function main(url, opt)
table.insert(argv, type(opt.depth) == "number" and tostring(opt.depth) or opt.depth)
end
+ -- treeless?
+ -- @see https://github.com/xmake-io/xmake/issues/5507
+ if opt.treeless then
+ table.insert(argv, "--filter=tree:0")
+ end
+
-- recursive?
if opt.recursive then
table.insert(argv, "--recursive")