refactor(git): make the git module self-contained under git.util

This commit is contained in:
2026-04-28 09:05:01 +02:00
parent 4390b55dfe
commit 37e5582795
10 changed files with 195 additions and 75 deletions
+3 -4
View File
@@ -1,7 +1,6 @@
local git = require("git")
local log = require("log")
local repo = require("git.repo")
local util = require("util")
local util = require("git.util")
local M = {}
@@ -21,7 +20,7 @@ function M.show(opts)
local _, worktree = repo.resolve_cwd()
if not worktree then
log.warning("not in a git repository")
util.warning("not in a git repository")
return
end
@@ -38,7 +37,7 @@ function M.show(opts)
table.insert(cmd, "--max-count=" .. max_count)
end
local stdout = util.system_sync(cmd, { cwd = worktree })
local stdout = util.exec(cmd, { cwd = worktree })
if not stdout then
return
end