Skip to content

Commit

Permalink
fix(blame): parse blame info correctly
Browse files Browse the repository at this point in the history
Fixes #1065
  • Loading branch information
lewis6991 committed Jun 27, 2024
1 parent 0e39e9a commit 0595724
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lua/gitsigns/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lua/gitsigns/git/blame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0595724

Please sign in to comment.