summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-09-22 22:36:59 +0800
committerruki <[email protected]>2022-09-22 22:36:59 +0800
commit6cd2861b8335ea0377383e778e3afd4223f1dd14 (patch)
tree6fd01c0a3e99a005310524f6fed644191d0a8fc6
parent1016d92331c2a4efb4b23a4317621116bfb4f4df (diff)
remove master #2844
-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 64240cd7a..c0088e6e5 100644
--- a/xmake/plugins/repo/main.lua
+++ b/xmake/plugins/repo/main.lua
@@ -47,7 +47,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 or "master", outputdir = repodir})
+ git.clone(remoteurl, {verbose = option.get("verbose"), branch = branch, outputdir = repodir})
end
-- trace
@@ -100,13 +100,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() or "master", repodir = repodir})
+ git.pull({verbose = option.get("verbose"), branch = repo:branch(), repodir = repodir})
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() or "master", outputdir = repodir})
+ git.clone(remoteurl, {verbose = option.get("verbose"), branch = repo:branch(), outputdir = repodir})
io.save(path.join(repodir, "updated"), {})
end
pulled[repodir] = true