Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions doc/nvim-tree-lua.txt
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,6 @@ applying configuration.
},
},
experimental = {
git = {
async = true,
},
},
log = {
enable = false,
Expand Down Expand Up @@ -1275,13 +1272,6 @@ General UI configuration.
Experimental features that may become default or optional functionality.
In the event of a problem please disable the experiment and raise an issue.

*nvim-tree.experimental.git.async*
Direct file writes and `.git/` writes are executed asynchronously: the
git process runs in the background. The tree updates on completion.
Other git actions such as first tree draw and explicit refreshes are still
done in the foreground.
Type: `boolean`, Default: `true`

*nvim-tree.log*
Configuration for diagnostic logging.

Expand Down
7 changes: 1 addition & 6 deletions lua/nvim-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,7 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
trash = true,
},
},
experimental = {
git = {
async = true,
},
},
experimental = {},
log = {
enable = false,
truncate = false,
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 1 addition & 6 deletions lua/nvim-tree/git/runner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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