refactor(git): route every git invocation through util.git

This commit is contained in:
2026-05-08 03:44:23 +02:00
parent ebfcaef240
commit 01a543c12f
6 changed files with 115 additions and 132 deletions
+3 -4
View File
@@ -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