summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2018-11-26 23:36:48 +0800
committerruki <[email protected]>2018-11-26 15:40:52 +0800
commit7bdb43ead8a147be6ceb5a45d798ef4a34b0bcf1 (patch)
tree4f299087dd8bc2505fcabd1f40cd22a7b4dd73fc /xmake/plugins
parent336e108a834d3ef522d60678b45747d5daecd93e (diff)
fix repo update
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/repo/main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/plugins/repo/main.lua b/xmake/plugins/repo/main.lua
index 73427dcaf..c88918060 100644
--- a/xmake/plugins/repo/main.lua
+++ b/xmake/plugins/repo/main.lua
@@ -110,7 +110,7 @@ function _update()
vprint("pulling repository(%s): %s to %s ..", repo:name(), repo:url(), repodir)
-- pull it
- git.pull({verbose = option.get("verbose"), branch = "master", repodir = repodir})
+ git.pull({verbose = option.get("verbose"), branch = repo:branch() or "master", repodir = repodir})
-- mark as updated
io.save(path.join(repodir, "updated"), {})
@@ -120,7 +120,7 @@ function _update()
vprint("cloning repository(%s): %s to %s ..", repo:name(), repo:url(), repodir)
-- clone it
- git.clone(repo:url(), {verbose = option.get("verbose"), branch = "master", outputdir = repodir})
+ git.clone(repo:url(), {verbose = option.get("verbose"), branch = repo:branch() or "master", outputdir = repodir})
-- mark as updated
io.save(path.join(repodir, "updated"), {})