Only do git status -u if status.showUntrackedFiles = true
Some git use cases, specifically where $HOME is a git worktree with a bare git repo somewhere else, really get bogged down if you do `git status -u`. This overcomes that issue.
This commit is contained in:
parent
787cef2a1d
commit
88f4421e9c
@ -6,7 +6,11 @@ local roots = {}
|
||||
local not_git = 'not a git repo'
|
||||
|
||||
local function update_root_status(root)
|
||||
local status = vim.fn.systemlist('cd "'..root..'" && git status --porcelain=v1 -u')
|
||||
local untracked = ' -u'
|
||||
if vim.fn.trim(vim.fn.system('git config --type=bool status.showUntrackedFiles')) == 'false' then
|
||||
untracked = ''
|
||||
end
|
||||
local status = vim.fn.systemlist('cd "'..root..'" && git status --porcelain=v1'..untracked)
|
||||
roots[root] = {}
|
||||
|
||||
for _, v in pairs(status) do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user