@matheusbsbs / matheus-bagliano / commits / df91ba36b1
Fork 0

Use RUN_GIT_CMD to run push backends

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> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn O. Pearce committed Mar 12, 2007 at 19:00 UTC df91ba36b1e93053ff9353a8d5c0c8c5f754a391
1 file changed +3 -3
builtin-push.c
+3 -3
@@ -323,10 +323,10 @@ static int do_push(const char *repo)
323 int dest_refspec_nr = refspec_nr;
324 const char **dest_refspec = refspec;
325 const char *dest = uri[i];
326 - const char *sender = "git-send-pack";
326 + const char *sender = "send-pack";
327 if (!prefixcmp(dest, "http://") ||
328 !prefixcmp(dest, "https://"))
329 - sender = "git-http-push";
329 + sender = "http-push";
330 else if (thin)
331 argv[dest_argc++] = "--thin";
332 argv[0] = sender;
@@ -336,7 +336,7 @@ static int do_push(const char *repo)
336 argv[dest_argc] = NULL;
337 if (verbose)
338 fprintf(stderr, "Pushing to %s\n", dest);
339 - err = run_command_v_opt(argv, 0);
339 + err = run_command_v_opt(argv, RUN_GIT_CMD);
340 if (!err)
341 continue;
342 switch (err) {