fix(blame): parse blame info correctly

Fixes #1065
This commit is contained in:
Lewis Russell 2024-06-27 10:01:21 +01:00
parent 0e39e9afcf
commit 0595724fa9
2 changed files with 2 additions and 4 deletions

View file

@ -1012,9 +1012,7 @@ M.blame_line = async.create(1, function(opts)
return
end
assert(result)
result = util.convert_blame_info(result)
result = util.convert_blame_info(assert(result))
local is_committed = result.sha and tonumber('0x' .. result.sha) ~= 0

View file

@ -83,7 +83,7 @@ local function incremental_iter(data_lines, i, commits, result)
i = i + 1
local key, value = l:match('^([^%s]+) (.*)')
if key == 'previous' then
previous_sha, previous_filename = data_lines[i]:match('^previous (%x+) (.*)')
previous_sha, previous_filename = l:match('^previous (%x+) (.*)')
elseif key then
key = key:gsub('%-', '_') --- @type string
if vim.endswith(key, '_time') then