Skip to content

Commit e49b0d9

Browse files
authored
fix(#3251): pass git.timeout to all vim.system git calls (#3277)
1 parent 1b5d966 commit e49b0d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/nvim-tree/git/utils.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ local M = {
1111
---@return integer exit code
1212
local function system(cmd)
1313
if vim.fn.has("nvim-0.10") == 1 then
14-
local obj = vim.system(cmd):wait()
14+
local obj = vim.system(cmd):wait(M.opts.git.timeout)
1515
return obj.stdout or "", obj.code
1616
else
1717
return vim.fn.system(cmd), vim.v.shell_error
@@ -199,6 +199,7 @@ function M.setup(opts)
199199
if opts.git.cygwin_support then
200200
M.use_cygpath = vim.fn.executable("cygpath") == 1
201201
end
202+
M.opts = opts
202203
end
203204

204205
return M

0 commit comments

Comments
 (0)