fix: git_branch only remove remotes/origin part (#423)

This commit is contained in:
JINNOUCHI Yasushi
2021-01-12 17:06:16 +09:00
committed by GitHub
parent 4ca523232e
commit 95264ada79

View File

@@ -74,7 +74,7 @@ git.branches = function(opts)
for _, v in ipairs(output) do
if not string.match(v, 'HEAD') and v ~= '' then
v = string.gsub(v, '.* ', '')
v = string.gsub(v, '^remotes/.*/', '')
v = string.gsub(v, '^remotes/[^/]*/', '')
tmp_results[v] = true
end
end