fix(git/cmd): parse :G args with shell-style quoting
This commit is contained in:
+3
-4
@@ -4,9 +4,8 @@ local util = require("git.util")
|
||||
|
||||
local M = {}
|
||||
|
||||
---@param opts { amend: boolean? }?
|
||||
---@param opts { args: string[]? }?
|
||||
function M.commit(opts)
|
||||
local amend = opts and opts.amend or false
|
||||
local r = repo.resolve()
|
||||
if not r then
|
||||
util.error("not in a git repository")
|
||||
@@ -14,8 +13,8 @@ function M.commit(opts)
|
||||
end
|
||||
|
||||
local cmd = { "git", "commit" }
|
||||
if amend then
|
||||
table.insert(cmd, "--amend")
|
||||
if opts and opts.args then
|
||||
vim.list_extend(cmd, opts.args)
|
||||
end
|
||||
|
||||
local proxy_buf, proxy_win
|
||||
|
||||
Reference in New Issue
Block a user