Skip to content

Commit

Permalink
fix: handle untracked files for custom bases
Browse files Browse the repository at this point in the history
Fixes #1022
  • Loading branch information
lewis6991 committed May 28, 2024
1 parent c96e3cf commit af3fdad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/gitsigns/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,12 @@ function Obj:file_info_tree(file, silent)
return {}
end

local info, relpath = unpack(vim.split(results[1], '\t'))
local info_line = results[1]
if not info_line then
return {}
end

local info, relpath = unpack(vim.split(info_line, '\t'))
local mode_bits, objtype, object_name = unpack(vim.split(info, '%s+'))
assert(objtype == 'blob')

Expand Down

0 comments on commit af3fdad

Please sign in to comment.