From a7b80078f5d4e829292809905d6150df0d6c9b60 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 7 Aug 2017 10:55:31 +0200 Subject: [PATCH] Revert "git_connect: prefer Git's builtins over dashed form" It would appear that this change (which was intended to fix tests interacting with local repositories when `git-upload-pack` was not in the `PATH`) regresses on SSH access. This reverts commit 40023e58cda656326287d77358514acb262b7484 and fixes https://github.com/git-for-windows/git/issues/1258. Signed-off-by: Johannes Schindelin --- connect.c | 3 --- t/t5601-clone.sh | 6 +++--- t/t5602-clone-remote-exec.sh | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/connect.c b/connect.c index 9e288ed166a9c0..49b28b83be2717 100644 --- a/connect.c +++ b/connect.c @@ -833,9 +833,6 @@ struct child_process *git_connect(int fd[2], const char *url, die("strange pathname '%s' blocked", path); strbuf_addstr(&cmd, prog); - /* Prefer the builtin */ - if (starts_with(prog, "git-")) - cmd.buf[3] = ' '; strbuf_addch(&cmd, ' '); sq_quote_buf(&cmd, path); diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index cbe9f333195e2c..9c56f771b619e4 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -332,13 +332,13 @@ expect_ssh () { 1) ;; 2) - echo "ssh: $1 git upload-pack '$2'" + echo "ssh: $1 git-upload-pack '$2'" ;; 3) - echo "ssh: $1 $2 git upload-pack '$3'" + echo "ssh: $1 $2 git-upload-pack '$3'" ;; *) - echo "ssh: $1 $2 git upload-pack '$3' $4" + echo "ssh: $1 $2 git-upload-pack '$3' $4" esac } >"$TRASH_DIRECTORY/ssh-expect" && (cd "$TRASH_DIRECTORY" && test_cmp ssh-expect ssh-output) diff --git a/t/t5602-clone-remote-exec.sh b/t/t5602-clone-remote-exec.sh index 315cf97467f08b..cbcceab9d56b59 100755 --- a/t/t5602-clone-remote-exec.sh +++ b/t/t5602-clone-remote-exec.sh @@ -13,7 +13,7 @@ test_expect_success setup ' test_expect_success 'clone calls git upload-pack unqualified with no -u option' ' test_must_fail env GIT_SSH=./not_ssh git clone localhost:/path/to/repo junk && - echo "localhost git upload-pack '\''/path/to/repo'\''" >expected && + echo "localhost git-upload-pack '\''/path/to/repo'\''" >expected && test_cmp expected not_ssh_output '