Skip to content

Commit 77ebbeb

Browse files
authored
fix parsing of git blame output (#436)
1 parent 796a183 commit 77ebbeb

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lua/vgit/git/GitBlame.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ function GitBlame:constructor(info)
1313
}
1414

1515
for i = 2, #info do
16-
local blame_info = utils.str.split(info[i], ' ')
17-
blame[blame_info[1]] = blame_info[2]
16+
local field, value = info[i]:match("^(%S+)%s+(.+)")
17+
if field ~= nil then
18+
blame[field] = value
19+
end
1820
end
1921

2022
local committed = true

0 commit comments

Comments
 (0)