fix(#1494): git showUntracked value and log (#1504)

* should_show_untracked correctly evaluates status.showUntrackedFiles

* git.Runner:_run_git_job removes nils before logging args
This commit is contained in:
axlauri
2022-08-15 00:30:22 -04:00
committed by GitHub
parent b314b3a699
commit 09a51266bc
3 changed files with 9 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ function M.should_show_untracked(cwd)
return untracked[cwd]
end
local cmd = "git -C " .. cwd .. " config --type=bool status.showUntrackedFiles"
local cmd = "git -C " .. cwd .. " config status.showUntrackedFiles"
local ps = log.profile_start("git untracked %s", cwd)
log.line("git", cmd)
@@ -51,7 +51,7 @@ function M.should_show_untracked(cwd)
log.raw("git", has_untracked)
log.profile_end(ps, "git untracked %s", cwd)
untracked[cwd] = vim.trim(has_untracked) ~= "false"
untracked[cwd] = vim.trim(has_untracked) ~= "no"
return untracked[cwd]
end