fix: convert some warnings to errors

This commit is contained in:
2026-05-06 01:33:39 +02:00
parent c70d5dfce5
commit 2a81c50156
7 changed files with 23 additions and 23 deletions
+4 -4
View File
@@ -268,7 +268,7 @@ end
local function load_blob(r, blob, path, sha)
local buf = blob_buf(r, blob, path, sha)
if not buf then
util.warning("no content for %s at %s", path, sha)
util.error("no content for %s at %s", path, sha)
return
end
vim.cmd.normal({ "m'", bang = true })
@@ -279,7 +279,7 @@ end
---@param section ow.Git.DiffSection
local function open_section(s, section)
if not section.blob_a or not section.blob_b then
util.warning("no index line, cannot determine blob SHAs")
util.error("no index line, cannot determine blob SHAs")
return
end
local parent = s.parent_sha or "0"
@@ -291,7 +291,7 @@ local function open_section(s, section)
return
end
if not left and not right then
util.warning("no content for %s", section.path_b)
util.error("no content for %s", section.path_b)
return
end
local buf = left or right
@@ -319,7 +319,7 @@ function M.open(r, rev, opts)
{ cwd = r.worktree, silent = true }
)
if not content then
util.warning("not a git object: %s", rev)
util.error("not a git object: %s", rev)
return
end
local buf = M.buf_for(r, parsed, content)