From b2ebea13c7f340591fa083f061f093c453108bfc Mon Sep 17 00:00:00 2001 From: Ignacio BurgueƱo Date: Mon, 14 May 2012 17:52:14 -0300 Subject: git checkout is not needed anymore --- src/luarocks/fetch/git.lua | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src') diff --git a/src/luarocks/fetch/git.lua b/src/luarocks/fetch/git.lua index b7df6372..42129b22 100644 --- a/src/luarocks/fetch/git.lua +++ b/src/luarocks/fetch/git.lua @@ -23,12 +23,10 @@ function get_sources(rockspec, extract, dest_dir) -- Strip off .git from base name if present module = module:gsub("%.git$", "") local command = {git_cmd, "clone", "--depth=1", rockspec.source.url, module} - local checkout_command local tag_or_branch = rockspec.source.tag or rockspec.source.branch if tag_or_branch then -- ensure the branch (or tag) is available table.insert(command, 4, "--branch=" .. tag_or_branch) - checkout_command = {git_cmd, "checkout", tag_or_branch} end local store_dir if not dest_dir then @@ -45,11 +43,6 @@ function get_sources(rockspec, extract, dest_dir) return nil, "Failed cloning git repository." end fs.change_dir(module) - if checkout_command then - if not fs.execute(unpack(checkout_command)) then - return nil, "Failed checking out tag/branch from git repository." - end - end fs.delete(dir.path(store_dir, module, ".git")) fs.delete(dir.path(store_dir, module, ".gitignore")) fs.pop_dir() -- cgit v1.2.3-55-g6feb