diff options
| author | ruki <[email protected]> | 2019-10-18 00:58:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-10-17 23:53:48 +0800 |
| commit | 7ef0d3eac5452a5c71f0ad9f7010d376c1f70e4c (patch) | |
| tree | 458ea2fdba3aad090be2240f20d63dc2af78ad33 | |
| parent | e96665b7615957e7279a84a6c0b9812449faf311 (diff) | |
force to clone from the given branch
| -rw-r--r-- | xmake/actions/require/impl/action/download.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/actions/require/impl/action/download.lua b/xmake/actions/require/impl/action/download.lua index ab586c4bc..a7b222009 100644 --- a/xmake/actions/require/impl/action/download.lua +++ b/xmake/actions/require/impl/action/download.lua @@ -47,7 +47,8 @@ function _checkout(package, url, sourcedir, url_alias) -- use previous source directory if exists local packagedir = path.join(sourcedir, package:name()) - if os.isdir(packagedir) then + if os.isdir(packagedir) and + not (option.get("force") and package:branch()) then -- we need disable cache if we force to clone from the given branch -- clean the previous build files git.clean({repodir = packagedir, force = true}) |
