end
gitdir = e2lib.join("/", u.path);
- gitargv = { "--git-dir="..gitdir, "init-db" }
+ gitargv = generic_git.git_new_argv(gitdir, false, "init-db")
if shared then
table.insert(gitargv, "--shared")
end
return false, e:cat(re)
end
- argv = { "--git-dir=" .. gitdir, "push", remote_git_url, refspec }
+ argv = generic_git.git_new_argv(gitdir, nil, "push", remote_git_url, refspec)
rc, re = generic_git.git(argv)
if not rc then
return false, e:cat(re)
end
gitdir = e2lib.join("/", lrepo.path)
- argv = { "--git-dir="..gitdir, "remote", "add", name, giturl }
-
+ argv = generic_git.git_new_argv(gitdir, nil, "remote", "add", name, giturl)
rc, re = generic_git.git(argv)
if not rc then
return false, re
return false, e:cat(re)
end
- rc, re = generic_git.git_remote_add(c, lserver, llocation, "origin", rserver, rlocation)
+ rc, re = generic_git.git_remote_add(
+ c, lserver, llocation, generic_git.refs_remote(), rserver, rlocation)
if not rc then
return false, e:cat(re)
end
- argv = { "--git-dir="..gitdir, "config", "branch.master.remote", "origin" }
+ argv = generic_git.git_new_argv(
+ gitdir, nil, "config", "branch.master.remote", generic_git.refs_remote())
rc, re = generic_git.git(argv)
if not rc then
return false, e:cat(re)
end
- argv = { "--git-dir="..gitdir, "config", "branch.master.merge",
- refs_heads("master") }
+ argv = generic_git.git_new_argv(
+ gitdir, nil, "config", "branch.master.merge", refs_heads("master"))
rc, re = generic_git.git(argv)
if not rc then
return false, e:cat(re)
-- Because the repository is freshly cloned, we can assume that when a
-- ref for the requested branch exists, HEAD is at that branch.
rc, re, id = generic_git.lookup_id(e2lib.join(p.destdir, ".git"),
- false, "refs/heads/" .. p.branch)
+ false, generic_git.refs_heads(p.branch))
if not rc then
error(e:cat(re))
end
if not id then
rc, re = generic_git.git_branch_new1(p.destdir, true, p.branch,
- "origin/" .. p.branch)
+ generic_git.refs_remote_heads(p.branch))
if not rc then
error(e:cat(re))
end
p.tag, p.branch)
end
- rc, re = generic_git.git_checkout1(p.destdir, "refs/tags/" .. p.tag)
+ rc, re = generic_git.git_checkout1(p.destdir, generic_git.refs_tags(p.tag))
if not rc then
error(e:cat(re))
end
if e2version.branch:match("/") then
ref = e2version.branch
else
- ref = string.format("remotes/origin/%s", e2version.branch)
+ ref = generic_git.refs_remotes(e2version.branch)
end
else
- ref = string.format("refs/tags/%s", e2version.tag)
+ ref = generic_git.refs_tags(e2version.tag)
end
-- checkout e2factory itself
for _,ex in ipairs(extensions) do
if not ex.ref:match("/") then
- ex.ref = string.format("refs/tags/%s", ex.ref)
+ ex.ref = generic_git.refs_tags(ex.ref)
end
e2lib.logf(2, "fetching extension: %s (%s)", ex.name, ex.ref)
local server = config.site.e2_server