Closed mks1508 closed 2 years ago
If git repo is just been initialized and have no commit, b:gitsigns_head will still exist but with value "" So should we use something like:
b:gitsigns_head
""
local function is_empty(something) return something == nil or something == "" end if is_empty(vim.b.gitsigns_head) then return end
Instead of vim.fn.exists("b:gitsigns_head")
vim.fn.exists("b:gitsigns_head")
Hi, thank you for pointing this (haven't tried with new repositories, only existing ones). I'll fix it asap :slightly_smiling_face:
If git repo is just been initialized and have no commit,
b:gitsigns_head
will still exist but with value""
So should we use something like:Instead of
vim.fn.exists("b:gitsigns_head")