aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormpeterv <mpeterval@gmail.com>2015-07-10 22:00:59 +0300
committermpeterv <mpeterval@gmail.com>2015-07-10 22:04:37 +0300
commit8f65a7b767a19ffbd76f5030ba64ca0219d5f4c7 (patch)
tree0977812f37b75940b72e0a2f9513431cde1f6471 /src
parentcc90426cad683caade7a24a7129445784152b448 (diff)
downloadluarocks-8f65a7b767a19ffbd76f5030ba64ca0219d5f4c7.tar.gz
luarocks-8f65a7b767a19ffbd76f5030ba64ca0219d5f4c7.tar.bz2
luarocks-8f65a7b767a19ffbd76f5030ba64ca0219d5f4c7.zip
Fix git cloning command when using git+http protocol
git+http and git+https pass '--' instead of '--depth=1' option. As '--branch' option was passed after depth, it caused the former to be interpreted as an extra argument by git. Pass '--branch' first instead.
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/fetch/git.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/fetch/git.lua b/src/luarocks/fetch/git.lua
index e540d696..a635f190 100644
--- a/src/luarocks/fetch/git.lua
+++ b/src/luarocks/fetch/git.lua
@@ -68,7 +68,7 @@ function git.get_sources(rockspec, extract, dest_dir, depth)
68 if git_can_clone_by_tag(git_cmd) then 68 if git_can_clone_by_tag(git_cmd) then
69 -- The argument to `--branch` can actually be a branch or a tag as of 69 -- The argument to `--branch` can actually be a branch or a tag as of
70 -- Git 1.7.10. 70 -- Git 1.7.10.
71 table.insert(command, 4, "--branch=" .. tag_or_branch) 71 table.insert(command, 3, "--branch=" .. tag_or_branch)
72 end 72 end
73 end 73 end
74 if not fs.execute(unpack(command)) then 74 if not fs.execute(unpack(command)) then