fix(#2104): remove experimental.git.async, always used (#2234)

This commit is contained in:
Alexander Courtis
2023-05-27 15:11:29 +10:00
committed by GitHub
parent d5d6950a0d
commit 164eb10cbd
3 changed files with 2 additions and 22 deletions

View File

@@ -559,11 +559,7 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
trash = true,
},
},
experimental = {
git = {
async = true,
},
},
experimental = {},
log = {
enable = false,
truncate = false,
@@ -683,7 +679,6 @@ function M.setup(conf)
require("nvim-tree.diagnostics").setup(opts)
require("nvim-tree.explorer").setup(opts)
require("nvim-tree.git").setup(opts)
require("nvim-tree.git.runner").setup(opts)
require("nvim-tree.view").setup(opts)
require("nvim-tree.lib").setup(opts)
require("nvim-tree.renderer").setup(opts)

View File

@@ -185,7 +185,7 @@ function Runner.run(opts, callback)
rc = nil, -- -1 indicates timeout
}, Runner)
local async = callback ~= nil and self.config.git_async
local async = callback ~= nil
local profile = log.profile_start("git %s job %s %s", async and "async" or "sync", opts.project_root, opts.path)
if async and callback then
@@ -214,9 +214,4 @@ function Runner.run(opts, callback)
end
end
function Runner.setup(opts)
Runner.config = {}
Runner.config.git_async = opts.experimental.git.async
end
return Runner