chore(git): consistent error reporting on git failures
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user