refactor(git): make the git module self-contained under git.util
This commit is contained in:
+3
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user