From: Tobias Ulmer Date: Wed, 6 Mar 2019 18:15:37 +0000 (+0100) Subject: adjust to generic_git.list_refs changes X-Git-Tag: e2factory-2.3.18rc1~21 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=71915bb49cb0908b3c7a06a93ae160c00cbcca38;p=e2factory.git adjust to generic_git.list_refs changes Signed-off-by: Tobias Ulmer --- diff --git a/global/e2-fetch-project.lua b/global/e2-fetch-project.lua index b206542..4b2a386 100644 --- a/global/e2-fetch-project.lua +++ b/global/e2-fetch-project.lua @@ -157,7 +157,7 @@ local function e2_fetch_project(arg) -- 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, generic_git.refs_heads(p.branch)) + generic_git.NO_REMOTE, generic_git.refs_heads(p.branch)) if not rc then error(e:cat(re)) end diff --git a/plugins/gitrepo.lua b/plugins/gitrepo.lua index 2e17755..d9f2c0f 100644 --- a/plugins/gitrepo.lua +++ b/plugins/gitrepo.lua @@ -277,7 +277,7 @@ function gitrepo_source:check_workingcopy() return true, nil end - rc, re, id = generic_git.lookup_id(gitdir, false, ref) + rc, re, id = generic_git.lookup_id(gitdir, generic_git.NO_REMOTE, ref) if not rc then return false, e:cat(re) elseif not id then @@ -347,19 +347,19 @@ function gitrepo_source:fetch_source() return false, e:cat(re) end - rc, re, id = generic_git.lookup_id(git_dir, false, - "refs/heads/" .. self:get_branch()) + rc, re, id = generic_git.lookup_id(git_dir, generic_git.NO_REMOTE, + generic_git.refs_heads(self:get_branch())) if not rc then return false, e:cat(re) elseif not id then rc, re = generic_git.git_branch_new1(work_tree, true, self:get_branch(), - "origin/" .. self:get_branch()) + generic_git.refs_remote_heads(self:get_branch())) if not rc then return false, e:cat(re) end rc, re = generic_git.git_checkout1(work_tree, - "refs/heads/" .. self:get_branch()) + generic_git.refs_heads(self:get_branch())) if not rc then return false, e:cat(re) end @@ -404,7 +404,7 @@ function gitrepo_source:update_source() end -- Use HEAD commit ID to find the branch we're on - rc, re, id = generic_git.lookup_id(gitdir, false, "HEAD") + rc, re, id = generic_git.lookup_id(gitdir, generic_git.NO_REMOTE, "HEAD") if not rc then return false, e:cat(re) elseif not id then