From ff5ac1e74e08d73d47fb5cf58520f1f0fb9a2a06 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Wed, 29 Apr 2026 10:11:23 +0200 Subject: [PATCH] chore(git): fix diagnostics --- lua/git/object.lua | 1 + lua/git/util.lua | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/git/object.lua b/lua/git/object.lua index aa48de7..b6a9123 100644 --- a/lua/git/object.lua +++ b/lua/git/object.lua @@ -184,6 +184,7 @@ function M.read_uri(buf) vim.bo[buf].swapfile = false vim.bo[buf].bufhidden = "wipe" + ---@type string? local stdout = pending_content[buf] pending_content[buf] = nil if stdout == nil then diff --git a/lua/git/util.lua b/lua/git/util.lua index dade6b5..0a7974a 100644 --- a/lua/git/util.lua +++ b/lua/git/util.lua @@ -31,7 +31,10 @@ end function M.parse_revspec(revspec) local stage, path = revspec:match("^:([0123]):(.+)$") if stage then - return { stage = tonumber(stage), path = path } + return { + stage = tonumber(stage) --[[@as (0|1|2|3)?]], + path = path, + } end path = revspec:match("^:([^:]+)$") if path then