From ba229f9b49e2b42d5e3837fb684b33b5d0073e06 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Fri, 9 Nov 2012 11:52:23 +0100 Subject: [PATCH] add http/https transport support to the git interface Signed-off-by: Tobias Ulmer --- generic/generic_git.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/generic/generic_git.lua b/generic/generic_git.lua index 5062d76..91dab54 100644 --- a/generic/generic_git.lua +++ b/generic/generic_git.lua @@ -173,7 +173,7 @@ function generic_git.git_init_db1(rurl) elseif u.transport == "file" then cmd = gitcmd else - return false, e:append("transport not supported: %s", u.transport) + return false, e:append("git_init_db1: transport not supported: %s", u.transport) end rc = e2lib.callcmd_capture(cmd) if rc ~= 0 then @@ -277,8 +277,12 @@ function generic_git.git_url1(u) giturl = string.format("git+ssh://%s/%s", u.server, u.path) elseif u.transport == "file" then giturl = string.format("/%s", u.path) + elseif u.transport == "http" then + giturl = string.format("http://%s/%s", u.server, u.path) + elseif u.transport == "https" then + giturl = string.format("https://%s/%s", u.server, u.path) else - return nil, err.new("transport not supported: %s", u.transport) + return nil, err.new("git_url1: transport not supported: %s", u.transport) end return giturl, nil end -- 2.39.5