From 838c54621041ddd2ab905729dc25a9aca2284238 Mon Sep 17 00:00:00 2001 From: Ignacio BurgueƱo Date: Fri, 11 May 2012 17:00:07 -0300 Subject: Clone using --branch flag when needed. --- src/luarocks/fetch/git.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/luarocks/fetch/git.lua b/src/luarocks/fetch/git.lua index c7cc7008..0b33e76b 100644 --- a/src/luarocks/fetch/git.lua +++ b/src/luarocks/fetch/git.lua @@ -26,8 +26,9 @@ function get_sources(rockspec, extract, dest_dir) local checkout_command local tag_or_branch = rockspec.source.tag or rockspec.source.branch if tag_or_branch then - -- ensure the branch is available - table.insert(command, 4, "--no-single-branch") + -- ensure the branch (or tag) is available + table.insert(command, 4, "--branch") + table.insert(command, 5, tag_or_branch) checkout_command = {git_cmd, "checkout", tag_or_branch} end local store_dir -- cgit v1.2.3-55-g6feb