committed by
GitHub
parent
02fdc262eb
commit
b712b82b0c
@@ -140,7 +140,7 @@ end
|
||||
|
||||
-- This module runs a git process, which will be killed if it takes more than timeout which defaults to 400ms
|
||||
function Runner.run(opts)
|
||||
local ps = log.profile_start("git job %s %s", opts.project_root, opts.path)
|
||||
local profile = log.profile_start("git job %s %s", opts.project_root, opts.path)
|
||||
|
||||
local self = setmetatable({
|
||||
project_root = opts.project_root,
|
||||
@@ -155,7 +155,7 @@ function Runner.run(opts)
|
||||
self:_run_git_job()
|
||||
self:_wait()
|
||||
|
||||
log.profile_end(ps, "git job %s %s", opts.project_root, opts.path)
|
||||
log.profile_end(profile)
|
||||
|
||||
if self.rc == -1 then
|
||||
log.line("git", "job timed out %s %s", opts.project_root, opts.path)
|
||||
|
||||
@@ -4,7 +4,7 @@ local log = require "nvim-tree.log"
|
||||
local has_cygpath = vim.fn.executable "cygpath" == 1
|
||||
|
||||
function M.get_toplevel(cwd)
|
||||
local ps = log.profile_start("git toplevel %s", cwd)
|
||||
local profile = log.profile_start("git toplevel %s", cwd)
|
||||
|
||||
local cmd = { "git", "-C", cwd, "rev-parse", "--show-toplevel" }
|
||||
log.line("git", "%s", vim.inspect(cmd))
|
||||
@@ -12,7 +12,7 @@ function M.get_toplevel(cwd)
|
||||
local toplevel = vim.fn.system(cmd)
|
||||
|
||||
log.raw("git", toplevel)
|
||||
log.profile_end(ps, "git toplevel %s", cwd)
|
||||
log.profile_end(profile)
|
||||
|
||||
if vim.v.shell_error ~= 0 or not toplevel or #toplevel == 0 or toplevel:match "fatal" then
|
||||
return nil
|
||||
@@ -41,7 +41,7 @@ function M.should_show_untracked(cwd)
|
||||
return untracked[cwd]
|
||||
end
|
||||
|
||||
local ps = log.profile_start("git untracked %s", cwd)
|
||||
local profile = log.profile_start("git untracked %s", cwd)
|
||||
|
||||
local cmd = { "git", "-C", cwd, "config", "status.showUntrackedFiles" }
|
||||
log.line("git", vim.inspect(cmd))
|
||||
@@ -49,7 +49,7 @@ function M.should_show_untracked(cwd)
|
||||
local has_untracked = vim.fn.system(cmd)
|
||||
|
||||
log.raw("git", has_untracked)
|
||||
log.profile_end(ps, "git untracked %s", cwd)
|
||||
log.profile_end(profile)
|
||||
|
||||
untracked[cwd] = vim.trim(has_untracked) ~= "no"
|
||||
return untracked[cwd]
|
||||
|
||||
Reference in New Issue
Block a user