git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] run-command: use prepare_git_cmd() in prepare_cmd()

From
René Scharfe <l.s.r@web.de>
Date
Nov 26, 2019, 09:06 UTC
Message-ID
<51662178-1002-2f69-fc96-20d603353c11@web.de>
Call prepare_git_cmd() instead of open-coding it.
Signed-off-by: René Scharfe <l.s.r@web.de>
---
 run-command.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/run-command.c b/run-command.c
index 3449db319b..9942f120a9 100644
--- a/run-command.c
+++ b/run-command.c
@@ -412,8 +412,7 @@ static int prepare_cmd(struct argv_array *out, const struct child_process *cmd)
 	argv_array_push(out, SHELL_PATH);

 	if (cmd->git_cmd) {
-		argv_array_push(out, "git");
-		argv_array_pushv(out, cmd->argv);
+		prepare_git_cmd(out, cmd->argv);
 	} else if (cmd->use_shell) {
 		prepare_shell_cmd(out, cmd->argv);
 	} else {
--
2.24.0
Message 1 of 1 in “run-command: use prepare_git_cmd() in prepare_cmd()”
  1. run-command: use prepare_git_cmd() in prepare_cmd()René Scharfe, Nov 26, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.