diff options
| author | ruki <[email protected]> | 2021-04-01 22:20:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-04-01 22:20:35 +0800 |
| commit | a9f0f90f5c7db068cdce11b5cc9f8a0ddb494f42 (patch) | |
| tree | 734e588b5ae3ecd050cd5cc976f36320754d0fe1 | |
| parent | 2ff98566ce46f45b36da9f58e3da4def548814f8 (diff) | |
enable longpaths
| -rw-r--r-- | xmake/core/project/option.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/devel/git/clone.lua | 8 | ||||
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/download.lua | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index a92f8922f..f31ae6c6c 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -387,6 +387,7 @@ function option.apis() , "option.set_description" -- option.add_xxx , "option.add_deps" + , "option.add_rules" , "option.add_imports" , "option.add_vectorexts" , "option.add_features" diff --git a/xmake/modules/devel/git/clone.lua b/xmake/modules/devel/git/clone.lua index 876a2f867..da42e33e5 100644 --- a/xmake/modules/devel/git/clone.lua +++ b/xmake/modules/devel/git/clone.lua @@ -33,7 +33,7 @@ import("net.proxy") -- 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"}) +-- git.clone("[email protected]:xmake-io/xmake.git", {depth = 1, branch = "master", outputdir = "/tmp/xmake", longpaths = true}) -- -- @endcode -- @@ -71,6 +71,12 @@ function main(url, opt) table.insert(argv, "--shallow-submodules") end + -- use longpaths, we need it on windows + if opt.longpaths then + table.insert(argv, "-c") + table.insert(argv, "core.longpaths=true") + end + -- set outputdir if opt.outputdir then table.insert(argv, path.translate(opt.outputdir)) diff --git a/xmake/modules/private/action/require/impl/actions/download.lua b/xmake/modules/private/action/require/impl/actions/download.lua index 865a2b05f..ac90a752f 100644 --- a/xmake/modules/private/action/require/impl/actions/download.lua +++ b/xmake/modules/private/action/require/impl/actions/download.lua @@ -64,13 +64,13 @@ function _checkout(package, url, sourcedir, url_alias) if package:branch() then -- only shadow clone this branch - git.clone(url, {depth = 1, recursive = true, branch = package:branch(), outputdir = packagedir}) + git.clone(url, {depth = 1, recursive = true, longpaths = 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, {longpaths = true, outputdir = packagedir}) -- attempt to checkout the given version local revision = package:revision(url_alias) or package:tag() or package:version_str() |
