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>
This commit is contained in:
parent
1a8f27413b
commit
df91ba36b1
@ -323,10 +323,10 @@ static int do_push(const char *repo)
|
|||||||
int dest_refspec_nr = refspec_nr;
|
int dest_refspec_nr = refspec_nr;
|
||||||
const char **dest_refspec = refspec;
|
const char **dest_refspec = refspec;
|
||||||
const char *dest = uri[i];
|
const char *dest = uri[i];
|
||||||
const char *sender = "git-send-pack";
|
const char *sender = "send-pack";
|
||||||
if (!prefixcmp(dest, "http://") ||
|
if (!prefixcmp(dest, "http://") ||
|
||||||
!prefixcmp(dest, "https://"))
|
!prefixcmp(dest, "https://"))
|
||||||
sender = "git-http-push";
|
sender = "http-push";
|
||||||
else if (thin)
|
else if (thin)
|
||||||
argv[dest_argc++] = "--thin";
|
argv[dest_argc++] = "--thin";
|
||||||
argv[0] = sender;
|
argv[0] = sender;
|
||||||
@ -336,7 +336,7 @@ static int do_push(const char *repo)
|
|||||||
argv[dest_argc] = NULL;
|
argv[dest_argc] = NULL;
|
||||||
if (verbose)
|
if (verbose)
|
||||||
fprintf(stderr, "Pushing to %s\n", dest);
|
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)
|
if (!err)
|
||||||
continue;
|
continue;
|
||||||
switch (err) {
|
switch (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user