chore(git): consistent error reporting on git failures

This commit is contained in:
2026-04-27 13:33:09 +02:00
parent 20dc6cc3c9
commit 6e0e05ae56
5 changed files with 81 additions and 14 deletions
+4
View File
@@ -1,3 +1,4 @@
local log = require("log")
local util = require("util")
local UNMERGED = {
@@ -73,6 +74,7 @@ local function resolve(path)
f:close()
local gitdir = content:match("gitdir:%s*(%S+)")
if not gitdir then
log.warning(".git file at %s has no `gitdir:` line", found)
return nil
end
if not gitdir:match("^/") then
@@ -148,6 +150,8 @@ local function do_refresh(repo)
statuses[vim.fs.joinpath(repo.worktree, path_part)] =
format(code)
end
else
log.warning("git status failed: %s", vim.trim(obj.stderr or ""))
end
local dirty = false
for buf in pairs(repo.buffers) do