try and make everything confined to 80chars
This commit is contained in:
@ -6,7 +6,8 @@ local function parse_output(proc)
|
||||
local result = proc:wait()
|
||||
local ret = {}
|
||||
if result.code == 0 then
|
||||
for line in vim.gsplit(result.stdout, "\n", { plain = true, trimempty = true }) do
|
||||
for line in vim.gsplit(result.stdout, "\n", {
|
||||
plain = true, trimempty = true }) do
|
||||
-- Remove trailing slash
|
||||
line = line:gsub("/$", "")
|
||||
ret[line] = true
|
||||
@ -20,16 +21,20 @@ local function new_git_status()
|
||||
return setmetatable({}, {
|
||||
__index = function(self, key)
|
||||
local ignore_proc = vim.system(
|
||||
{ "git", "ls-files", "--ignored", "--exclude-standard", "--others", "--directory" },
|
||||
{ "git", "ls-files", "--ignored", "--exclude-standard", "--others",
|
||||
"--directory" },
|
||||
{
|
||||
cwd = key,
|
||||
text = true,
|
||||
}
|
||||
)
|
||||
local tracked_proc = vim.system({ "git", "ls-tree", "HEAD",
|
||||
"--name-only" },
|
||||
{
|
||||
cwd = key,
|
||||
text = true,
|
||||
}
|
||||
)
|
||||
local tracked_proc = vim.system({ "git", "ls-tree", "HEAD", "--name-only" }, {
|
||||
cwd = key,
|
||||
text = true,
|
||||
})
|
||||
local ret = {
|
||||
ignored = parse_output(ignore_proc),
|
||||
tracked = parse_output(tracked_proc),
|
||||
|
Reference in New Issue
Block a user