refactor(git): route every git invocation through util.git
This commit is contained in:
@@ -32,8 +32,7 @@ end
|
||||
---@param max_count integer?
|
||||
---@return string?
|
||||
local function fetch(worktree, max_count)
|
||||
local cmd = {
|
||||
"git",
|
||||
local args = {
|
||||
"log",
|
||||
"--graph",
|
||||
"--all",
|
||||
@@ -42,9 +41,9 @@ local function fetch(worktree, max_count)
|
||||
"--format=format:" .. LOG_FORMAT,
|
||||
}
|
||||
if max_count then
|
||||
table.insert(cmd, "--max-count=" .. max_count)
|
||||
table.insert(args, "--max-count=" .. max_count)
|
||||
end
|
||||
return util.exec(cmd, { cwd = worktree })
|
||||
return util.git(args, { cwd = worktree })
|
||||
end
|
||||
|
||||
---@type table<string, integer> -- worktree -> max_count
|
||||
|
||||
Reference in New Issue
Block a user