summaryrefslogtreecommitdiff
path: root/xmake/modules/devel/git
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/devel/git')
-rw-r--r--xmake/modules/devel/git/clone.lua9
-rw-r--r--xmake/modules/devel/git/pull.lua4
2 files changed, 13 insertions, 0 deletions
diff --git a/xmake/modules/devel/git/clone.lua b/xmake/modules/devel/git/clone.lua
index a1e7ca8eb..bdd02caf1 100644
--- a/xmake/modules/devel/git/clone.lua
+++ b/xmake/modules/devel/git/clone.lua
@@ -115,6 +115,15 @@ function main(url, opt)
table.insert(argv, "core.fsmonitor=false")
end
+ -- set core.autocrlf
+ if opt.autocrlf then
+ table.insert(argv, "-c")
+ table.insert(argv, "core.autocrlf=true")
+ elseif opt.autocrlf == false then
+ table.insert(argv, "-c")
+ table.insert(argv, "core.autocrlf=false")
+ end
+
-- set outputdir
if opt.outputdir then
table.insert(argv, path.translate(opt.outputdir))
diff --git a/xmake/modules/devel/git/pull.lua b/xmake/modules/devel/git/pull.lua
index f68e32279..63345f902 100644
--- a/xmake/modules/devel/git/pull.lua
+++ b/xmake/modules/devel/git/pull.lua
@@ -46,6 +46,10 @@ function main(opt)
-- init argv
local argv = {}
+ if opt.force then
+ table.insert(argv, "-f")
+ end
+
if opt.fsmonitor then
table.insert(argv, "-c")
table.insert(argv, "core.fsmonitor=true")