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

[PATCH 3/7] Use RUN_GIT_CMD to run push backends

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 12, 2007, 23:00 UTC
Message-ID
<20070312230015.GC16840@spearce.org>

If we hand run_command RUN_GIT_CMD rather than 0 it will use the execv_git_cmd path rather than execvp at the OS level. This is typically the preferred way of running another Git utility.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 builtin-push.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin-push.c b/builtin-push.c
index 6ab9a28..70b1168 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -323,10 +323,10 @@ static int do_push(const char *repo)
 		int dest_refspec_nr = refspec_nr;
 		const char **dest_refspec = refspec;
 		const char *dest = uri[i];
-		const char *sender = "git-send-pack";
+		const char *sender = "send-pack";
 		if (!prefixcmp(dest, "http://") ||
 		    !prefixcmp(dest, "https://"))
-			sender = "git-http-push";
+			sender = "http-push";
 		else if (thin)
 			argv[dest_argc++] = "--thin";
 		argv[0] = sender;
@@ -336,7 +336,7 @@ static int do_push(const char *repo)
 		argv[dest_argc] = NULL;
 		if (verbose)
 			fprintf(stderr, "Pushing to %s\n", dest);
-		err = run_command_v_opt(argv, 0);
+		err = run_command_v_opt(argv, RUN_GIT_CMD);
 		if (!err)
 			continue;
 		switch (err) {
-- 
1.5.0.3.985.gcf0b4
Message 1 of 1 in “Use RUN_GIT_CMD to run push backends”
  1. 3/7 Use RUN_GIT_CMD to run push backendsShawn O. Pearce, Mar 12, 2007

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.