summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/repo/main.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/plugins/repo/main.lua b/xmake/plugins/repo/main.lua
index 7c5d21ce8..ea4e132d3 100644
--- a/xmake/plugins/repo/main.lua
+++ b/xmake/plugins/repo/main.lua
@@ -52,7 +52,7 @@ function _add(name, url, branch, is_global)
-- clone repository
if not os.isdir(url) then
local remoteurl = proxy.mirror(url) or url
- git.clone(remoteurl, {verbose = option.get("verbose"), branch = branch, outputdir = repodir})
+ git.clone(remoteurl, {verbose = option.get("verbose"), branch = branch, outputdir = repodir, autocrlf = false})
end
-- add url
@@ -115,13 +115,13 @@ function _update()
-- only update the local repository with the remote url
if not os.isdir(repo:url()) then
vprint("pulling repository(%s): %s to %s ..", repo:name(), repo:url(), repodir)
- git.pull({verbose = option.get("verbose"), branch = repo:branch(), repodir = repodir})
+ git.pull({verbose = option.get("verbose"), branch = repo:branch(), repodir = repodir, force = true})
io.save(path.join(repodir, "updated"), {})
end
else
vprint("cloning repository(%s): %s to %s ..", repo:name(), repo:url(), repodir)
local remoteurl = proxy.mirror(repo:url()) or repo:url()
- git.clone(remoteurl, {verbose = option.get("verbose"), branch = repo:branch(), outputdir = repodir})
+ git.clone(remoteurl, {verbose = option.get("verbose"), branch = repo:branch(), outputdir = repodir, autocrlf = false})
io.save(path.join(repodir, "updated"), {})
end
pulled[repodir] = true