summaryrefslogtreecommitdiff
path: root/xmake/modules/devel/git/checkout.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-10-30 11:15:59 +0800
committerruki <[email protected]>2022-10-30 11:15:59 +0800
commit441628171fac4ea543c1c87f66c533237c2067e4 (patch)
treed03ae0e748048921c6cab2b64bf3686a270c1a5a /xmake/modules/devel/git/checkout.lua
parentb3f903777bfde99b9d69aaa2183175d3babe289b (diff)
improve git module
Diffstat (limited to 'xmake/modules/devel/git/checkout.lua')
-rw-r--r--xmake/modules/devel/git/checkout.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/modules/devel/git/checkout.lua b/xmake/modules/devel/git/checkout.lua
index fb1a24e27..65ea1e820 100644
--- a/xmake/modules/devel/git/checkout.lua
+++ b/xmake/modules/devel/git/checkout.lua
@@ -39,6 +39,14 @@ import("lib.detect.find_tool")
function main(commit, opt)
opt = opt or {}
local git = assert(find_tool("git"), "git not found!")
- local argv = {"checkout", commit}
+ local argv = {}
+
+ if opt.fsmonitor ~= nil then
+ table.insert(argv, "-c")
+ table.insert(argv, "core.fsmonitor=" .. tostring(opt.fsmonitor))
+ end
+
+ table.insert(argv, "checkout")
+ table.insert(argv, commit)
os.vrunv(git.program, argv, {curdir = opt.repodir})
end