refactor(git): unify around the Repo abstraction
This commit is contained in:
+14
-1
@@ -101,7 +101,20 @@ end
|
||||
---@param delay integer
|
||||
---@return F, ow.Git.Util.DebounceHandle
|
||||
function M.debounce(fn, delay)
|
||||
local timer = assert(vim.uv.new_timer())
|
||||
local timer, err = vim.uv.new_timer()
|
||||
if not timer then
|
||||
M.warning("git: failed to create timer: %s", err)
|
||||
local noop = function() end
|
||||
return fn,
|
||||
{
|
||||
cancel = noop,
|
||||
flush = noop,
|
||||
pending = function()
|
||||
return false
|
||||
end,
|
||||
close = noop,
|
||||
}
|
||||
end
|
||||
local args ---@type table?
|
||||
local gen = 0
|
||||
local fired_gen = 0
|
||||
|
||||
Reference in New Issue
Block a user