Merge pull request #38 from jdrouhard/git_performance_improvement

Optimize git performance
main
ibhagwan 3 years ago committed by GitHub
commit ef673b20ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -166,7 +166,7 @@ M.fzf_files = function(opts)
-- reset git tracking
opts.diff_files, opts.untracked_files = nil, nil
if not utils.is_git_repo() then opts.git_icons = false end
if opts.git_icons and not utils.is_git_repo() then opts.git_icons = false end
if opts.cwd and #opts.cwd > 0 then
opts.cwd = vim.fn.expand(opts.cwd)

@ -50,7 +50,7 @@ function M.shell_error()
end
function M.is_git_repo()
vim.fn.system("git status")
vim.fn.system("git rev-parse --git-dir")
return M._if(M.shell_error(), false, true)
end

Loading…
Cancel
Save