mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 02:30:05 +08:00
16 lines
261 B
Lua
Vendored
16 lines
261 B
Lua
Vendored
local M = {}
|
|
|
|
local log = require('git.log')
|
|
|
|
function M.run(command, ...)
|
|
local argv = {...}
|
|
local ok, cmd = pcall(require, 'git.command.' .. command)
|
|
if ok and type(cmd.run) == "function" then
|
|
cmd.run(argv)
|
|
else
|
|
error(cmd)
|
|
end
|
|
end
|
|
|
|
return M
|