]> git.e2factory.org Git - e2factory.git/commitdiff
add http/https transport support to the git interface
authorTobias Ulmer <tu@emlix.com>
Fri, 9 Nov 2012 10:52:23 +0000 (11:52 +0100)
committerTobias Ulmer <tu@emlix.com>
Tue, 26 Feb 2013 18:07:11 +0000 (19:07 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/generic_git.lua

index 5062d76541ae661035598ee83eeb2a624d84aeee..91dab54db40d76e9b0b19ebe8635fa48a0be4d3f 100644 (file)
@@ -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