fix(git/status_view): scope dispatch to current tabpage + test cleanup

This commit is contained in:
2026-05-08 03:12:41 +02:00
parent 867b5c2a2e
commit ebfcaef240
8 changed files with 217 additions and 154 deletions
+9 -2
View File
@@ -2,9 +2,11 @@ local t = require("test")
local M = {}
---@class test.git.SystemCompleted : vim.SystemCompleted
---@field stdout string
---@param dir string
---@vararg string
---@return vim.SystemCompleted
---@return test.git.SystemCompleted
function M.git(dir, ...)
local r = vim.system({ "git", ... }, { cwd = dir, text = true }):wait()
if r.code ~= 0 then
@@ -17,6 +19,11 @@ function M.git(dir, ...)
2
)
end
if r.stdout then
r.stdout = vim.trim(r.stdout)
else
r.stdout = ""
end
return r
end