On Thu, Mar 10, 2011 at 11:32 PM, Alexander Gladysh <[email protected]> wrote: > Hi, list! > > How to tell Luarocks that https://github.com/agladysh/lua-inih.git is > an URL to Git repository?
No support for that in the current version, I'm afraid. How does one use that URL? I tried this here and got an error: ]git clone --depth=1 https://github.com/agladysh/lua-inih.git lua-inih warning: templates not found /Users/hisham/share/git-core/templates Initialized empty Git repository in /Users/hisham/luarocks/src/lua-inih/.git/ error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/agladysh/lua-inih.git/info/refs fatal: HTTP request failed If that was the way it would work, then I suppose this patch would do the trick, supporting something like "git://https://..." (a bit ugly but it would work) diff --git a/src/luarocks/fetch/git.lua b/src/luarocks/fetch/git.lua index a3b763d..ac39016 100644 --- a/src/luarocks/fetch/git.lua +++ b/src/luarocks/fetch/git.lua @@ -19,6 +19,8 @@ function get_sources(rockspec, extract, dest_dir) local name_version = rockspec.name .. "-" .. rockspec.version local module = dir.base_name(rockspec.source.url) + local url = rockspec.source.url:gsub("^git://([a-z]*://)", "%1") + local command = {"git", "clone", "--depth=1", url, module} -- Strip off .git from base name if present module = module:gsub("%.git$", "") local command = {"git", "clone", "--depth=1", rockspec.source.url, module} _______________________________________________ Luarocks-developers mailing list [email protected] http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers
