-- 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
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
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
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