fix(git/status_view): scope dispatch to current tabpage + test cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user