fix(git): fixed branch detection, get target commit from origin and always checkout a tag or commit so we dont need to use git merge

This commit is contained in:
Folke Lemaitre 2022-12-02 11:26:07 +01:00
parent 3e143c6017
commit ae379a62dc
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 44 additions and 24 deletions

View file

@ -29,8 +29,7 @@ function M.update()
if not plugin._.is_local and plugin._.installed then
local info = assert(Git.info(plugin.dir))
if not info.branch then
local branch = assert(Git.get_branch(plugin))
info.branch = branch.branch
info.branch = assert(Git.get_branch(plugin))
end
info.commit = info.commit
-- f:write(([[ [%q] = { branch = %q, commit = %q },]]):format(name, info.branch, info.commit) .. "\n")